code
stringlengths
114
1.05M
path
stringlengths
3
312
quality_prob
float64
0.5
0.99
learning_prob
float64
0.2
1
filename
stringlengths
3
168
kind
stringclasses
1 value
import warnings from abc import ABC, abstractmethod from collections import deque from threading import Event, Lock, Semaphore from typing import TypeVar, List, final, Optional, Iterator T = TypeVar("T") class ResponseHandlerBase(Iterator[T], ABC): num_receivers: Optional[int] = None _num_received_results: int _results: deque _results_lock: Lock _finalized: Event _iter_semaphore: Semaphore _iter_acquire_timeout: float _is_next_executed: Event def __init__(self, iter_acquire_timeout=None): self._results = deque() self._num_received_results = 0 self._iter_semaphore = Semaphore(value=0) self._iter_acquire_timeout = 0.01 if iter_acquire_timeout is None else iter_acquire_timeout self._results_lock = Lock() self._finalized = Event() self._is_next_executed = Event() def add_response(self, response: T) -> None: with self._results_lock: self._results.append(response) self._iter_semaphore.release() self._num_received_results += 1 def set_num_receivers(self, num_receivers: Optional[int]) -> None: self.num_receivers = num_receivers @property def num_received_results(self) -> int: with self._results_lock: return self._num_received_results @final def finalize(self) -> bool: if self.finalize_internal(): self._finalized.set() return True return False @property def is_finalized(self) -> bool: return self._finalized.wait(0) @abstractmethod def finalize_internal(self) -> bool: ... @final def get(self, block=True, timeout=None) -> Optional[List[T]]: if self._is_next_executed.wait(0): self.__warn_may_get_unexpected_results() if not block: timeout = 0 if not self._finalized.wait(timeout): return None with self._results_lock: return list(self._results) def __next__(self) -> T: self._is_next_executed.set() self.__should_stop_iteration() while not self._iter_semaphore.acquire(timeout=self._iter_acquire_timeout): self.__should_stop_iteration() with self._results_lock: return self._results.popleft() def __should_stop_iteration(self): with self._results_lock: num_results = len(self._results) if self.is_finalized and num_results == 0: raise StopIteration() def __warn_may_get_unexpected_results(self) -> None: warnings.warn("method get may get unexpected results because __next__ has been called. " "method __next__ will remove the buffering results.", category=RuntimeWarning, stacklevel=3)
/rin_curium-0.2.0-py3-none-any.whl/rin/curium/response_handler_base.py
0.88251
0.153771
response_handler_base.py
pypi
from abc import ABC, abstractmethod from typing import Optional, Iterable class IConnection(ABC): @abstractmethod def connect(self) -> str: """ Connect to the backend server. :return: A unique id for node :raises ~exc.ConnectionFailedError: fail to connect. """ @abstractmethod def reconnect(self) -> None: """ Try to reconnect to the backend server using the unique id that was got previously. :raises ~exc.ConnectionFailedError: fail to reconnect :raises ~exc.NotConnectedError: no previous connection found. """ @abstractmethod def close(self) -> None: """ Disconnect from the backend server and clean up internal state. .. note:: No reaction when you invoke this method and the server was not connected. """ @abstractmethod def join(self, name: str) -> None: """ Join a channel with the given name. :param name: channel name :raises ~exc.NotConnectedError: the backend server is not connected. :raises ~exc.InvalidChannelError: channel is not available. :raises ~exc.ServerDisconnectedError: server disconnect during the invocation """ @abstractmethod def leave(self, name: str) -> None: """ Leave a channel with the given name. :param name: channel name :raises ~exc.NotConnectedError: the backend server is not connected. :raises ~exc.InvalidChannelError: channel is not available. :raises ~exc.ServerDisconnectedError: server disconnect during the invocation """ @abstractmethod def send(self, data: bytes, destinations: Iterable[str]) -> Optional[int]: """ Send data to given destinations on the backend server. :param data: data to be sent :param destinations: list of channel names represent destinations :return: number of node that received, None presents unknown :raises ~exc.InvalidChannelError: channel is not available. :raises ~exc.NotConnectedError: the backend server is not connected. :raises ~exc.ServerDisconnectedError: server disconnect during the invocation """ @abstractmethod def recv(self, block=True, timeout: float = None) -> Optional[bytes]: """ Receive data from the backend server. :param block: is blocking or not :param timeout: timeout of this operation in second, None presents forever :return: received data. None presents no data received :raises ~exc.NotConnectedError: the backend server is not connected. :raises ~exc.ServerDisconnectedError: server disconnect during the invocation """
/rin_curium-0.2.0-py3-none-any.whl/rin/curium/iconnection.py
0.946609
0.344761
iconnection.py
pypi
import numbers from datetime import datetime from typing import Dict, Any, Mapping, Callable, Union from .advanced_json_encoder import IResolver, ResolveError, ResolverPriority from .typing import JSONType, JSONSerializable __all__ = ["JSONSerializableResolver", "NumberResolver", "IterableResolver", "DateTimeResolver", "NumpyResolver"] class _Singleton: _instance = None def __new__(cls): if cls._instance is None: cls._instance = super().__new__(cls) return cls._instance class JSONSerializableResolver(IResolver, _Singleton): def get_priority(self) -> int: return ResolverPriority.HIGH def initialize(self) -> bool: return True def resolve(self, o, context: Dict[str, Any]) -> JSONType: if isinstance(o, JSONSerializable): return o.__json__(context) raise ResolveError() class NumberResolver(IResolver, _Singleton): def get_priority(self) -> int: return ResolverPriority.MEDIUM def initialize(self) -> bool: return True def resolve(self, o, context: Dict[str, Any]) -> JSONType: if isinstance(o, numbers.Integral): return int(o) if isinstance(o, numbers.Real): return float(o) raise ResolveError() class IterableResolver(IResolver, _Singleton): def get_priority(self) -> int: return ResolverPriority.MEDIUM def initialize(self) -> bool: return True def resolve(self, o, context: Dict[str, Any]) -> JSONType: if isinstance(o, Mapping): return dict(o) try: return list(o) except TypeError: pass raise ResolveError() class DateTimeResolver(IResolver): def __init__(self, datetime_format: Union[str, Callable[[datetime], str]] = None): self.datetime_format = datetime_format def get_priority(self) -> int: return ResolverPriority.MEDIUM def initialize(self) -> bool: return True def resolve(self, o, context: Dict[str, Any]) -> JSONType: if isinstance(o, datetime): datetime_format = context.get("datetime.format", self.datetime_format) if datetime_format is None: return o.isoformat() if isinstance(datetime_format, str): return o.strftime(datetime_format) if isinstance(datetime_format, Callable): return datetime_format(o) raise ResolveError() class NumpyResolver(IResolver, _Singleton): def get_priority(self) -> int: return ResolverPriority.HIGH def initialize(self) -> bool: try: import numpy as np return True except ImportError: return False def resolve(self, o, context: Dict[str, Any]) -> JSONType: import numpy as np if isinstance(o, np.ndarray): return o.tolist() raise ResolveError()
/rin_jsonutils-1.1.0-py3-none-any.whl/rin/jsonutils/resolvers.py
0.743727
0.154823
resolvers.py
pypi
import abc import enum from typing import Dict, Any, List from json import JSONEncoder from .typing import JSONType __all__ = ["AdvancedJSONEncoder", "IResolver", "ResolverPriority", "ResolveError"] class ResolverPriority(enum.IntEnum): LOW_BOUND = 1000 LOWEST = 1000 LOW = 750 MEDIUM = 500 HIGH = 250 HIGHEST = 0 HIGH_BOUND = 0 @classmethod def is_valid_priority(cls, priority: int) -> bool: return cls.LOW_BOUND >= priority >= cls.HIGH_BOUND class IResolver(abc.ABC): @abc.abstractmethod def get_priority(self) -> int: """ lower number higher priority """ @abc.abstractmethod def initialize(self) -> bool: """ :return: False if initialization failed """ @abc.abstractmethod def resolve(self, o, context: Dict[str, Any]) -> JSONType: """ :raises ResolveError when cannot resolve the object. If you aren't resolves the object, you MUST raise this exception. """ class ResolveError(Exception): pass class AdvancedJSONEncoder(JSONEncoder): context: Dict[str, Any] _uninitialized_resolvers: Dict[str, IResolver] _resolvers: List[IResolver] _resolver_name_map: Dict[str, IResolver] def __init__( self, *, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, default=None, **kwargs ): super().__init__(skipkeys=skipkeys, ensure_ascii=ensure_ascii, check_circular=check_circular, allow_nan=allow_nan, sort_keys=sort_keys, indent=indent, separators=separators, default=default) self.context = kwargs self._uninitialized_resolvers = {} self._resolver_name_map = {} self._resolvers = [] def default(self, o): self.initialize_resolvers() for r in self._resolvers: try: return r.resolve(o, self.context) except ResolveError: pass super().default(o) def add_resolver(self, name: str, resolver: IResolver) -> None: priority = resolver.get_priority() if not ResolverPriority.is_valid_priority(priority): raise ValueError(f"Invalid resolver priority: {priority}") self._uninitialized_resolvers[name] = resolver def get_resolver(self, name: str) -> IResolver: self.initialize_resolvers() return self._resolver_name_map[name] def remove_resolver(self, name: str) -> None: self.initialize_resolvers() r = self._resolver_name_map.pop(name) self._resolvers.remove(r) def initialize_resolvers(self) -> None: if self._uninitialized_resolvers: for name, r in self._uninitialized_resolvers.items(): if r.initialize(): if name in self._resolver_name_map: self.remove_resolver(name) self._resolver_name_map[name] = r self._resolvers.append(r) self._resolvers.sort(key=lambda x: x.get_priority()) self._uninitialized_resolvers.clear()
/rin_jsonutils-1.1.0-py3-none-any.whl/rin/jsonutils/advanced_json_encoder.py
0.724773
0.2139
advanced_json_encoder.py
pypi
from typing import AsyncGenerator, List import aiohttp import bs4 TAGS_PER_META = 48 IMAGES_PER_TAG = 24 HEADERS = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:64.0)' 'Gecko/20100101 Firefox/64.0'} async def get(query, **kwargs) -> bs4.BeautifulSoup: kwargs = '?'.join([f'{k}={v}' for k, v in kwargs.items()]) url = f'https://www.zerochan.net/{"+".join(query.split())}?{kwargs}' async with aiohttp.ClientSession(headers=HEADERS) as session: async with session.get(url) as response: return bs4.BeautifulSoup(await response.text(), features='lxml') def get_list(soup, lid, error=ValueError) -> List[bs4.element.Tag]: try: sub = soup.find('ul', {'id': lid}).findAll('li') except AttributeError: raise error if not sub: raise StopAsyncIteration return sub async def meta(query: str, p: int) -> AsyncGenerator[dict]: soup = await get(query, p=p) sub = get_list(soup, 'children', ValueError('Meta not found.')) c = 0 for x in sub: c += 1 tags, count = x.span.text.rsplit(' ', 1) yield {'name': x.h3.a.text, 'meta': tags, 'count': int(count.replace(',', ''))} if c >= TAGS_PER_META: async for x in meta(query, p=p+1): yield x async def search(query: str, p: int) -> AsyncGenerator[dict]: soup = await get(query, p=p) sub = get_list(soup, 'thumbs2', ValueError('Image not found.')) c = 0 for x in sub: c += 1 res, size = x.a.img['title'].split() yield {'id': x.a['href'][1:], 'thumb': x.a.img['src'], 'res': res, 'size': size} if c >= IMAGES_PER_TAG: async for x in search(query, p=p+1): yield x async def image(image_id: str) -> dict: soup = await get(image_id) tags = get_list(soup, 'tags', ValueError('Image not found.')) im = soup.find('a', {'class': 'preview'})['href'] tags = [{'name': x.a.text, 'meta': x.text.replace(x.a.text, '', 1)[1:]} for x in tags] try: comments = [{'user': x.div.p.a.text, 'date': x.div.span.text, 'comment': x.findAll('div')[1].p.text} for x in soup.find('div', {'id': 'posts'}).ul.findAll('li') if x.div] except AttributeError: comments = [] return {'url': im, 'tags': tags, 'comments': comments} async def info(query: str) -> str: soup = await get(query) try: return soup.find('div', {'id': 'menu'}).findAll('p')[1].text except AttributeError: raise ValueError('Tag not Found')
/rin_zerochan-0.1.0-py3-none-any.whl/src/scrap.py
0.589126
0.209106
scrap.py
pypi
from typing import AsyncGenerator, List import aiohttp import bs4 TAGS_PER_META = 48 IMAGES_PER_TAG = 24 HEADERS = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:64.0)' 'Gecko/20100101 Firefox/64.0'} async def get(query, **kwargs) -> bs4.BeautifulSoup: kwargs = '?'.join([f'{k}={v}' for k, v in kwargs.items()]) url = f'https://www.zerochan.net/{"+".join(query.split())}?{kwargs}' async with aiohttp.ClientSession(headers=HEADERS) as session: async with session.get(url) as response: return bs4.BeautifulSoup(await response.text(), features='lxml') def get_list(soup, lid, error=ValueError) -> List[bs4.element.Tag]: try: sub = soup.find('ul', {'id': lid}).findAll('li') except AttributeError: raise error if not sub: raise StopAsyncIteration return sub async def meta(query: str, p: int) -> AsyncGenerator[dict, None]: soup = await get(query, p=p) sub = get_list(soup, 'children', ValueError('Meta not found.')) c = 0 for x in sub: c += 1 tags, count = x.span.text.rsplit(' ', 1) yield {'name': x.h3.a.text, 'meta': tags, 'count': int(count.replace(',', ''))} if c >= TAGS_PER_META: async for x in meta(query, p=p+1): yield x async def search(query: str, p: int) -> AsyncGenerator[dict, None]: soup = await get(query, p=p) sub = get_list(soup, 'thumbs2', ValueError('Image not found.')) c = 0 for x in sub: c += 1 res, size = x.a.img['title'].split() yield {'id': x.a['href'][1:], 'thumb': x.a.img['src'], 'res': res, 'size': size} if c >= IMAGES_PER_TAG: async for x in search(query, p=p+1): yield x async def image(image_id: str) -> dict: soup = await get(image_id) tags = get_list(soup, 'tags', ValueError('Image not found.')) im = soup.find('a', {'class': 'preview'})['href'] tags = [{'name': x.a.text, 'meta': x.text.replace(x.a.text, '', 1)[1:]} for x in tags] try: comments = [{'user': x.div.p.a.text, 'date': x.div.span.text, 'comment': x.findAll('div')[1].p.text} for x in soup.find('div', {'id': 'posts'}).ul.findAll('li') if x.div] except AttributeError: comments = [] return {'url': im, 'tags': tags, 'comments': comments} async def info(query: str) -> str: soup = await get(query) try: return soup.find('div', {'id': 'menu'}).findAll('p')[1].text except AttributeError: raise ValueError('Tag not Found')
/rin_zerochan-0.1.0-py3-none-any.whl/rin_zerochan/scrap.py
0.596081
0.206694
scrap.py
pypi
"""Python Ring Other (Intercom) wrapper.""" import logging import time import uuid from ring_doorbell.generic import RingGeneric from ring_doorbell.const import ( INTERCOM_ALLOWED_USERS, INTERCOM_INVITATIONS_DELETE_ENDPOINT, INTERCOM_INVITATIONS_ENDPOINT, INTERCOM_KINDS, INTERCOM_OPEN_ENDPOINT, ) _LOGGER = logging.getLogger(__name__) class Other(RingGeneric): """Implementation for Ring Intercom.""" def __init__(self, ring, device_id, shared=False): super().__init__(ring, device_id) self.shared = shared @property def family(self): """Return Ring device family type.""" return "other" @property def model(self): """Return Ring device model name.""" if self.kind in INTERCOM_KINDS: return "Intercom" return None def has_capability(self, capability): """Return if device has specific capability.""" if capability == "open": return self.kind in INTERCOM_KINDS return False @property def battery_life(self): """Return battery life.""" if self.kind in INTERCOM_KINDS: if self._attrs.get("battery_life") is None: return None value = int(self._attrs.get("battery_life", 0)) if value and value > 100: value = 100 return value return None @property def subscribed(self): """Return if is online.""" if self.kind in INTERCOM_KINDS: result = self._attrs.get("subscribed") if result is None: return False return True return None @property def subscriptions(self): """Return event type subscriptions.""" if self.kind in INTERCOM_KINDS: return self._attrs.get("subscriptions", []).get("event_types", []) return None @property def has_subscription(self): """Return boolean if the account has subscription.""" if self.kind in INTERCOM_KINDS: return self._attrs.get("features").get("show_recordings") return None @property def doorbell_volume(self): """Return doorbell volume.""" if self.kind in INTERCOM_KINDS: return self._attrs.get("settings").get("doorbell_volume") return None @property def mic_volume(self): """Return mic volume.""" if self.kind in INTERCOM_KINDS: return self._attrs.get("settings").get("mic_volume") return None @property def voice_volume(self): """Return voice volume.""" if self.kind in INTERCOM_KINDS: return self._attrs.get("settings").get("voice_volume") return None @property def connection_status(self): """Return connection status.""" if self.kind in INTERCOM_KINDS: return self._attrs.get("alerts").get("connection") return None @property def location_id(self): """Return location id.""" if self.kind in INTERCOM_KINDS: return self._attrs.get("location_id", None) return None @property def allowed_users(self): """Return list of users allowed or invited to access""" if self.kind in INTERCOM_KINDS: url = INTERCOM_ALLOWED_USERS.format(self.location_id) return self._ring.query(url, method="GET").json() return None def open_door(self): """Open the door""" if self.kind in INTERCOM_KINDS: url = INTERCOM_OPEN_ENDPOINT.format(self.id) request_id = str(uuid.uuid4()) request_timestamp = int(time.time() * 1000) payload = { "command_name": "device_rpc", "request": { "id": request_id, "jsonrpc": "2.0", "method": "unlock_door", "params": { "command_timeout": 5, "door_id": 0, "issue_time": request_timestamp, "user_id": "00000000", }, }, } response = self._ring.query(url, method="PUT", json=payload).json() self._ring.update_devices() if response.get("result", -1).get("code", -1) == 0: return True return False def invite_access(self, email): """Invite user""" if self.kind in INTERCOM_KINDS: url = INTERCOM_INVITATIONS_ENDPOINT.format(self.location_id) payload = { "invitation": { "doorbot_ids": [self.id], "invited_email": email, "group_ids": [], } } self._ring.query(url, method="POST", json=payload) return True return False def remove_access(self, user_id): """Remove user access or invitation""" if self.kind in INTERCOM_KINDS: url = INTERCOM_INVITATIONS_DELETE_ENDPOINT.format(self.location_id, user_id) self._ring.query(url, method="DELETE") return True return False
/ring_doorbell_intercom-0.7.3.tar.gz/ring_doorbell_intercom-0.7.3/ring_doorbell/other.py
0.893181
0.182044
other.py
pypi
"""Python Ring Chime wrapper.""" import logging from ring_doorbell.generic import RingGeneric from ring_doorbell.const import ( CHIMES_ENDPOINT, CHIME_VOL_MIN, CHIME_VOL_MAX, LINKED_CHIMES_ENDPOINT, MSG_VOL_OUTBOUND, TESTSOUND_CHIME_ENDPOINT, CHIME_TEST_SOUND_KINDS, KIND_DING, CHIME_KINDS, CHIME_PRO_KINDS, HEALTH_CHIMES_ENDPOINT, ) _LOGGER = logging.getLogger(__name__) class RingChime(RingGeneric): """Implementation for Ring Chime.""" @property def family(self): """Return Ring device family type.""" return "chimes" def update_health_data(self): """Update health attrs.""" self._health_attrs = ( self._ring.query(HEALTH_CHIMES_ENDPOINT.format(self.id)) .json() .get("device_health", {}) ) @property def model(self): """Return Ring device model name.""" if self.kind in CHIME_KINDS: return "Chime" if self.kind in CHIME_PRO_KINDS: return "Chime Pro" return None def has_capability(self, capability): """Return if device has specific capability.""" if capability == "volume": return True return False @property def volume(self): """Return if chime volume.""" return self._attrs.get("settings").get("volume") @volume.setter def volume(self, value): if not ((isinstance(value, int)) and (CHIME_VOL_MIN <= value <= CHIME_VOL_MAX)): _LOGGER.error("%s", MSG_VOL_OUTBOUND.format(CHIME_VOL_MIN, CHIME_VOL_MAX)) return False params = { "chime[description]": self.name, "chime[settings][volume]": str(value), } url = CHIMES_ENDPOINT.format(self.id) self._ring.query(url, extra_params=params, method="PUT") self._ring.update_devices() return True @property def linked_tree(self): """Return doorbell data linked to chime.""" url = LINKED_CHIMES_ENDPOINT.format(self.id) return self._ring.query(url).json() def test_sound(self, kind=KIND_DING): """Play chime to test sound.""" if kind not in CHIME_TEST_SOUND_KINDS: return False url = TESTSOUND_CHIME_ENDPOINT.format(self.id) self._ring.query(url, method="POST", extra_params={"kind": kind}) return True
/ring_doorbell_intercom-0.7.3.tar.gz/ring_doorbell_intercom-0.7.3/ring_doorbell/chime.py
0.891911
0.152347
chime.py
pypi
"""Python Ring RingGeneric wrapper.""" import logging _LOGGER = logging.getLogger(__name__) # pylint: disable=useless-object-inheritance class RingGeneric(object): """Generic Implementation for Ring Chime/Doorbell.""" # pylint: disable=redefined-builtin def __init__(self, ring, id): """Initialize Ring Generic.""" self._ring = ring # This is the account ID of the device. # Not the same as device ID. self.id = id # pylint:disable=invalid-name self.capability = False self.alert = None self._health_attrs = {} # alerts notifications self.alert_expires_at = None def __repr__(self): """Return __repr__.""" return "<{0}: {1}>".format(self.__class__.__name__, self.name) def update(self): """Update this device info.""" self.update_health_data() def update_health_data(self): """Update the health data.""" raise NotImplementedError @property def _attrs(self): """Return attributes.""" return self._ring.devices_data[self.family][self.id] @property def name(self): """Return name.""" return self._attrs["description"] @property def device_id(self): """Return device ID.""" return self._attrs["device_id"] @property def family(self): """Return Ring device family type.""" raise NotImplementedError @property def model(self): """Return Ring device model name.""" raise NotImplementedError def has_capability(self, capability): """Return if device has specific capability.""" return self.capability @property def address(self): """Return address.""" return self._attrs.get("address") @property def firmware(self): """Return firmware.""" return self._attrs.get("firmware_version") @property def latitude(self): """Return latitude attr.""" return self._attrs.get("latitude") @property def longitude(self): """Return longitude attr.""" return self._attrs.get("longitude") @property def kind(self): """Return kind attr.""" return self._attrs.get("kind") @property def timezone(self): """Return timezone.""" return self._attrs.get("time_zone") @property def wifi_name(self): """Return wifi ESSID name. Requires health data to be updated. """ return self._health_attrs.get("wifi_name") @property def wifi_signal_strength(self): """Return wifi RSSI. Requires health data to be updated. """ return self._health_attrs.get("latest_signal_strength") @property def wifi_signal_category(self): """Return wifi signal category. Requires health data to be updated. """ return self._health_attrs.get("latest_signal_category")
/ring_doorbell_intercom-0.7.3.tar.gz/ring_doorbell_intercom-0.7.3/ring_doorbell/generic.py
0.922957
0.155816
generic.py
pypi
"""Python Ring Chime wrapper.""" import logging from ring_doorbell.generic import RingGeneric from ring_doorbell.const import ( CHIMES_ENDPOINT, CHIME_VOL_MIN, CHIME_VOL_MAX, LINKED_CHIMES_ENDPOINT, MSG_VOL_OUTBOUND, TESTSOUND_CHIME_ENDPOINT, CHIME_TEST_SOUND_KINDS, KIND_DING, CHIME_KINDS, CHIME_PRO_KINDS, HEALTH_CHIMES_ENDPOINT, ) _LOGGER = logging.getLogger(__name__) class RingChime(RingGeneric): """Implementation for Ring Chime.""" @property def family(self): """Return Ring device family type.""" return "chimes" def update_health_data(self): """Update health attrs.""" self._health_attrs = ( self._ring.query(HEALTH_CHIMES_ENDPOINT.format(self.id)) .json() .get("device_health", {}) ) @property def model(self): """Return Ring device model name.""" if self.kind in CHIME_KINDS: return "Chime" if self.kind in CHIME_PRO_KINDS: return "Chime Pro" return None def has_capability(self, capability): """Return if device has specific capability.""" if capability == "volume": return True return False @property def volume(self): """Return if chime volume.""" return self._attrs.get("settings").get("volume") @volume.setter def volume(self, value): if not ((isinstance(value, int)) and (CHIME_VOL_MIN <= value <= CHIME_VOL_MAX)): _LOGGER.error("%s", MSG_VOL_OUTBOUND.format(CHIME_VOL_MIN, CHIME_VOL_MAX)) return False params = { "chime[description]": self.name, "chime[settings][volume]": str(value), } url = CHIMES_ENDPOINT.format(self.id) self._ring.query(url, extra_params=params, method="PUT") self._ring.update_devices() return True @property def linked_tree(self): """Return doorbell data linked to chime.""" url = LINKED_CHIMES_ENDPOINT.format(self.id) return self._ring.query(url).json() def test_sound(self, kind=KIND_DING): """Play chime to test sound.""" if kind not in CHIME_TEST_SOUND_KINDS: return False url = TESTSOUND_CHIME_ENDPOINT.format(self.id) self._ring.query(url, method="POST", extra_params={"kind": kind}) return True
/ring_doorbell-0.7.2.tar.gz/ring_doorbell-0.7.2/ring_doorbell/chime.py
0.891911
0.152347
chime.py
pypi
"""Python Ring RingGeneric wrapper.""" import logging _LOGGER = logging.getLogger(__name__) # pylint: disable=useless-object-inheritance class RingGeneric(object): """Generic Implementation for Ring Chime/Doorbell.""" # pylint: disable=redefined-builtin def __init__(self, ring, id): """Initialize Ring Generic.""" self._ring = ring # This is the account ID of the device. # Not the same as device ID. self.id = id # pylint:disable=invalid-name self.capability = False self.alert = None self._health_attrs = {} # alerts notifications self.alert_expires_at = None def __repr__(self): """Return __repr__.""" return "<{0}: {1}>".format(self.__class__.__name__, self.name) def update(self): """Update this device info.""" self.update_health_data() def update_health_data(self): """Update the health data.""" raise NotImplementedError @property def _attrs(self): """Return attributes.""" return self._ring.devices_data[self.family][self.id] @property def name(self): """Return name.""" return self._attrs["description"] @property def device_id(self): """Return device ID.""" return self._attrs["device_id"] @property def family(self): """Return Ring device family type.""" raise NotImplementedError @property def model(self): """Return Ring device model name.""" raise NotImplementedError def has_capability(self, capability): """Return if device has specific capability.""" return self.capability @property def address(self): """Return address.""" return self._attrs.get("address") @property def firmware(self): """Return firmware.""" return self._attrs.get("firmware_version") @property def latitude(self): """Return latitude attr.""" return self._attrs.get("latitude") @property def longitude(self): """Return longitude attr.""" return self._attrs.get("longitude") @property def kind(self): """Return kind attr.""" return self._attrs.get("kind") @property def timezone(self): """Return timezone.""" return self._attrs.get("time_zone") @property def wifi_name(self): """Return wifi ESSID name. Requires health data to be updated. """ return self._health_attrs.get("wifi_name") @property def wifi_signal_strength(self): """Return wifi RSSI. Requires health data to be updated. """ return self._health_attrs.get("latest_signal_strength") @property def wifi_signal_category(self): """Return wifi signal category. Requires health data to be updated. """ return self._health_attrs.get("latest_signal_category")
/ring_doorbell-0.7.2.tar.gz/ring_doorbell-0.7.2/ring_doorbell/generic.py
0.922957
0.155816
generic.py
pypi
# ringbuf A lock-free, single-producer, single-consumer, ring buffer for Python and Cython. [![Test](https://github.com/elijahr/ringbuf/actions/workflows/test.yml/badge.svg)](https://github.com/elijahr/ringbuf/actions/workflows/test.yml) [![PyPI version](https://badge.fury.io/py/ringbuf.svg)](https://badge.fury.io/py/ringbuf) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![linting: pylint](https://img.shields.io/badge/linting-pylint-yellowgreen)](https://github.com/PyCQA/pylint) ## Installation OS X: `brew install boost` Ubuntu: `apt-get install libboost-all-dev` Windows: Install the latest version of [`Boost`](https://www.boost.org/) then set the `BOOST_ROOT` environment variable to point to its folder. Then: ```shell pip install ringbuf ``` ## Motivation When working with realtime DSP in Python, we might be wrapping some external C/C++ library (for instance, PortAudio) which runs some user-provided callback function in realtime. The callback function shouldn't allocate/deallocate memory, shouldn't contain any critical sections (mutexes), and so forth, to prevent priority inversion. If the callback were to contain Python objects, we'd likely be allocating and deallocating, and at the very least, acquiring and releasing the GIL. So, the callback cannot interact with Python objects if we expect realtime performance. As such, there's a need for buffering data in a non-locking way between a C/C++ callback and Python. Enter ringbuf, Cython wrappers for [`boost::lockfree::spsc_queue`](https://www.boost.org/doc/libs/1_72_0/doc/html/boost/lockfree/spsc_queue.html). Our Python code can read from and write to a `ringbuf.RingBuffer` object, and our C++ code can read from and write to that buffer's underlying `spsc_queue`, no GIL required. ## Usage Any Python object which supports the [buffer protocol](https://docs.python.org/3/c-api/buffer.html) can be stored in `ringbuf.RingBuffer`. This includes, but is not limited to: `bytes`, `bytearray`, `array.array`, and `numpy.ndarray`. ### NumPy ```python import numpy as np from ringbuf import RingBuffer buffer = RingBuffer(format='f', capacity=100) data = np.linspace(-1, 1, num=100, dtype='f') buffer.push(data) popped = buffer.pop(100) assert np.array_equal(data, popped) ``` ### bytes ```python from ringbuf import RingBuffer buffer = RingBuffer(format='B', capacity=11) buffer.push(b'hello world') popped = buffer.pop(11) assert bytes(popped) == b'hello world' ``` ### Interfacing with C/C++ mymodule.pxd: ```cython # distutils: language = c++ cdef void callback(void* q) ``` mymodule.pyx: ```cython # distutils: language = c++ from array import array from ringbuf.boost cimport spsc_queue, void_ptr_to_spsc_queue_char_ptr from ringbuf.ringbufcy cimport RingBuffer from some_c_library cimport some_c_function cdef void callback(void* q): cdef: # Cast the void* back to an spsc_queue. # The underlying queue always holds chars. spsc_queue[char] *queue = void_ptr_to_spsc_queue_char_ptr(q) double[5] to_push = [1.0, 2.0, 3.0, 4.0, 5.0] # Since the queue holds chars, you'll have to cast and adjust size accordingly. queue.push(<char*>to_push, sizeof(double) * 5) def do_stuff(): cdef: RingBuffer buffer = RingBuffer(format='d', capacity=100) void* queue = buffer.queue_void_ptr() # Pass our callback and a void pointer to the buffer's queue to some third party library. # Presumably, the C library schedules the callback and passes it the queue's void pointer. some_c_function(callback, queue) sleep(1) assert array.array('d', buffer.pop(5)) == array.array('d', range(1, 6)) ``` ### Handling overflow & underflow When `RingBuffer.push()` overflows, it returns the data that couldn't be pushed (or None, if all was pushed): ```python from ringbuf import RingBuffer buffer = RingBuffer(format='B', capacity=10) overflowed = buffer.push(b'spam eggs ham') assert overflowed == b'ham' ``` When `RingBuffer.pop()` underflows, it returns whatever data could be popped: ```python from ringbuf import RingBuffer buffer = RingBuffer(format='B', capacity=13) buffer.push(b'spam eggs ham') popped = buffer.pop(buffer.capacity * 100) assert bytes(popped) == b'spam eggs ham' ``` For additional usage see the [tests](https://github.com/elijahr/ringbuf/blob/master/test.py). ## Supported platforms GitHub Actions tests the following matrix: - Linux: - CPython 3.7 - CPython 3.8 - CPython 3.9 - CPython 3.10 - macOS: - CPython 3.10 - Windows: - CPython 3.10 Any platform with a C++11 compiler and boost installed should work. ## Contributing Pull requests are welcome, please file any issues you encounter. The code is linted with [lintball](https://github.com/elijahr/lintball). There is a pre-commit hook to lint, configured by running: ```shell npm install -g lintball git config --local core.hooksPath .githooks ``` ## Changelog ### v2.6.0 2022-09-27 - Move CI to GitHub Actions. - Lint codebase with lintball - Improve project structure ### v2.5.0 2020-04-17 - Added experimental support for Windows. ### v2.4.0 2020-03-23 - Added `RingBuffer.reset()` method to clear the buffer. ### v2.3.0 2020-03-22 - Added `concatenate` function for joining multiple arbitrary Python objects that support the buffer protocol.
/ringbuf-2.6.0.tar.gz/ringbuf-2.6.0/README.md
0.58059
0.946892
README.md
pypi
from dataclasses_json.api import DataClassJsonMixin from datetime import date from datetime import datetime from datetime import time from typing import * DT = TypeVar('DT', date, time, datetime) K = TypeVar('K') T = TypeVar('T') V = TypeVar('V') class DiscriminatorDecoderError(ValueError): pass class UnregisteredDiscriminatorTypeError(DiscriminatorDecoderError): pass def discriminator_decoder(discriminator_key: str, mappings: Dict[str, Type[T]], *, default_factory: Union[Callable[[], T], Type[T]] = None) -> Callable[[Dict[str, Any]], T]: lst_gen = lambda: ', '.join(f"'{t}'" for t in mappings.keys()) def decoder(data: Dict[str, Any]) -> T: if (not isinstance(data, dict)): raise DiscriminatorDecoderError(f"A dict-like object is expected to decode any of [ {lst_gen()} ], got {type(data)}") elif (discriminator_key not in data): raise DiscriminatorDecoderError(f"Discriminator field '{discriminator_key}' was not presented in the body: '{data}'") elif (data[discriminator_key] not in mappings): raise UnregisteredDiscriminatorTypeError(f"Discriminator field '{discriminator_key}' has invalid value '{data[discriminator_key]}'") else: return mappings[data[discriminator_key]].from_dict(data) if (default_factory is not None): def safe_decoder(data: Dict[str, Any]) -> Optional[T]: try: return decoder(data) except DiscriminatorDecoderError: if (isinstance(default_factory, type) and issubclass(default_factory, DataClassJsonMixin)): return default_factory.from_dict(data) else: return default_factory() result = safe_decoder else: result = decoder return result def datetime_decoder(cls: Type[DT]) -> Callable[[str], DT]: def decoder(s: str) -> DT: if (not isinstance(s, str)): raise ValueError(f"Unable to decode {cls.__name__}: expected str, got '{s}' ({type(s)})") return cls.fromisoformat(s.replace('Z', '+00:00')) return decoder __all__ = \ [ 'DiscriminatorDecoderError', 'UnregisteredDiscriminatorTypeError', 'datetime_decoder', 'discriminator_decoder', ]
/ringcentral_async_client-1.0.3-py3-none-any.whl/ringcentral_async_client/_code_gen/utils.py
0.799442
0.196942
utils.py
pypi
from ._15 import * @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallParkPartyResponseOwner(DataClassJsonMixin): """ Data on a call owner """ account_id: Optional[str] = None """ Internal identifier of an account that monitors a call """ extension_id: Optional[str] = None """ Internal identifier of an extension that monitors a call """ class CallParkPartyResponseDirection(Enum): """ Direction of a call """ Inbound = 'Inbound' Outbound = 'Outbound' class CallParkPartyResponseConferenceRole(Enum): """ A party's role in the conference scenarios. For calls of 'Conference' type only """ Host = 'Host' Participant = 'Participant' class CallParkPartyResponseRingOutRole(Enum): """ A party's role in 'Ring Me'/'RingOut' scenarios. For calls of 'Ringout' type only """ Initiator = 'Initiator' Target = 'Target' class CallParkPartyResponseRingMeRole(Enum): """ A party's role in 'Ring Me'/'RingOut' scenarios. For calls of 'Ringme' type only """ Initiator = 'Initiator' Target = 'Target' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallParkPartyResponseRecordingsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a Recording resource """ active: Optional[bool] = None """ True if the recording is active. False if the recording is paused. """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallParkPartyResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a party """ status: Optional[CallParkPartyResponseStatus] = None """ Status data of a call session """ muted: Optional[bool] = None """ Specifies if a call participant is muted or not. **Note:** If a call is also controlled via Hard phone or RingCentral App (not only through the API by calling call control methods) then it cannot be fully muted/unmuted via API only, in this case the action should be duplicated via Hard phone/RC App interfaces """ stand_alone: Optional[bool] = None """ If 'True' then the party is not connected to a session voice conference, 'False' means the party is connected to other parties in a session """ park: Optional[CallParkPartyResponsePark] = None """ Call park information """ from_: Optional[CallParkPartyResponseFrom] = field(metadata=config(field_name='from'), default=None) """ Data on a calling party """ to: Optional[CallParkPartyResponseTo] = None """ Data on a called party """ owner: Optional[CallParkPartyResponseOwner] = None """ Data on a call owner """ direction: Optional[CallParkPartyResponseDirection] = None """ Direction of a call """ conference_role: Optional[CallParkPartyResponseConferenceRole] = None """ A party's role in the conference scenarios. For calls of 'Conference' type only """ ring_out_role: Optional[CallParkPartyResponseRingOutRole] = None """ A party's role in 'Ring Me'/'RingOut' scenarios. For calls of 'Ringout' type only """ ring_me_role: Optional[CallParkPartyResponseRingMeRole] = None """ A party's role in 'Ring Me'/'RingOut' scenarios. For calls of 'Ringme' type only """ recordings: Optional[List[CallParkPartyResponseRecordingsItem]] = None """ Active recordings list """ class ReadCallPartyStatusResponseStatusCode(Enum): """ Status code of a call """ Setup = 'Setup' Proceeding = 'Proceeding' Answered = 'Answered' Disconnected = 'Disconnected' Gone = 'Gone' Parked = 'Parked' Hold = 'Hold' VoiceMail = 'VoiceMail' FaxReceive = 'FaxReceive' VoiceMailScreening = 'VoiceMailScreening' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadCallPartyStatusResponseStatusPeerId(DataClassJsonMixin): """ Peer session / party data.'Gone'state only """ session_id: Optional[str] = None telephony_session_id: Optional[str] = None party_id: Optional[str] = None class ReadCallPartyStatusResponseStatusReason(Enum): """ Reason of call termination. For 'Disconnected' code only """ Pickup = 'Pickup' Supervising = 'Supervising' TakeOver = 'TakeOver' Timeout = 'Timeout' BlindTransfer = 'BlindTransfer' RccTransfer = 'RccTransfer' AttendedTransfer = 'AttendedTransfer' CallerInputRedirect = 'CallerInputRedirect' CallFlip = 'CallFlip' ParkLocation = 'ParkLocation' DtmfTransfer = 'DtmfTransfer' AgentAnswered = 'AgentAnswered' AgentDropped = 'AgentDropped' Rejected = 'Rejected' Cancelled = 'Cancelled' InternalError = 'InternalError' NoAnswer = 'NoAnswer' TargetBusy = 'TargetBusy' InvalidNumber = 'InvalidNumber' InternationalDisabled = 'InternationalDisabled' DestinationBlocked = 'DestinationBlocked' NotEnoughFunds = 'NotEnoughFunds' NoSuchUser = 'NoSuchUser' CallPark = 'CallPark' CallRedirected = 'CallRedirected' CallReplied = 'CallReplied' CallSwitch = 'CallSwitch' CallFinished = 'CallFinished' CallDropped = 'CallDropped' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadCallPartyStatusResponseStatus(DataClassJsonMixin): """ Status data of a call session """ code: Optional[ReadCallPartyStatusResponseStatusCode] = None """ Status code of a call """ peer_id: Optional[ReadCallPartyStatusResponseStatusPeerId] = None """ Peer session / party data.'Gone'state only """ reason: Optional[ReadCallPartyStatusResponseStatusReason] = None """ Reason of call termination. For 'Disconnected' code only """ description: Optional[str] = None """ Optional message """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadCallPartyStatusResponsePark(DataClassJsonMixin): """ Call park information """ id: Optional[str] = None """ Call park identifier """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadCallPartyStatusResponseFrom(DataClassJsonMixin): """ Data on a calling party """ phone_number: Optional[str] = None """ Phone number of a party """ name: Optional[str] = None """ Displayed name of a party """ device_id: Optional[str] = None """ Internal identifier of a device """ extension_id: Optional[str] = None """ Internal identifier of an extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadCallPartyStatusResponseTo(DataClassJsonMixin): """ Data on a called party """ phone_number: Optional[str] = None """ Phone number of a party """ name: Optional[str] = None """ Displayed name of a party """ device_id: Optional[str] = None """ Internal identifier of a device """ extension_id: Optional[str] = None """ Internal identifier of an extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadCallPartyStatusResponseOwner(DataClassJsonMixin): """ Data on a call owner """ account_id: Optional[str] = None """ Internal identifier of an account that monitors a call """ extension_id: Optional[str] = None """ Internal identifier of an extension that monitors a call """ class ReadCallPartyStatusResponseDirection(Enum): """ Direction of a call """ Inbound = 'Inbound' Outbound = 'Outbound' class ReadCallPartyStatusResponseConferenceRole(Enum): """ A party's role in the conference scenarios. For calls of 'Conference' type only """ Host = 'Host' Participant = 'Participant' class ReadCallPartyStatusResponseRingOutRole(Enum): """ A party's role in 'Ring Me'/'RingOut' scenarios. For calls of 'Ringout' type only """ Initiator = 'Initiator' Target = 'Target' class ReadCallPartyStatusResponseRingMeRole(Enum): """ A party's role in 'Ring Me'/'RingOut' scenarios. For calls of 'Ringme' type only """ Initiator = 'Initiator' Target = 'Target' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadCallPartyStatusResponseRecordingsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a Recording resource """ active: Optional[bool] = None """ True if the recording is active. False if the recording is paused. """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadCallPartyStatusResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a party """ status: Optional[ReadCallPartyStatusResponseStatus] = None """ Status data of a call session """ muted: Optional[bool] = None """ Specifies if a call participant is muted or not. **Note:** If a call is also controlled via Hard phone or RingCentral App (not only through the API by calling call control methods) then it cannot be fully muted/unmuted via API only, in this case the action should be duplicated via Hard phone/RC App interfaces """ stand_alone: Optional[bool] = None """ If 'True' then the party is not connected to a session voice conference, 'False' means the party is connected to other parties in a session """ park: Optional[ReadCallPartyStatusResponsePark] = None """ Call park information """ from_: Optional[ReadCallPartyStatusResponseFrom] = field(metadata=config(field_name='from'), default=None) """ Data on a calling party """ to: Optional[ReadCallPartyStatusResponseTo] = None """ Data on a called party """ owner: Optional[ReadCallPartyStatusResponseOwner] = None """ Data on a call owner """ direction: Optional[ReadCallPartyStatusResponseDirection] = None """ Direction of a call """ conference_role: Optional[ReadCallPartyStatusResponseConferenceRole] = None """ A party's role in the conference scenarios. For calls of 'Conference' type only """ ring_out_role: Optional[ReadCallPartyStatusResponseRingOutRole] = None """ A party's role in 'Ring Me'/'RingOut' scenarios. For calls of 'Ringout' type only """ ring_me_role: Optional[ReadCallPartyStatusResponseRingMeRole] = None """ A party's role in 'Ring Me'/'RingOut' scenarios. For calls of 'Ringme' type only """ recordings: Optional[List[ReadCallPartyStatusResponseRecordingsItem]] = None """ Active recordings list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCallPartyRequestParty(DataClassJsonMixin): """ Party update data """ muted: Optional[bool] = None """ Specifies if a call participant is muted or not. **Note:** If a call is also controlled via Hard phone or RingCentral App (not only through the API by calling call control methods) then it cannot be fully muted/unmuted via API only, in this case the action should be duplicated via Hard phone/RC App interfaces """ stand_alone: Optional[bool] = None """ If 'True' then the party is not connected to a session voice conference, 'False' means the party is connected to other parties in a session """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCallPartyRequest(DataClassJsonMixin): party: Optional[UpdateCallPartyRequestParty] = None """ Party update data """ class UpdateCallPartyResponseStatusCode(Enum): """ Status code of a call """ Setup = 'Setup' Proceeding = 'Proceeding' Answered = 'Answered' Disconnected = 'Disconnected' Gone = 'Gone' Parked = 'Parked' Hold = 'Hold' VoiceMail = 'VoiceMail' FaxReceive = 'FaxReceive' VoiceMailScreening = 'VoiceMailScreening' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCallPartyResponseStatusPeerId(DataClassJsonMixin): """ Peer session / party data.'Gone'state only """ session_id: Optional[str] = None telephony_session_id: Optional[str] = None party_id: Optional[str] = None class UpdateCallPartyResponseStatusReason(Enum): """ Reason of call termination. For 'Disconnected' code only """ Pickup = 'Pickup' Supervising = 'Supervising' TakeOver = 'TakeOver' Timeout = 'Timeout' BlindTransfer = 'BlindTransfer' RccTransfer = 'RccTransfer' AttendedTransfer = 'AttendedTransfer' CallerInputRedirect = 'CallerInputRedirect' CallFlip = 'CallFlip' ParkLocation = 'ParkLocation' DtmfTransfer = 'DtmfTransfer' AgentAnswered = 'AgentAnswered' AgentDropped = 'AgentDropped' Rejected = 'Rejected' Cancelled = 'Cancelled' InternalError = 'InternalError' NoAnswer = 'NoAnswer' TargetBusy = 'TargetBusy' InvalidNumber = 'InvalidNumber' InternationalDisabled = 'InternationalDisabled' DestinationBlocked = 'DestinationBlocked' NotEnoughFunds = 'NotEnoughFunds' NoSuchUser = 'NoSuchUser' CallPark = 'CallPark' CallRedirected = 'CallRedirected' CallReplied = 'CallReplied' CallSwitch = 'CallSwitch' CallFinished = 'CallFinished' CallDropped = 'CallDropped' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCallPartyResponseStatus(DataClassJsonMixin): """ Status data of a call session """ code: Optional[UpdateCallPartyResponseStatusCode] = None """ Status code of a call """ peer_id: Optional[UpdateCallPartyResponseStatusPeerId] = None """ Peer session / party data.'Gone'state only """ reason: Optional[UpdateCallPartyResponseStatusReason] = None """ Reason of call termination. For 'Disconnected' code only """ description: Optional[str] = None """ Optional message """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCallPartyResponsePark(DataClassJsonMixin): """ Call park information """ id: Optional[str] = None """ Call park identifier """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCallPartyResponseFrom(DataClassJsonMixin): """ Data on a calling party """ phone_number: Optional[str] = None """ Phone number of a party """ name: Optional[str] = None """ Displayed name of a party """ device_id: Optional[str] = None """ Internal identifier of a device """ extension_id: Optional[str] = None """ Internal identifier of an extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCallPartyResponseTo(DataClassJsonMixin): """ Data on a called party """ phone_number: Optional[str] = None """ Phone number of a party """ name: Optional[str] = None """ Displayed name of a party """ device_id: Optional[str] = None """ Internal identifier of a device """ extension_id: Optional[str] = None """ Internal identifier of an extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCallPartyResponseOwner(DataClassJsonMixin): """ Data on a call owner """ account_id: Optional[str] = None """ Internal identifier of an account that monitors a call """ extension_id: Optional[str] = None """ Internal identifier of an extension that monitors a call """ class UpdateCallPartyResponseDirection(Enum): """ Direction of a call """ Inbound = 'Inbound' Outbound = 'Outbound' class UpdateCallPartyResponseConferenceRole(Enum): """ A party's role in the conference scenarios. For calls of 'Conference' type only """ Host = 'Host' Participant = 'Participant' class UpdateCallPartyResponseRingOutRole(Enum): """ A party's role in 'Ring Me'/'RingOut' scenarios. For calls of 'Ringout' type only """ Initiator = 'Initiator' Target = 'Target' class UpdateCallPartyResponseRingMeRole(Enum): """ A party's role in 'Ring Me'/'RingOut' scenarios. For calls of 'Ringme' type only """ Initiator = 'Initiator' Target = 'Target' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCallPartyResponseRecordingsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a Recording resource """ active: Optional[bool] = None """ True if the recording is active. False if the recording is paused. """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCallPartyResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a party """ status: Optional[UpdateCallPartyResponseStatus] = None """ Status data of a call session """ muted: Optional[bool] = None """ Specifies if a call participant is muted or not. **Note:** If a call is also controlled via Hard phone or RingCentral App (not only through the API by calling call control methods) then it cannot be fully muted/unmuted via API only, in this case the action should be duplicated via Hard phone/RC App interfaces """ stand_alone: Optional[bool] = None """ If 'True' then the party is not connected to a session voice conference, 'False' means the party is connected to other parties in a session """ park: Optional[UpdateCallPartyResponsePark] = None """ Call park information """ from_: Optional[UpdateCallPartyResponseFrom] = field(metadata=config(field_name='from'), default=None) """ Data on a calling party """ to: Optional[UpdateCallPartyResponseTo] = None """ Data on a called party """ owner: Optional[UpdateCallPartyResponseOwner] = None """ Data on a call owner """ direction: Optional[UpdateCallPartyResponseDirection] = None """ Direction of a call """ conference_role: Optional[UpdateCallPartyResponseConferenceRole] = None """ A party's role in the conference scenarios. For calls of 'Conference' type only """ ring_out_role: Optional[UpdateCallPartyResponseRingOutRole] = None """ A party's role in 'Ring Me'/'RingOut' scenarios. For calls of 'Ringout' type only """ ring_me_role: Optional[UpdateCallPartyResponseRingMeRole] = None """ A party's role in 'Ring Me'/'RingOut' scenarios. For calls of 'Ringme' type only """ recordings: Optional[List[UpdateCallPartyResponseRecordingsItem]] = None """ Active recordings list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class PauseResumeCallRecordingRequest(DataClassJsonMixin): active: Optional[bool] = None """ Recording status """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class PauseResumeCallRecordingResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a call recording """ active: Optional[bool] = None """ Call recording status """ class SuperviseCallSessionRequestMode(Enum): """ Supervising mode Example: `Listen` Generated by Python OpenAPI Parser """ Listen = 'Listen' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SuperviseCallSessionRequest(DataClassJsonMixin): """ Required Properties: - mode - supervisor_device_id Generated by Python OpenAPI Parser """ mode: SuperviseCallSessionRequestMode """ Supervising mode Example: `Listen` """ supervisor_device_id: str """ Internal identifier of a supervisor's device which will be used for call session monitoring Example: `191888004` """ agent_extension_number: Optional[str] = None """ Extension number of the user that will be monitored Example: `105` """ agent_extension_id: Optional[str] = None """ Extension identifier of the user that will be monitored Example: `400378008008` """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SuperviseCallSessionResponseFrom(DataClassJsonMixin): """ Information about a call party that monitors a call """ phone_number: Optional[str] = None """ Phone number of a party """ name: Optional[str] = None """ Displayed name of a party """ device_id: Optional[str] = None """ Internal identifier of a device """ extension_id: Optional[str] = None """ Internal identifier of an extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SuperviseCallSessionResponseTo(DataClassJsonMixin): """ Information about a call party that is monitored """ phone_number: Optional[str] = None """ Phone number of a party """ name: Optional[str] = None """ Displayed name of a party """ device_id: Optional[str] = None """ Internal identifier of a device """ extension_id: Optional[str] = None """ Internal identifier of an extension """ class SuperviseCallSessionResponseDirection(Enum): """ Direction of a call """ Outbound = 'Outbound' Inbound = 'Inbound' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SuperviseCallSessionResponseOwner(DataClassJsonMixin): """ Data on a call owner """ account_id: Optional[str] = None """ Internal identifier of an account that monitors a call """ extension_id: Optional[str] = None """ Internal identifier of an extension that monitors a call """ class SuperviseCallSessionResponseStatusCode(Enum): """ Status code of a call """ Setup = 'Setup' Proceeding = 'Proceeding' Answered = 'Answered' Disconnected = 'Disconnected' Gone = 'Gone' Parked = 'Parked' Hold = 'Hold' VoiceMail = 'VoiceMail' FaxReceive = 'FaxReceive' VoiceMailScreening = 'VoiceMailScreening' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SuperviseCallSessionResponseStatusPeerId(DataClassJsonMixin): """ Peer session / party data.'Gone'state only """ session_id: Optional[str] = None telephony_session_id: Optional[str] = None party_id: Optional[str] = None class SuperviseCallSessionResponseStatusReason(Enum): """ Reason of call termination. For 'Disconnected' code only """ Pickup = 'Pickup' Supervising = 'Supervising' TakeOver = 'TakeOver' Timeout = 'Timeout' BlindTransfer = 'BlindTransfer' RccTransfer = 'RccTransfer' AttendedTransfer = 'AttendedTransfer' CallerInputRedirect = 'CallerInputRedirect' CallFlip = 'CallFlip' ParkLocation = 'ParkLocation' DtmfTransfer = 'DtmfTransfer' AgentAnswered = 'AgentAnswered' AgentDropped = 'AgentDropped' Rejected = 'Rejected' Cancelled = 'Cancelled' InternalError = 'InternalError' NoAnswer = 'NoAnswer' TargetBusy = 'TargetBusy' InvalidNumber = 'InvalidNumber' InternationalDisabled = 'InternationalDisabled' DestinationBlocked = 'DestinationBlocked' NotEnoughFunds = 'NotEnoughFunds' NoSuchUser = 'NoSuchUser' CallPark = 'CallPark' CallRedirected = 'CallRedirected' CallReplied = 'CallReplied' CallSwitch = 'CallSwitch' CallFinished = 'CallFinished' CallDropped = 'CallDropped' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SuperviseCallSessionResponseStatus(DataClassJsonMixin): code: Optional[SuperviseCallSessionResponseStatusCode] = None """ Status code of a call """ peer_id: Optional[SuperviseCallSessionResponseStatusPeerId] = None """ Peer session / party data.'Gone'state only """ reason: Optional[SuperviseCallSessionResponseStatusReason] = None """ Reason of call termination. For 'Disconnected' code only """ description: Optional[str] = None """ Optional message """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SuperviseCallSessionResponse(DataClassJsonMixin): from_: Optional[SuperviseCallSessionResponseFrom] = field(metadata=config(field_name='from'), default=None) """ Information about a call party that monitors a call """ to: Optional[SuperviseCallSessionResponseTo] = None """ Information about a call party that is monitored """ direction: Optional[SuperviseCallSessionResponseDirection] = None """ Direction of a call """ id: Optional[str] = None """ Internal identifier of a party that monitors a call """ account_id: Optional[str] = None """ Internal identifier of an account that monitors a call """ extension_id: Optional[str] = None """ Internal identifier of an extension that monitors a call """ muted: Optional[bool] = None """ Specifies if a call participant is muted or not. **Note:** If a call is also controlled via Hard phone or RingCentral App (not only through the API by calling call control methods) then it cannot be fully muted/unmuted via API only, in this case the action should be duplicated via Hard phone/RC App interfaces """ owner: Optional[SuperviseCallSessionResponseOwner] = None """ Data on a call owner """ stand_alone: Optional[bool] = None """ If 'True' then the party is not connected to a session voice conference, 'False' means the party is connected to other parties in a session """ status: Optional[SuperviseCallSessionResponseStatus] = None class SuperviseCallPartyRequestMode(Enum): """ Supervising mode Example: `Listen` Generated by Python OpenAPI Parser """ Listen = 'Listen' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SuperviseCallPartyRequest(DataClassJsonMixin): """ Required Properties: - mode - supervisor_device_id - agent_extension_id Generated by Python OpenAPI Parser """ mode: SuperviseCallPartyRequestMode """ Supervising mode Example: `Listen` """ supervisor_device_id: str """ Internal identifier of a supervisor's device Example: `191888004` """ agent_extension_id: str """ Mailbox ID of a user that will be monitored Example: `400378008008` """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SuperviseCallPartyResponseFrom(DataClassJsonMixin): """ Information about a call party that monitors a call """ phone_number: Optional[str] = None """ Phone number of a party """ name: Optional[str] = None """ Displayed name of a party """ device_id: Optional[str] = None """ Internal identifier of a device """ extension_id: Optional[str] = None """ Internal identifier of an extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SuperviseCallPartyResponseTo(DataClassJsonMixin): """ Information about a call party that is monitored """ phone_number: Optional[str] = None """ Phone number of a party """ name: Optional[str] = None """ Displayed name of a party """ device_id: Optional[str] = None """ Internal identifier of a device """ extension_id: Optional[str] = None """ Internal identifier of an extension """ class SuperviseCallPartyResponseDirection(Enum): """ Direction of a call """ Outbound = 'Outbound' Inbound = 'Inbound' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SuperviseCallPartyResponseOwner(DataClassJsonMixin): """ Deprecated. Infromation a call owner """ account_id: Optional[str] = None """ Internal identifier of an account that monitors a call """ extension_id: Optional[str] = None """ Internal identifier of an extension that monitors a call """ class SuperviseCallPartyResponseStatusCode(Enum): """ Status code of a call """ Setup = 'Setup' Proceeding = 'Proceeding' Answered = 'Answered' Disconnected = 'Disconnected' Gone = 'Gone' Parked = 'Parked' Hold = 'Hold' VoiceMail = 'VoiceMail' FaxReceive = 'FaxReceive' VoiceMailScreening = 'VoiceMailScreening' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SuperviseCallPartyResponseStatusPeerId(DataClassJsonMixin): """ Peer session / party data.'Gone'state only """ session_id: Optional[str] = None telephony_session_id: Optional[str] = None party_id: Optional[str] = None class SuperviseCallPartyResponseStatusReason(Enum): """ Reason of call termination. For 'Disconnected' code only """ Pickup = 'Pickup' Supervising = 'Supervising' TakeOver = 'TakeOver' Timeout = 'Timeout' BlindTransfer = 'BlindTransfer' RccTransfer = 'RccTransfer' AttendedTransfer = 'AttendedTransfer' CallerInputRedirect = 'CallerInputRedirect' CallFlip = 'CallFlip' ParkLocation = 'ParkLocation' DtmfTransfer = 'DtmfTransfer' AgentAnswered = 'AgentAnswered' AgentDropped = 'AgentDropped' Rejected = 'Rejected' Cancelled = 'Cancelled' InternalError = 'InternalError' NoAnswer = 'NoAnswer' TargetBusy = 'TargetBusy' InvalidNumber = 'InvalidNumber' InternationalDisabled = 'InternationalDisabled' DestinationBlocked = 'DestinationBlocked' NotEnoughFunds = 'NotEnoughFunds' NoSuchUser = 'NoSuchUser' CallPark = 'CallPark' CallRedirected = 'CallRedirected' CallReplied = 'CallReplied' CallSwitch = 'CallSwitch' CallFinished = 'CallFinished' CallDropped = 'CallDropped' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SuperviseCallPartyResponseStatus(DataClassJsonMixin): code: Optional[SuperviseCallPartyResponseStatusCode] = None """ Status code of a call """ peer_id: Optional[SuperviseCallPartyResponseStatusPeerId] = None """ Peer session / party data.'Gone'state only """ reason: Optional[SuperviseCallPartyResponseStatusReason] = None """ Reason of call termination. For 'Disconnected' code only """ description: Optional[str] = None """ Optional message """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SuperviseCallPartyResponse(DataClassJsonMixin): from_: Optional[SuperviseCallPartyResponseFrom] = field(metadata=config(field_name='from'), default=None) """ Information about a call party that monitors a call """ to: Optional[SuperviseCallPartyResponseTo] = None """ Information about a call party that is monitored """ direction: Optional[SuperviseCallPartyResponseDirection] = None """ Direction of a call """ id: Optional[str] = None """ Internal identifier of a party that monitors a call """ account_id: Optional[str] = None """ Internal identifier of an account that monitors a call """ extension_id: Optional[str] = None """ Internal identifier of an extension that monitors a call """ muted: Optional[bool] = None """ Specifies if a call party is muted """ owner: Optional[SuperviseCallPartyResponseOwner] = None """ Deprecated. Infromation a call owner """ stand_alone: Optional[bool] = None """ Specifies if a device is stand-alone """ status: Optional[SuperviseCallPartyResponseStatus] = None class ListDataExportTasksStatus(Enum): Accepted = 'Accepted' InProgress = 'InProgress' Completed = 'Completed' Failed = 'Failed' Expired = 'Expired' class ListDataExportTasksResponseTasksItemStatus(Enum): """ Task status """ Accepted = 'Accepted' InProgress = 'InProgress' Completed = 'Completed' Failed = 'Failed' Expired = 'Expired' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListDataExportTasksResponseTasksItemCreator(DataClassJsonMixin): """ Task creator information """ id: Optional[str] = None """ Internal identifier of a user who created a note/task """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListDataExportTasksResponseTasksItemSpecificContactsItem(DataClassJsonMixin): """ List of users whose data is collected. The following data is exported: posts, tasks, events, etc. posted by the user(s); posts addressing the user(s) via direct and @Mentions; tasks assigned to the listed user(s) Generated by Python OpenAPI Parser """ id: Optional[str] = None """ Internal identifier of a contact """ email: Optional[str] = None """ Email address of a contact """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListDataExportTasksResponseTasksItemSpecific(DataClassJsonMixin): """ Information specififed in request """ time_from: Optional[str] = None """ Starting time for data collection """ time_to: Optional[str] = None """ Ending time for data collection """ contacts: Optional[List[ListDataExportTasksResponseTasksItemSpecificContactsItem]] = None chat_ids: Optional[List[str]] = None """ List of chats from which the data (posts, files, tasks, events, notes, etc.) will be collected """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListDataExportTasksResponseTasksItemDatasetsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a dataset """ uri: Optional[str] = None """ Link for downloading a dataset """ size: Optional[int] = None """ Size of ta dataset in bytes """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListDataExportTasksResponseTasksItem(DataClassJsonMixin): uri: Optional[str] = None """ Canonical URI of a task """ id: Optional[str] = None """ Internal identifier of a task """ creation_time: Optional[str] = None """ Task creation datetime """ last_modified_time: Optional[str] = None """ Task last modification datetime """ status: Optional[ListDataExportTasksResponseTasksItemStatus] = None """ Task status """ creator: Optional[ListDataExportTasksResponseTasksItemCreator] = None """ Task creator information """ specific: Optional[ListDataExportTasksResponseTasksItemSpecific] = None """ Information specififed in request """ datasets: Optional[List[ListDataExportTasksResponseTasksItemDatasetsItem]] = None """ Data collection sets. Returned by task ID """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListDataExportTasksResponseNavigationFirstPage(DataClassJsonMixin): """ Canonical URI for the first page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListDataExportTasksResponseNavigationNextPage(DataClassJsonMixin): """ Canonical URI for the next page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListDataExportTasksResponseNavigationPreviousPage(DataClassJsonMixin): """ Canonical URI for the previous page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListDataExportTasksResponseNavigationLastPage(DataClassJsonMixin): """ Canonical URI for the last page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListDataExportTasksResponseNavigation(DataClassJsonMixin): first_page: Optional[ListDataExportTasksResponseNavigationFirstPage] = None """ Canonical URI for the first page of the list """ next_page: Optional[ListDataExportTasksResponseNavigationNextPage] = None """ Canonical URI for the next page of the list """ previous_page: Optional[ListDataExportTasksResponseNavigationPreviousPage] = None """ Canonical URI for the previous page of the list """ last_page: Optional[ListDataExportTasksResponseNavigationLastPage] = None """ Canonical URI for the last page of the list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListDataExportTasksResponsePaging(DataClassJsonMixin): page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) """ per_page: Optional[int] = None """ Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty """ total_pages: Optional[int] = None """ The total number of pages in a dataset. May be omitted for some resources due to performance reasons """ total_elements: Optional[int] = None """ The total number of elements in a dataset. May be omitted for some resource due to performance reasons """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListDataExportTasksResponse(DataClassJsonMixin): tasks: Optional[List[ListDataExportTasksResponseTasksItem]] = None navigation: Optional[ListDataExportTasksResponseNavigation] = None paging: Optional[ListDataExportTasksResponsePaging] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateDataExportTaskRequestContactsItem(DataClassJsonMixin): """ List of users whose data is collected. The following data will be exported: posts, tasks, events, etc. posted by the user(s); posts addressing the user(s) via direct and @Mentions; tasks assigned to the listed user(s). The list of 10 users per request is supported. Generated by Python OpenAPI Parser """ id: Optional[str] = None """ Internal identifier of a contact """ email: Optional[str] = None """ Email address of a contact """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateDataExportTaskRequest(DataClassJsonMixin): time_from: Optional[str] = None """ Starting time for data collection. The default value is `timeTo` minus 24 hours. Max allowed time frame between `timeFrom` and `timeTo` is 6 months """ time_to: Optional[str] = None """ Ending time for data collection. The default value is current time. Max allowed time frame between `timeFrom` and `timeTo` is 6 months """ contacts: Optional[List[CreateDataExportTaskRequestContactsItem]] = None chat_ids: Optional[List[str]] = None """ List of chats from which the data (posts, files, tasks, events, notes, etc.) will be collected. Maximum number of chats supported is 10 """ class CreateDataExportTaskResponseStatus(Enum): """ Task status """ Accepted = 'Accepted' InProgress = 'InProgress' Completed = 'Completed' Failed = 'Failed' Expired = 'Expired' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateDataExportTaskResponseCreator(DataClassJsonMixin): """ Task creator information """ id: Optional[str] = None """ Internal identifier of a user who created a note/task """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateDataExportTaskResponseSpecificContactsItem(DataClassJsonMixin): """ List of users whose data is collected. The following data is exported: posts, tasks, events, etc. posted by the user(s); posts addressing the user(s) via direct and @Mentions; tasks assigned to the listed user(s) Generated by Python OpenAPI Parser """ id: Optional[str] = None """ Internal identifier of a contact """ email: Optional[str] = None """ Email address of a contact """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateDataExportTaskResponseSpecific(DataClassJsonMixin): """ Information specififed in request """ time_from: Optional[str] = None """ Starting time for data collection """ time_to: Optional[str] = None """ Ending time for data collection """ contacts: Optional[List[CreateDataExportTaskResponseSpecificContactsItem]] = None chat_ids: Optional[List[str]] = None """ List of chats from which the data (posts, files, tasks, events, notes, etc.) will be collected """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateDataExportTaskResponseDatasetsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a dataset """ uri: Optional[str] = None """ Link for downloading a dataset """ size: Optional[int] = None """ Size of ta dataset in bytes """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateDataExportTaskResponse(DataClassJsonMixin): uri: Optional[str] = None """ Canonical URI of a task """ id: Optional[str] = None """ Internal identifier of a task """ creation_time: Optional[str] = None """ Task creation datetime """ last_modified_time: Optional[str] = None """ Task last modification datetime """ status: Optional[CreateDataExportTaskResponseStatus] = None """ Task status """ creator: Optional[CreateDataExportTaskResponseCreator] = None """ Task creator information """ specific: Optional[CreateDataExportTaskResponseSpecific] = None """ Information specififed in request """ datasets: Optional[List[CreateDataExportTaskResponseDatasetsItem]] = None """ Data collection sets. Returned by task ID """ class ReadDataExportTaskResponseStatus(Enum): """ Task status """ Accepted = 'Accepted' InProgress = 'InProgress' Completed = 'Completed' Failed = 'Failed' Expired = 'Expired' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadDataExportTaskResponseCreator(DataClassJsonMixin): """ Task creator information """ id: Optional[str] = None """ Internal identifier of a user who created a note/task """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadDataExportTaskResponseSpecificContactsItem(DataClassJsonMixin): """ List of users whose data is collected. The following data is exported: posts, tasks, events, etc. posted by the user(s); posts addressing the user(s) via direct and @Mentions; tasks assigned to the listed user(s) Generated by Python OpenAPI Parser """ id: Optional[str] = None """ Internal identifier of a contact """ email: Optional[str] = None """ Email address of a contact """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadDataExportTaskResponseSpecific(DataClassJsonMixin): """ Information specififed in request """ time_from: Optional[str] = None """ Starting time for data collection """ time_to: Optional[str] = None """ Ending time for data collection """ contacts: Optional[List[ReadDataExportTaskResponseSpecificContactsItem]] = None chat_ids: Optional[List[str]] = None """ List of chats from which the data (posts, files, tasks, events, notes, etc.) will be collected """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadDataExportTaskResponseDatasetsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a dataset """ uri: Optional[str] = None """ Link for downloading a dataset """ size: Optional[int] = None """ Size of ta dataset in bytes """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadDataExportTaskResponse(DataClassJsonMixin): uri: Optional[str] = None """ Canonical URI of a task """ id: Optional[str] = None """ Internal identifier of a task """ creation_time: Optional[str] = None """ Task creation datetime """ last_modified_time: Optional[str] = None """ Task last modification datetime """ status: Optional[ReadDataExportTaskResponseStatus] = None """ Task status """ creator: Optional[ReadDataExportTaskResponseCreator] = None """ Task creator information """ specific: Optional[ReadDataExportTaskResponseSpecific] = None """ Information specififed in request """ datasets: Optional[List[ReadDataExportTaskResponseDatasetsItem]] = None """ Data collection sets. Returned by task ID """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateMessageStoreReportRequest(DataClassJsonMixin): date_from: Optional[str] = None """ Starting time for collecting messages. The default value equals to the current time minus 24 hours """ date_to: Optional[str] = None """ Ending time for collecting messages. The default value is the current time """ class CreateMessageStoreReportResponseStatus(Enum): """ Status of a message store report task """ Accepted = 'Accepted' Pending = 'Pending' InProgress = 'InProgress' AttemptFailed = 'AttemptFailed' Failed = 'Failed' Completed = 'Completed' Cancelled = 'Cancelled' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateMessageStoreReportResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a message store report task """ uri: Optional[str] = None """ Link to a task """ status: Optional[CreateMessageStoreReportResponseStatus] = None """ Status of a message store report task """ account_id: Optional[str] = None """ Internal identifier of an account """ extension_id: Optional[str] = None """ Internal identifier of an extension """ creation_time: Optional[str] = None """ Task creation time """ last_modified_time: Optional[str] = None """ Time of the last task modification """ date_to: Optional[str] = None """ Ending time for collecting messages """ date_from: Optional[str] = None """ Starting time for collecting messages """ class ReadMessageStoreReportTaskResponseStatus(Enum): """ Status of a message store report task """ Accepted = 'Accepted' Pending = 'Pending' InProgress = 'InProgress' AttemptFailed = 'AttemptFailed' Failed = 'Failed' Completed = 'Completed' Cancelled = 'Cancelled' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadMessageStoreReportTaskResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a message store report task """ uri: Optional[str] = None """ Link to a task """ status: Optional[ReadMessageStoreReportTaskResponseStatus] = None """ Status of a message store report task """ account_id: Optional[str] = None """ Internal identifier of an account """ extension_id: Optional[str] = None """ Internal identifier of an extension """ creation_time: Optional[str] = None """ Task creation time """ last_modified_time: Optional[str] = None """ Time of the last task modification """ date_to: Optional[str] = None """ Ending time for collecting messages """ date_from: Optional[str] = None """ Starting time for collecting messages """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadMessageStoreReportArchiveResponseRecordsItem(DataClassJsonMixin): size: Optional[int] = None """ Archive size in bytes """ uri: Optional[str] = None """ Link for archive download """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadMessageStoreReportArchiveResponse(DataClassJsonMixin): records: Optional[List[ReadMessageStoreReportArchiveResponseRecordsItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAccountMeetingRecordingsResponseRecordsItemMeeting(DataClassJsonMixin): id: Optional[str] = None topic: Optional[str] = None start_time: Optional[str] = None class ListAccountMeetingRecordingsResponseRecordsItemRecordingItemContentType(Enum): VideoMp4 = 'video/mp4' AudioM4a = 'audio/m4a' TextVtt = 'text/vtt' class ListAccountMeetingRecordingsResponseRecordsItemRecordingItemStatus(Enum): Completed = 'Completed' Processing = 'Processing' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAccountMeetingRecordingsResponseRecordsItemRecordingItem(DataClassJsonMixin): id: Optional[str] = None content_download_uri: Optional[str] = None content_type: Optional[ListAccountMeetingRecordingsResponseRecordsItemRecordingItemContentType] = None size: Optional[int] = None start_time: Optional[str] = None """ Starting time of a recording """ end_time: Optional[str] = None """ Ending time of a recording """ status: Optional[ListAccountMeetingRecordingsResponseRecordsItemRecordingItemStatus] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAccountMeetingRecordingsResponseRecordsItem(DataClassJsonMixin): meeting: Optional[ListAccountMeetingRecordingsResponseRecordsItemMeeting] = None recording: Optional[List[ListAccountMeetingRecordingsResponseRecordsItemRecordingItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAccountMeetingRecordingsResponsePaging(DataClassJsonMixin): page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) """ per_page: Optional[int] = None """ Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty """ total_pages: Optional[int] = None """ The total number of pages in a dataset. May be omitted for some resources due to performance reasons """ total_elements: Optional[int] = None """ The total number of elements in a dataset. May be omitted for some resource due to performance reasons """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAccountMeetingRecordingsResponseNavigationFirstPage(DataClassJsonMixin): """ Canonical URI for the first page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAccountMeetingRecordingsResponseNavigationNextPage(DataClassJsonMixin): """ Canonical URI for the next page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAccountMeetingRecordingsResponseNavigationPreviousPage(DataClassJsonMixin): """ Canonical URI for the previous page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAccountMeetingRecordingsResponseNavigationLastPage(DataClassJsonMixin): """ Canonical URI for the last page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAccountMeetingRecordingsResponseNavigation(DataClassJsonMixin): first_page: Optional[ListAccountMeetingRecordingsResponseNavigationFirstPage] = None """ Canonical URI for the first page of the list """ next_page: Optional[ListAccountMeetingRecordingsResponseNavigationNextPage] = None """ Canonical URI for the next page of the list """ previous_page: Optional[ListAccountMeetingRecordingsResponseNavigationPreviousPage] = None """ Canonical URI for the previous page of the list """ last_page: Optional[ListAccountMeetingRecordingsResponseNavigationLastPage] = None """ Canonical URI for the last page of the list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAccountMeetingRecordingsResponse(DataClassJsonMixin): records: Optional[List[ListAccountMeetingRecordingsResponseRecordsItem]] = None paging: Optional[ListAccountMeetingRecordingsResponsePaging] = None navigation: Optional[ListAccountMeetingRecordingsResponseNavigation] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListUserMeetingRecordingsResponseRecordsItemMeeting(DataClassJsonMixin): id: Optional[str] = None topic: Optional[str] = None start_time: Optional[str] = None class ListUserMeetingRecordingsResponseRecordsItemRecordingItemContentType(Enum): VideoMp4 = 'video/mp4' AudioM4a = 'audio/m4a' TextVtt = 'text/vtt' class ListUserMeetingRecordingsResponseRecordsItemRecordingItemStatus(Enum): Completed = 'Completed' Processing = 'Processing' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListUserMeetingRecordingsResponseRecordsItemRecordingItem(DataClassJsonMixin): id: Optional[str] = None content_download_uri: Optional[str] = None content_type: Optional[ListUserMeetingRecordingsResponseRecordsItemRecordingItemContentType] = None size: Optional[int] = None start_time: Optional[str] = None """ Starting time of a recording """ end_time: Optional[str] = None """ Ending time of a recording """ status: Optional[ListUserMeetingRecordingsResponseRecordsItemRecordingItemStatus] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListUserMeetingRecordingsResponseRecordsItem(DataClassJsonMixin): meeting: Optional[ListUserMeetingRecordingsResponseRecordsItemMeeting] = None recording: Optional[List[ListUserMeetingRecordingsResponseRecordsItemRecordingItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListUserMeetingRecordingsResponsePaging(DataClassJsonMixin): page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) """ per_page: Optional[int] = None """ Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty """ total_pages: Optional[int] = None """ The total number of pages in a dataset. May be omitted for some resources due to performance reasons """ total_elements: Optional[int] = None """ The total number of elements in a dataset. May be omitted for some resource due to performance reasons """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListUserMeetingRecordingsResponseNavigationFirstPage(DataClassJsonMixin): """ Canonical URI for the first page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListUserMeetingRecordingsResponseNavigationNextPage(DataClassJsonMixin): """ Canonical URI for the next page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListUserMeetingRecordingsResponseNavigationPreviousPage(DataClassJsonMixin): """ Canonical URI for the previous page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListUserMeetingRecordingsResponseNavigationLastPage(DataClassJsonMixin): """ Canonical URI for the last page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListUserMeetingRecordingsResponseNavigation(DataClassJsonMixin): first_page: Optional[ListUserMeetingRecordingsResponseNavigationFirstPage] = None """ Canonical URI for the first page of the list """ next_page: Optional[ListUserMeetingRecordingsResponseNavigationNextPage] = None """ Canonical URI for the next page of the list """ previous_page: Optional[ListUserMeetingRecordingsResponseNavigationPreviousPage] = None """ Canonical URI for the previous page of the list """ last_page: Optional[ListUserMeetingRecordingsResponseNavigationLastPage] = None """ Canonical URI for the last page of the list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListUserMeetingRecordingsResponse(DataClassJsonMixin): records: Optional[List[ListUserMeetingRecordingsResponseRecordsItem]] = None paging: Optional[ListUserMeetingRecordingsResponsePaging] = None navigation: Optional[ListUserMeetingRecordingsResponseNavigation] = None class ListCustomFieldsResponseRecordsItemCategory(Enum): """ Object category to attach custom fields """ User = 'User' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCustomFieldsResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Custom field identifier """ category: Optional[ListCustomFieldsResponseRecordsItemCategory] = None """ Object category to attach custom fields """ display_name: Optional[str] = None """ Custom field display name """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCustomFieldsResponse(DataClassJsonMixin): records: Optional[List[ListCustomFieldsResponseRecordsItem]] = None class CreateCustomFieldRequestCategory(Enum): """ Object category to attach custom fields """ User = 'User' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateCustomFieldRequest(DataClassJsonMixin): category: Optional[CreateCustomFieldRequestCategory] = None """ Object category to attach custom fields """ display_name: Optional[str] = None """ Custom field display name """ class CreateCustomFieldResponseCategory(Enum): """ Object category to attach custom fields """ User = 'User' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateCustomFieldResponse(DataClassJsonMixin): id: Optional[str] = None """ Custom field identifier """ category: Optional[CreateCustomFieldResponseCategory] = None """ Object category to attach custom fields """ display_name: Optional[str] = None """ Custom field display name """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCustomFieldRequest(DataClassJsonMixin): display_name: Optional[str] = None """ Custom field display name """ class UpdateCustomFieldResponseCategory(Enum): """ Object category to attach custom fields """ User = 'User' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCustomFieldResponse(DataClassJsonMixin): id: Optional[str] = None """ Custom field identifier """ category: Optional[UpdateCustomFieldResponseCategory] = None """ Object category to attach custom fields """ display_name: Optional[str] = None """ Custom field display name """ __all__ = \ [ 'AccountBusinessAddressResource', 'AccountCallLogResponse', 'AccountCallLogSyncResponse', 'AccountCallLogSyncResponseSyncInfo', 'AccountCallLogSyncResponseSyncInfoSyncType', 'AccountDeviceUpdate', 'AccountDeviceUpdateEmergencyServiceAddress', 'AccountDeviceUpdateExtension', 'AccountDeviceUpdatePhoneLines', 'AccountDeviceUpdatePhoneLinesPhoneLinesItem', 'AccountLockedSettingResponse', 'AccountPhoneNumbers', 'AccountPresenceInfo', 'AccountPresenceInfoNavigation', 'AccountPresenceInfoNavigationFirstPage', 'AccountPresenceInfoPaging', 'AddBlockedAllowedPhoneNumber', 'AddBlockedAllowedPhoneNumberStatus', 'AddGlipTeamMembersRequest', 'AddGlipTeamMembersRequestMembersItem', 'AddressBookSync', 'AddressBookSyncSyncInfo', 'AddressBookSyncSyncInfoSyncType', 'AnswerCallPartyRequest', 'AnswerCallPartyResponse', 'AnswerCallPartyResponseConferenceRole', 'AnswerCallPartyResponseDirection', 'AnswerCallPartyResponseFrom', 'AnswerCallPartyResponseOwner', 'AnswerCallPartyResponsePark', 'AnswerCallPartyResponseRecordingsItem', 'AnswerCallPartyResponseRingMeRole', 'AnswerCallPartyResponseRingOutRole', 'AnswerCallPartyResponseStatus', 'AnswerCallPartyResponseStatusCode', 'AnswerCallPartyResponseStatusPeerId', 'AnswerCallPartyResponseStatusReason', 'AnswerCallPartyResponseTo', 'AnswerTarget', 'AnsweringRuleInfo', 'AnsweringRuleInfoCallHandlingAction', 'AnsweringRuleInfoCalledNumbersItem', 'AnsweringRuleInfoCallersItem', 'AnsweringRuleInfoForwarding', 'AnsweringRuleInfoForwardingRingingMode', 'AnsweringRuleInfoForwardingRulesItem', 'AnsweringRuleInfoForwardingRulesItemForwardingNumbersItem', 'AnsweringRuleInfoForwardingRulesItemForwardingNumbersItemLabel', 'AnsweringRuleInfoForwardingRulesItemForwardingNumbersItemType', 'AnsweringRuleInfoGreetingsItem', 'AnsweringRuleInfoGreetingsItemCustom', 'AnsweringRuleInfoGreetingsItemPreset', 'AnsweringRuleInfoGreetingsItemType', 'AnsweringRuleInfoGreetingsItemUsageType', 'AnsweringRuleInfoQueue', 'AnsweringRuleInfoQueueFixedOrderAgentsItem', 'AnsweringRuleInfoQueueFixedOrderAgentsItemExtension', 'AnsweringRuleInfoQueueHoldAudioInterruptionMode', 'AnsweringRuleInfoQueueHoldTimeExpirationAction', 'AnsweringRuleInfoQueueMaxCallersAction', 'AnsweringRuleInfoQueueNoAnswerAction', 'AnsweringRuleInfoQueueTransferItem', 'AnsweringRuleInfoQueueTransferItemAction', 'AnsweringRuleInfoQueueTransferItemExtension', 'AnsweringRuleInfoQueueTransferMode', 'AnsweringRuleInfoSchedule', 'AnsweringRuleInfoScheduleRangesItem', 'AnsweringRuleInfoScheduleRef', 'AnsweringRuleInfoScheduleWeeklyRanges', 'AnsweringRuleInfoScheduleWeeklyRangesMondayItem', 'AnsweringRuleInfoScreening', 'AnsweringRuleInfoSharedLines', 'AnsweringRuleInfoTransfer', 'AnsweringRuleInfoTransferExtension', 'AnsweringRuleInfoType', 'AnsweringRuleInfoUnconditionalForwarding', 'AnsweringRuleInfoUnconditionalForwardingAction', 'AnsweringRuleInfoVoicemail', 'AnsweringRuleInfoVoicemailRecipient', 'AssignGlipGroupMembersRequest', 'AssignGlipGroupMembersResponse', 'AssignGlipGroupMembersResponseType', 'AssignMultipleAutomaticaLocationUpdatesUsersRequest', 'AssignMultipleCallQueueMembersRequest', 'AssignMultipleDepartmentMembersRequest', 'AssignMultipleDepartmentMembersRequestItemsItem', 'AssignMultipleDevicesAutomaticLocationUpdates', 'AssignMultipleDevicesAutomaticLocationUpdatesRequest', 'AssignMultiplePagingGroupUsersDevicesRequest', 'AssistantsResource', 'AssistantsResourceRecordsItem', 'AssistedUsersResource', 'AssistedUsersResourceRecordsItem', 'AuthProfileCheckResource', 'AuthProfileResource', 'AuthProfileResourcePermissionsItem', 'AuthProfileResourcePermissionsItemEffectiveRole', 'AuthProfileResourcePermissionsItemPermission', 'AuthProfileResourcePermissionsItemPermissionSiteCompatible', 'AuthProfileResourcePermissionsItemScopesItem', 'AutomaticLocationUpdatesTaskInfo', 'AutomaticLocationUpdatesTaskInfoResult', 'AutomaticLocationUpdatesTaskInfoResultRecordsItem', 'AutomaticLocationUpdatesTaskInfoResultRecordsItemErrorsItem', 'AutomaticLocationUpdatesTaskInfoStatus', 'AutomaticLocationUpdatesTaskInfoType', 'AutomaticLocationUpdatesUserList', 'AutomaticLocationUpdatesUserListRecordsItem', 'AutomaticLocationUpdatesUserListRecordsItemType', 'BlockedAllowedPhoneNumbersList', 'BlockedAllowedPhoneNumbersListRecordsItem', 'BlockedAllowedPhoneNumbersListRecordsItemStatus', 'BridgeCallPartyRequest', 'BridgeCallPartyResponse', 'BridgeCallPartyResponseConferenceRole', 'BridgeCallPartyResponseDirection', 'BridgeCallPartyResponseFrom', 'BridgeCallPartyResponseOwner', 'BridgeCallPartyResponsePark', 'BridgeCallPartyResponseRecordingsItem', 'BridgeCallPartyResponseRingMeRole', 'BridgeCallPartyResponseRingOutRole', 'BridgeCallPartyResponseStatus', 'BridgeCallPartyResponseStatusCode', 'BridgeCallPartyResponseStatusPeerId', 'BridgeCallPartyResponseStatusReason', 'BridgeCallPartyResponseTo', 'BridgeTargetRequest', 'BulkAccountCallRecordingsResource', 'BulkAccountCallRecordingsResourceAddedExtensionsItem', 'BulkAccountCallRecordingsResourceAddedExtensionsItemCallDirection', 'BulkAssignAutomaticLocationUpdatesUsers', 'CallFlipPartyRequest', 'CallLogSync', 'CallLogSyncSyncInfo', 'CallLogSyncSyncInfoSyncType', 'CallMonitoringBulkAssign', 'CallMonitoringBulkAssignAddedExtensionsItem', 'CallMonitoringBulkAssignAddedExtensionsItemPermissionsItem', 'CallMonitoringGroupMemberList', 'CallMonitoringGroupMemberListRecordsItem', 'CallMonitoringGroupMemberListRecordsItemPermissionsItem', 'CallMonitoringGroups', 'CallMonitoringGroupsRecordsItem', 'CallParkPartyResponse', 'CallParkPartyResponseConferenceRole', 'CallParkPartyResponseDirection', 'CallParkPartyResponseFrom', 'CallParkPartyResponseOwner', 'CallParkPartyResponsePark', 'CallParkPartyResponseRecordingsItem', 'CallParkPartyResponseRingMeRole', 'CallParkPartyResponseRingOutRole', 'CallParkPartyResponseStatus', 'CallParkPartyResponseStatusCode', 'CallParkPartyResponseStatusPeerId', 'CallParkPartyResponseStatusReason', 'CallParkPartyResponseTo', 'CallPartyFlip', 'CallPartyReply', 'CallPartyReplyReplyWithPattern', 'CallPartyReplyReplyWithPatternPattern', 'CallPartyReplyReplyWithPatternTimeUnit', 'CallQueueBulkAssignResource', 'CallQueueDetails', 'CallQueueDetailsStatus', 'CallQueueMembers', 'CallQueueMembersRecordsItem', 'CallQueuePresence', 'CallQueuePresenceRecordsItem', 'CallQueuePresenceRecordsItemMember', 'CallQueuePresenceRecordsItemMemberSite', 'CallQueueUpdateDetails', 'CallQueueUpdateDetailsServiceLevelSettings', 'CallQueueUpdatePresence', 'CallQueueUpdatePresenceRecordsItem', 'CallQueueUpdatePresenceRecordsItemMember', 'CallQueues', 'CallRecording', 'CallRecordingCustomGreetings', 'CallRecordingCustomGreetingsRecordsItem', 'CallRecordingCustomGreetingsRecordsItemCustom', 'CallRecordingCustomGreetingsRecordsItemLanguage', 'CallRecordingCustomGreetingsRecordsItemType', 'CallRecordingExtensions', 'CallRecordingExtensionsRecordsItem', 'CallRecordingSettingsResource', 'CallRecordingSettingsResourceAutomatic', 'CallRecordingSettingsResourceGreetingsItem', 'CallRecordingSettingsResourceGreetingsItemMode', 'CallRecordingSettingsResourceGreetingsItemType', 'CallRecordingSettingsResourceOnDemand', 'CallRecordingUpdate', 'CallSession', 'CallSessionSession', 'CallSessionSessionOrigin', 'CallSessionSessionOriginType', 'CallSessionSessionPartiesItem', 'CallSessionSessionPartiesItemConferenceRole', 'CallSessionSessionPartiesItemDirection', 'CallSessionSessionPartiesItemPark', 'CallSessionSessionPartiesItemRecordingsItem', 'CallSessionSessionPartiesItemRingMeRole', 'CallSessionSessionPartiesItemRingOutRole', 'CallerBlockingSettings', 'CallerBlockingSettingsMode', 'CallerBlockingSettingsNoCallerId', 'CallerBlockingSettingsPayPhones', 'CallerBlockingSettingsUpdate', 'CallerBlockingSettingsUpdateGreetingsItem', 'CallerBlockingSettingsUpdateMode', 'CallerBlockingSettingsUpdateNoCallerId', 'CallerBlockingSettingsUpdatePayPhones', 'CheckUserPermissionResponse', 'CheckUserPermissionResponseDetails', 'CheckUserPermissionResponseDetailsEffectiveRole', 'CheckUserPermissionResponseDetailsPermission', 'CheckUserPermissionResponseDetailsPermissionSiteCompatible', 'CheckUserPermissionResponseDetailsScopesItem', 'CompanyActiveCallsResponse', 'CompanyAnsweringRuleInfo', 'CompanyAnsweringRuleInfoCallHandlingAction', 'CompanyAnsweringRuleInfoCalledNumbersItem', 'CompanyAnsweringRuleInfoExtension', 'CompanyAnsweringRuleInfoSchedule', 'CompanyAnsweringRuleInfoScheduleRef', 'CompanyAnsweringRuleInfoType', 'CompanyAnsweringRuleList', 'CompanyAnsweringRuleListRecordsItem', 'CompanyAnsweringRuleListRecordsItemExtension', 'CompanyAnsweringRuleListRecordsItemType', 'CompanyAnsweringRuleRequest', 'CompanyAnsweringRuleRequestCallHandlingAction', 'CompanyAnsweringRuleRequestCalledNumbersItem', 'CompanyAnsweringRuleRequestCallersItem', 'CompanyAnsweringRuleRequestSchedule', 'CompanyAnsweringRuleRequestScheduleRef', 'CompanyAnsweringRuleRequestScheduleWeeklyRanges', 'CompanyAnsweringRuleRequestScheduleWeeklyRangesMondayItem', 'CompanyAnsweringRuleRequestType', 'CompanyAnsweringRuleUpdate', 'CompanyAnsweringRuleUpdateCallHandlingAction', 'CompanyAnsweringRuleUpdateType', 'CompanyBusinessHours', 'CompanyBusinessHoursSchedule', 'CompanyBusinessHoursUpdateRequest', 'CompanyCallLogRecord', 'CompanyCallLogRecordAction', 'CompanyCallLogRecordDirection', 'CompanyCallLogRecordReason', 'CompanyCallLogRecordResult', 'CompanyCallLogRecordTransport', 'CompanyCallLogRecordType', 'CompanyPhoneNumberInfo', 'CompanyPhoneNumberInfoPaymentType', 'CompanyPhoneNumberInfoTemporaryNumber', 'CompanyPhoneNumberInfoType', 'CompanyPhoneNumberInfoUsageType', 'CompleteTaskRequest', 'CompleteTaskRequestAssigneesItem', 'CompleteTaskRequestStatus', 'ContactList', 'ContactListGroups', 'ContactListNavigation', 'ContactListNavigationFirstPage', 'ContactListPaging', 'ContactListRecordsItem', 'ContactListRecordsItemAvailability', 'ContactListRecordsItemBusinessAddress', 'CreateAnsweringRuleRequest', 'CreateAnsweringRuleRequest', 'CreateAnsweringRuleRequestCallHandlingAction', 'CreateAnsweringRuleRequestCallHandlingAction', 'CreateAnsweringRuleRequestCalledNumbersItem', 'CreateAnsweringRuleRequestCallersItem', 'CreateAnsweringRuleRequestCallersItem', 'CreateAnsweringRuleRequestForwarding', 'CreateAnsweringRuleRequestForwardingRingingMode', 'CreateAnsweringRuleRequestForwardingRulesItem', 'CreateAnsweringRuleRequestForwardingRulesItemForwardingNumbersItem', 'CreateAnsweringRuleRequestForwardingRulesItemForwardingNumbersItemLabel', 'CreateAnsweringRuleRequestForwardingRulesItemForwardingNumbersItemType', 'CreateAnsweringRuleRequestGreetingsItem', 'CreateAnsweringRuleRequestGreetingsItemCustom', 'CreateAnsweringRuleRequestGreetingsItemPreset', 'CreateAnsweringRuleRequestGreetingsItemType', 'CreateAnsweringRuleRequestGreetingsItemUsageType', 'CreateAnsweringRuleRequestQueue', 'CreateAnsweringRuleRequestQueueFixedOrderAgentsItem', 'CreateAnsweringRuleRequestQueueFixedOrderAgentsItemExtension', 'CreateAnsweringRuleRequestQueueHoldAudioInterruptionMode', 'CreateAnsweringRuleRequestQueueHoldTimeExpirationAction', 'CreateAnsweringRuleRequestQueueMaxCallersAction', 'CreateAnsweringRuleRequestQueueNoAnswerAction', 'CreateAnsweringRuleRequestQueueTransferItem', 'CreateAnsweringRuleRequestQueueTransferItemAction', 'CreateAnsweringRuleRequestQueueTransferItemExtension', 'CreateAnsweringRuleRequestQueueTransferMode', 'CreateAnsweringRuleRequestQueueUnconditionalForwardingItem', 'CreateAnsweringRuleRequestQueueUnconditionalForwardingItemAction', 'CreateAnsweringRuleRequestSchedule', 'CreateAnsweringRuleRequestScheduleRangesItem', 'CreateAnsweringRuleRequestScheduleRef', 'CreateAnsweringRuleRequestScheduleWeeklyRanges', 'CreateAnsweringRuleRequestScheduleWeeklyRangesFridayItem', 'CreateAnsweringRuleRequestScheduleWeeklyRangesMondayItem', 'CreateAnsweringRuleRequestScheduleWeeklyRangesSaturdayItem', 'CreateAnsweringRuleRequestScheduleWeeklyRangesSundayItem', 'CreateAnsweringRuleRequestScheduleWeeklyRangesThursdayItem', 'CreateAnsweringRuleRequestScheduleWeeklyRangesTuesdayItem', 'CreateAnsweringRuleRequestScheduleWeeklyRangesWednesdayItem', 'CreateAnsweringRuleRequestScreening', 'CreateAnsweringRuleRequestScreening', 'CreateAnsweringRuleRequestTransfer', 'CreateAnsweringRuleRequestTransferExtension', 'CreateAnsweringRuleRequestUnconditionalForwarding', 'CreateAnsweringRuleRequestUnconditionalForwardingAction', 'CreateAnsweringRuleRequestVoicemail', 'CreateAnsweringRuleRequestVoicemailRecipient', 'CreateAnsweringRuleResponse', 'CreateAnsweringRuleResponseCallHandlingAction', 'CreateAnsweringRuleResponseCalledNumbersItem', 'CreateAnsweringRuleResponseCallersItem', 'CreateAnsweringRuleResponseForwarding', 'CreateAnsweringRuleResponseForwardingRingingMode', 'CreateAnsweringRuleResponseForwardingRulesItem', 'CreateAnsweringRuleResponseForwardingRulesItemForwardingNumbersItem', 'CreateAnsweringRuleResponseForwardingRulesItemForwardingNumbersItemLabel', 'CreateAnsweringRuleResponseForwardingRulesItemForwardingNumbersItemType', 'CreateAnsweringRuleResponseGreetingsItem', 'CreateAnsweringRuleResponseGreetingsItemCustom', 'CreateAnsweringRuleResponseGreetingsItemPreset', 'CreateAnsweringRuleResponseGreetingsItemType', 'CreateAnsweringRuleResponseGreetingsItemUsageType', 'CreateAnsweringRuleResponseQueue', 'CreateAnsweringRuleResponseQueueFixedOrderAgentsItem', 'CreateAnsweringRuleResponseQueueFixedOrderAgentsItemExtension', 'CreateAnsweringRuleResponseQueueHoldAudioInterruptionMode', 'CreateAnsweringRuleResponseQueueHoldTimeExpirationAction', 'CreateAnsweringRuleResponseQueueMaxCallersAction', 'CreateAnsweringRuleResponseQueueNoAnswerAction', 'CreateAnsweringRuleResponseQueueTransferItem', 'CreateAnsweringRuleResponseQueueTransferItemAction', 'CreateAnsweringRuleResponseQueueTransferItemExtension', 'CreateAnsweringRuleResponseQueueTransferMode', 'CreateAnsweringRuleResponseQueueUnconditionalForwardingItem', 'CreateAnsweringRuleResponseQueueUnconditionalForwardingItemAction', 'CreateAnsweringRuleResponseSchedule', 'CreateAnsweringRuleResponseScheduleRangesItem', 'CreateAnsweringRuleResponseScheduleRef', 'CreateAnsweringRuleResponseScheduleWeeklyRanges', 'CreateAnsweringRuleResponseScheduleWeeklyRangesFridayItem', 'CreateAnsweringRuleResponseScheduleWeeklyRangesMondayItem', 'CreateAnsweringRuleResponseScheduleWeeklyRangesSaturdayItem', 'CreateAnsweringRuleResponseScheduleWeeklyRangesSundayItem', 'CreateAnsweringRuleResponseScheduleWeeklyRangesThursdayItem', 'CreateAnsweringRuleResponseScheduleWeeklyRangesTuesdayItem', 'CreateAnsweringRuleResponseScheduleWeeklyRangesWednesdayItem', 'CreateAnsweringRuleResponseScreening', 'CreateAnsweringRuleResponseSharedLines', 'CreateAnsweringRuleResponseTransfer', 'CreateAnsweringRuleResponseTransferExtension', 'CreateAnsweringRuleResponseType', 'CreateAnsweringRuleResponseUnconditionalForwarding', 'CreateAnsweringRuleResponseUnconditionalForwardingAction', 'CreateAnsweringRuleResponseVoicemail', 'CreateAnsweringRuleResponseVoicemailRecipient', 'CreateBlockedAllowedNumberRequest', 'CreateBlockedAllowedNumberRequestStatus', 'CreateBlockedAllowedNumberResponse', 'CreateBlockedAllowedNumberResponseStatus', 'CreateCallMonitoringGroupRequest', 'CreateCallMonitoringGroupRequest', 'CreateCallMonitoringGroupResponse', 'CreateCallOutCallSessionRequest', 'CreateCallOutCallSessionRequestFrom', 'CreateCallOutCallSessionRequestTo', 'CreateCallOutCallSessionResponse', 'CreateCallOutCallSessionResponseSession', 'CreateCallOutCallSessionResponseSessionOrigin', 'CreateCallOutCallSessionResponseSessionOriginType', 'CreateCallOutCallSessionResponseSessionPartiesItem', 'CreateCallOutCallSessionResponseSessionPartiesItemConferenceRole', 'CreateCallOutCallSessionResponseSessionPartiesItemDirection', 'CreateCallOutCallSessionResponseSessionPartiesItemFrom', 'CreateCallOutCallSessionResponseSessionPartiesItemOwner', 'CreateCallOutCallSessionResponseSessionPartiesItemPark', 'CreateCallOutCallSessionResponseSessionPartiesItemRecordingsItem', 'CreateCallOutCallSessionResponseSessionPartiesItemRingMeRole', 'CreateCallOutCallSessionResponseSessionPartiesItemRingOutRole', 'CreateCallOutCallSessionResponseSessionPartiesItemStatus', 'CreateCallOutCallSessionResponseSessionPartiesItemStatusCode', 'CreateCallOutCallSessionResponseSessionPartiesItemStatusPeerId', 'CreateCallOutCallSessionResponseSessionPartiesItemStatusReason', 'CreateCallOutCallSessionResponseSessionPartiesItemTo', 'CreateChatNoteRequest', 'CreateChatNoteResponse', 'CreateChatNoteResponseCreator', 'CreateChatNoteResponseLastModifiedBy', 'CreateChatNoteResponseLockedBy', 'CreateChatNoteResponseStatus', 'CreateChatNoteResponseType', 'CreateCompanyAnsweringRuleRequest', 'CreateCompanyAnsweringRuleRequestCallHandlingAction', 'CreateCompanyAnsweringRuleRequestCalledNumbersItem', 'CreateCompanyAnsweringRuleRequestCallersItem', 'CreateCompanyAnsweringRuleRequestGreetingsItem', 'CreateCompanyAnsweringRuleRequestGreetingsItemCustom', 'CreateCompanyAnsweringRuleRequestGreetingsItemPreset', 'CreateCompanyAnsweringRuleRequestGreetingsItemType', 'CreateCompanyAnsweringRuleRequestGreetingsItemUsageType', 'CreateCompanyAnsweringRuleRequestSchedule', 'CreateCompanyAnsweringRuleRequestScheduleRangesItem', 'CreateCompanyAnsweringRuleRequestScheduleRef', 'CreateCompanyAnsweringRuleRequestScheduleWeeklyRanges', 'CreateCompanyAnsweringRuleRequestScheduleWeeklyRangesFridayItem', 'CreateCompanyAnsweringRuleRequestScheduleWeeklyRangesMondayItem', 'CreateCompanyAnsweringRuleRequestScheduleWeeklyRangesSaturdayItem', 'CreateCompanyAnsweringRuleRequestScheduleWeeklyRangesSundayItem', 'CreateCompanyAnsweringRuleRequestScheduleWeeklyRangesThursdayItem', 'CreateCompanyAnsweringRuleRequestScheduleWeeklyRangesTuesdayItem', 'CreateCompanyAnsweringRuleRequestScheduleWeeklyRangesWednesdayItem', 'CreateCompanyAnsweringRuleRequestType', 'CreateCompanyAnsweringRuleResponse', 'CreateCompanyAnsweringRuleResponseCallHandlingAction', 'CreateCompanyAnsweringRuleResponseCalledNumbersItem', 'CreateCompanyAnsweringRuleResponseCallersItem', 'CreateCompanyAnsweringRuleResponseExtension', 'CreateCompanyAnsweringRuleResponseGreetingsItem', 'CreateCompanyAnsweringRuleResponseGreetingsItemCustom', 'CreateCompanyAnsweringRuleResponseGreetingsItemPreset', 'CreateCompanyAnsweringRuleResponseGreetingsItemType', 'CreateCompanyAnsweringRuleResponseGreetingsItemUsageType', 'CreateCompanyAnsweringRuleResponseSchedule', 'CreateCompanyAnsweringRuleResponseScheduleRangesItem', 'CreateCompanyAnsweringRuleResponseScheduleRef', 'CreateCompanyAnsweringRuleResponseScheduleWeeklyRanges', 'CreateCompanyAnsweringRuleResponseScheduleWeeklyRangesFridayItem', 'CreateCompanyAnsweringRuleResponseScheduleWeeklyRangesMondayItem', 'CreateCompanyAnsweringRuleResponseScheduleWeeklyRangesSaturdayItem', 'CreateCompanyAnsweringRuleResponseScheduleWeeklyRangesSundayItem', 'CreateCompanyAnsweringRuleResponseScheduleWeeklyRangesThursdayItem', 'CreateCompanyAnsweringRuleResponseScheduleWeeklyRangesTuesdayItem', 'CreateCompanyAnsweringRuleResponseScheduleWeeklyRangesWednesdayItem', 'CreateCompanyAnsweringRuleResponseType', 'CreateCompanyGreetingRequest', 'CreateCompanyGreetingRequestType', 'CreateCompanyGreetingResponse', 'CreateCompanyGreetingResponseAnsweringRule', 'CreateCompanyGreetingResponseContentType', 'CreateCompanyGreetingResponseLanguage', 'CreateCompanyGreetingResponseType', 'CreateContactRequest', 'CreateContactRequestBusinessAddress', 'CreateContactRequestHomeAddress', 'CreateContactRequestOtherAddress', 'CreateContactResponse', 'CreateContactResponseAvailability', 'CreateContactResponseBusinessAddress', 'CreateContactResponseHomeAddress', 'CreateContactResponseOtherAddress', 'CreateCustomFieldRequest', 'CreateCustomFieldRequestCategory', 'CreateCustomFieldResponse', 'CreateCustomFieldResponseCategory', 'CreateCustomUserGreetingRequest', 'CreateCustomUserGreetingRequestType', 'CreateCustomUserGreetingResponse', 'CreateCustomUserGreetingResponseAnsweringRule', 'CreateCustomUserGreetingResponseContentType', 'CreateCustomUserGreetingResponseType', 'CreateDataExportTaskRequest', 'CreateDataExportTaskRequest', 'CreateDataExportTaskRequestContactsItem', 'CreateDataExportTaskResponse', 'CreateDataExportTaskResponseCreator', 'CreateDataExportTaskResponseDatasetsItem', 'CreateDataExportTaskResponseSpecific', 'CreateDataExportTaskResponseSpecificContactsItem', 'CreateDataExportTaskResponseStatus', 'CreateEmergencyLocationRequest', 'CreateEmergencyLocationRequestAddress', 'CreateEmergencyLocationRequestAddressStatus', 'CreateEmergencyLocationRequestOwnersItem', 'CreateEmergencyLocationRequestSite', 'CreateEmergencyLocationRequestUsageStatus', 'CreateEmergencyLocationRequestVisibility', 'CreateEventRequest', 'CreateEventRequestColor', 'CreateEventRequestEndingOn', 'CreateEventRequestRecurrence', 'CreateEventResponse', 'CreateEventResponseColor', 'CreateEventResponseEndingOn', 'CreateEventResponseRecurrence', 'CreateEventbyGroupIdResponse', 'CreateEventbyGroupIdResponseColor', 'CreateEventbyGroupIdResponseEndingOn', 'CreateEventbyGroupIdResponseRecurrence', 'CreateExtensionRequest', 'CreateExtensionRequestContact', 'CreateExtensionRequestContactBusinessAddress', 'CreateExtensionRequestContactPronouncedName', 'CreateExtensionRequestContactPronouncedNamePrompt', 'CreateExtensionRequestContactPronouncedNamePromptContentType', 'CreateExtensionRequestContactPronouncedNameType', 'CreateExtensionRequestCustomFieldsItem', 'CreateExtensionRequestReferencesItem', 'CreateExtensionRequestReferencesItemType', 'CreateExtensionRequestRegionalSettings', 'CreateExtensionRequestRegionalSettingsFormattingLocale', 'CreateExtensionRequestRegionalSettingsGreetingLanguage', 'CreateExtensionRequestRegionalSettingsHomeCountry', 'CreateExtensionRequestRegionalSettingsLanguage', 'CreateExtensionRequestRegionalSettingsTimeFormat', 'CreateExtensionRequestRegionalSettingsTimezone', 'CreateExtensionRequestSetupWizardState', 'CreateExtensionRequestSite', 'CreateExtensionRequestSiteBusinessAddress', 'CreateExtensionRequestSiteOperator', 'CreateExtensionRequestSiteRegionalSettings', 'CreateExtensionRequestSiteRegionalSettingsFormattingLocale', 'CreateExtensionRequestSiteRegionalSettingsGreetingLanguage', 'CreateExtensionRequestSiteRegionalSettingsHomeCountry', 'CreateExtensionRequestSiteRegionalSettingsLanguage', 'CreateExtensionRequestSiteRegionalSettingsTimeFormat', 'CreateExtensionRequestSiteRegionalSettingsTimezone', 'CreateExtensionRequestStatus', 'CreateExtensionRequestStatusInfo', 'CreateExtensionRequestStatusInfoReason', 'CreateExtensionRequestType', 'CreateExtensionResponse', 'CreateExtensionResponseContact', 'CreateExtensionResponseContactBusinessAddress', 'CreateExtensionResponseContactPronouncedName', 'CreateExtensionResponseContactPronouncedNamePrompt', 'CreateExtensionResponseContactPronouncedNamePromptContentType', 'CreateExtensionResponseContactPronouncedNameType', 'CreateExtensionResponseCustomFieldsItem', 'CreateExtensionResponsePermissions', 'CreateExtensionResponsePermissionsAdmin', 'CreateExtensionResponsePermissionsInternationalCalling', 'CreateExtensionResponseProfileImage', 'CreateExtensionResponseProfileImageScalesItem', 'CreateExtensionResponseReferencesItem', 'CreateExtensionResponseReferencesItemType', 'CreateExtensionResponseRegionalSettings', 'CreateExtensionResponseRegionalSettingsFormattingLocale', 'CreateExtensionResponseRegionalSettingsGreetingLanguage', 'CreateExtensionResponseRegionalSettingsHomeCountry', 'CreateExtensionResponseRegionalSettingsLanguage', 'CreateExtensionResponseRegionalSettingsTimeFormat', 'CreateExtensionResponseRegionalSettingsTimezone', 'CreateExtensionResponseServiceFeaturesItem', 'CreateExtensionResponseServiceFeaturesItemFeatureName', 'CreateExtensionResponseSetupWizardState', 'CreateExtensionResponseSite', 'CreateExtensionResponseStatus', 'CreateExtensionResponseStatusInfo', 'CreateExtensionResponseStatusInfoReason', 'CreateExtensionResponseType', 'CreateFaxMessageRequest', 'CreateFaxMessageRequestFaxResolution', 'CreateFaxMessageResponse', 'CreateFaxMessageResponseAttachmentsItem', 'CreateFaxMessageResponseAttachmentsItemType', 'CreateFaxMessageResponseAvailability', 'CreateFaxMessageResponseDirection', 'CreateFaxMessageResponseFaxResolution', 'CreateFaxMessageResponseFrom', 'CreateFaxMessageResponseMessageStatus', 'CreateFaxMessageResponsePriority', 'CreateFaxMessageResponseReadStatus', 'CreateFaxMessageResponseToItem', 'CreateFaxMessageResponseToItemFaxErrorCode', 'CreateFaxMessageResponseToItemMessageStatus', 'CreateForwardingNumberRequest', 'CreateForwardingNumberRequest', 'CreateForwardingNumberRequestDevice', 'CreateForwardingNumberRequestType', 'CreateForwardingNumberRequestType', 'CreateForwardingNumberResponse', 'CreateForwardingNumberResponseDevice', 'CreateForwardingNumberResponseFeaturesItem', 'CreateForwardingNumberResponseLabel', 'CreateForwardingNumberResponseType', 'CreateGlipCardRequest', 'CreateGlipCardRequestAuthor', 'CreateGlipCardRequestFieldsItem', 'CreateGlipCardRequestFieldsItemStyle', 'CreateGlipCardRequestFootnote', 'CreateGlipCardRequestRecurrence', 'CreateGlipCardRequestType', 'CreateGlipCardResponse', 'CreateGlipCardResponseAuthor', 'CreateGlipCardResponseColor', 'CreateGlipCardResponseEndingOn', 'CreateGlipCardResponseFieldsItem', 'CreateGlipCardResponseFieldsItemStyle', 'CreateGlipCardResponseFootnote', 'CreateGlipCardResponseRecurrence', 'CreateGlipCardResponseType', 'CreateGlipConversationRequest', 'CreateGlipConversationRequest', 'CreateGlipConversationRequestMembersItem', 'CreateGlipConversationResponse', 'CreateGlipConversationResponse', 'CreateGlipConversationResponseMembersItem', 'CreateGlipConversationResponseMembersItem', 'CreateGlipConversationResponseType', 'CreateGlipConversationResponseType', 'CreateGlipGroupPostRequest', 'CreateGlipGroupPostRequestAttachmentsItem', 'CreateGlipGroupPostRequestAttachmentsItemAuthor', 'CreateGlipGroupPostRequestAttachmentsItemFieldsItem', 'CreateGlipGroupPostRequestAttachmentsItemFieldsItemStyle', 'CreateGlipGroupPostRequestAttachmentsItemFootnote', 'CreateGlipGroupPostRequestAttachmentsItemRecurrence', 'CreateGlipGroupPostRequestAttachmentsItemType', 'CreateGlipGroupPostResponse', 'CreateGlipGroupPostResponseAttachmentsItem', 'CreateGlipGroupPostResponseAttachmentsItemAuthor', 'CreateGlipGroupPostResponseAttachmentsItemColor', 'CreateGlipGroupPostResponseAttachmentsItemEndingOn', 'CreateGlipGroupPostResponseAttachmentsItemFieldsItem', 'CreateGlipGroupPostResponseAttachmentsItemFieldsItemStyle', 'CreateGlipGroupPostResponseAttachmentsItemFootnote', 'CreateGlipGroupPostResponseAttachmentsItemRecurrence', 'CreateGlipGroupPostResponseAttachmentsItemType', 'CreateGlipGroupPostResponseMentionsItem', 'CreateGlipGroupPostResponseMentionsItemType', 'CreateGlipGroupPostResponseType', 'CreateGlipGroupRequest', 'CreateGlipGroupRequestMembersItem', 'CreateGlipGroupRequestType', 'CreateGlipGroupResponse', 'CreateGlipGroupResponseType', 'CreateGlipGroupWebhookResponse', 'CreateGlipGroupWebhookResponseStatus', 'CreateGlipPostRequest', 'CreateGlipPostRequestAttachmentsItem', 'CreateGlipPostRequestAttachmentsItemType', 'CreateGlipPostResponse', 'CreateGlipPostResponseAttachmentsItem', 'CreateGlipPostResponseAttachmentsItemAuthor', 'CreateGlipPostResponseAttachmentsItemColor', 'CreateGlipPostResponseAttachmentsItemEndingOn', 'CreateGlipPostResponseAttachmentsItemFieldsItem', 'CreateGlipPostResponseAttachmentsItemFieldsItemStyle', 'CreateGlipPostResponseAttachmentsItemFootnote', 'CreateGlipPostResponseAttachmentsItemRecurrence', 'CreateGlipPostResponseAttachmentsItemType', 'CreateGlipPostResponseMentionsItem', 'CreateGlipPostResponseMentionsItemType', 'CreateGlipPostResponseType', 'CreateGlipTeamRequest', 'CreateGlipTeamRequestMembersItem', 'CreateGlipTeamResponse', 'CreateGlipTeamResponseStatus', 'CreateGlipTeamResponseType', 'CreateIVRMenuRequest', 'CreateIVRMenuRequestActionsItem', 'CreateIVRMenuRequestActionsItemAction', 'CreateIVRMenuRequestActionsItemExtension', 'CreateIVRMenuRequestPrompt', 'CreateIVRMenuRequestPromptAudio', 'CreateIVRMenuRequestPromptLanguage', 'CreateIVRMenuRequestPromptMode', 'CreateIVRMenuResponse', 'CreateIVRMenuResponseActionsItem', 'CreateIVRMenuResponseActionsItemAction', 'CreateIVRMenuResponseActionsItemExtension', 'CreateIVRMenuResponsePrompt', 'CreateIVRMenuResponsePromptAudio', 'CreateIVRMenuResponsePromptLanguage', 'CreateIVRMenuResponsePromptMode', 'CreateIVRPromptRequest', 'CreateIVRPromptResponse', 'CreateInternalTextMessageRequest', 'CreateInternalTextMessageRequest', 'CreateInternalTextMessageRequestFrom', 'CreateInternalTextMessageRequestFrom', 'CreateInternalTextMessageRequestToItem', 'CreateInternalTextMessageResponse', 'CreateInternalTextMessageResponseAttachmentsItem', 'CreateInternalTextMessageResponseAttachmentsItemType', 'CreateInternalTextMessageResponseAvailability', 'CreateInternalTextMessageResponseConversation', 'CreateInternalTextMessageResponseDirection', 'CreateInternalTextMessageResponseFaxResolution', 'CreateInternalTextMessageResponseFrom', 'CreateInternalTextMessageResponseMessageStatus', 'CreateInternalTextMessageResponsePriority', 'CreateInternalTextMessageResponseReadStatus', 'CreateInternalTextMessageResponseToItem', 'CreateInternalTextMessageResponseToItemFaxErrorCode', 'CreateInternalTextMessageResponseToItemMessageStatus', 'CreateInternalTextMessageResponseType', 'CreateInternalTextMessageResponseVmTranscriptionStatus', 'CreateMMSRequest', 'CreateMMSResponse', 'CreateMMSResponseAttachmentsItem', 'CreateMMSResponseAttachmentsItemType', 'CreateMMSResponseAvailability', 'CreateMMSResponseConversation', 'CreateMMSResponseDirection', 'CreateMMSResponseFaxResolution', 'CreateMMSResponseFrom', 'CreateMMSResponseMessageStatus', 'CreateMMSResponsePriority', 'CreateMMSResponseReadStatus', 'CreateMMSResponseToItem', 'CreateMMSResponseToItemFaxErrorCode', 'CreateMMSResponseToItemMessageStatus', 'CreateMMSResponseType', 'CreateMMSResponseVmTranscriptionStatus', 'CreateMeetingRequest', 'CreateMeetingRequestAutoRecordType', 'CreateMeetingRequestHost', 'CreateMeetingRequestMeetingType', 'CreateMeetingRequestRecurrence', 'CreateMeetingRequestRecurrenceFrequency', 'CreateMeetingRequestRecurrenceMonthlyByWeek', 'CreateMeetingRequestRecurrenceWeeklyByDay', 'CreateMeetingRequestRecurrenceWeeklyByDays', 'CreateMeetingRequestSchedule', 'CreateMeetingRequestScheduleTimeZone', 'CreateMeetingResponse', 'CreateMeetingResponseHost', 'CreateMeetingResponseLinks', 'CreateMeetingResponseMeetingType', 'CreateMeetingResponseOccurrencesItem', 'CreateMeetingResponseSchedule', 'CreateMeetingResponseScheduleTimeZone', 'CreateMessageStoreReportRequest', 'CreateMessageStoreReportRequest', 'CreateMessageStoreReportResponse', 'CreateMessageStoreReportResponseStatus', 'CreateMultipleSwitchesRequest', 'CreateMultipleSwitchesRequest', 'CreateMultipleSwitchesRequestRecordsItem', 'CreateMultipleSwitchesRequestRecordsItem', 'CreateMultipleSwitchesRequestRecordsItemEmergencyAddress', 'CreateMultipleSwitchesRequestRecordsItemEmergencyLocation', 'CreateMultipleSwitchesRequestRecordsItemSite', 'CreateMultipleSwitchesResponse', 'CreateMultipleSwitchesResponse', 'CreateMultipleSwitchesResponseTask', 'CreateMultipleSwitchesResponseTaskStatus', 'CreateMultipleWirelessPointsRequest', 'CreateMultipleWirelessPointsRequest', 'CreateMultipleWirelessPointsRequestRecordsItem', 'CreateMultipleWirelessPointsRequestRecordsItem', 'CreateMultipleWirelessPointsRequestRecordsItemEmergencyAddress', 'CreateMultipleWirelessPointsRequestRecordsItemEmergencyLocation', 'CreateMultipleWirelessPointsRequestRecordsItemSite', 'CreateMultipleWirelessPointsResponse', 'CreateMultipleWirelessPointsResponse', 'CreateMultipleWirelessPointsResponseTask', 'CreateMultipleWirelessPointsResponseTaskStatus', 'CreateNetworkRequest', 'CreateNetworkRequest', 'CreateNetworkRequestEmergencyLocation', 'CreateNetworkRequestPrivateIpRangesItem', 'CreateNetworkRequestPrivateIpRangesItem', 'CreateNetworkRequestPrivateIpRangesItemEmergencyAddress', 'CreateNetworkRequestPublicIpRangesItem', 'CreateNetworkRequestPublicIpRangesItem', 'CreateNetworkRequestSite', 'CreateNetworkResponse', 'CreateNetworkResponseEmergencyLocation', 'CreateNetworkResponsePrivateIpRangesItem', 'CreateNetworkResponsePrivateIpRangesItemEmergencyAddress', 'CreateNetworkResponsePublicIpRangesItem', 'CreateNetworkResponseSite', 'CreatePostRequest', 'CreatePostRequestAttachmentsItem', 'CreatePostRequestAttachmentsItemAuthor', 'CreatePostRequestAttachmentsItemFieldsItem', 'CreatePostRequestAttachmentsItemFieldsItemStyle', 'CreatePostRequestAttachmentsItemFootnote', 'CreatePostRequestAttachmentsItemRecurrence', 'CreatePostRequestAttachmentsItemType', 'CreatePostResponse', 'CreatePostResponseAttachmentsItem', 'CreatePostResponseAttachmentsItemAuthor', 'CreatePostResponseAttachmentsItemColor', 'CreatePostResponseAttachmentsItemEndingOn', 'CreatePostResponseAttachmentsItemFieldsItem', 'CreatePostResponseAttachmentsItemFieldsItemStyle', 'CreatePostResponseAttachmentsItemFootnote', 'CreatePostResponseAttachmentsItemRecurrence', 'CreatePostResponseAttachmentsItemType', 'CreatePostResponseMentionsItem', 'CreatePostResponseMentionsItemType', 'CreatePostResponseType', 'CreateRingOutCallDeprecatedResponse', 'CreateRingOutCallDeprecatedResponseStatus', 'CreateRingOutCallDeprecatedResponseStatusCallStatus', 'CreateRingOutCallDeprecatedResponseStatusCalleeStatus', 'CreateRingOutCallDeprecatedResponseStatusCallerStatus', 'CreateRingOutCallRequest', 'CreateRingOutCallRequestCallerId', 'CreateRingOutCallRequestCountry', 'CreateRingOutCallRequestFrom', 'CreateRingOutCallRequestTo', 'CreateRingOutCallResponse', 'CreateRingOutCallResponseStatus', 'CreateRingOutCallResponseStatusCallStatus', 'CreateRingOutCallResponseStatusCalleeStatus', 'CreateRingOutCallResponseStatusCallerStatus', 'CreateSIPRegistrationRequest', 'CreateSIPRegistrationRequestDevice', 'CreateSIPRegistrationRequestSipInfoItem', 'CreateSIPRegistrationRequestSipInfoItemTransport', 'CreateSIPRegistrationResponse', 'CreateSIPRegistrationResponseDevice', 'CreateSIPRegistrationResponseDeviceEmergency', 'CreateSIPRegistrationResponseDeviceEmergencyAddress', 'CreateSIPRegistrationResponseDeviceEmergencyAddressEditableStatus', 'CreateSIPRegistrationResponseDeviceEmergencyAddressStatus', 'CreateSIPRegistrationResponseDeviceEmergencyLocation', 'CreateSIPRegistrationResponseDeviceEmergencyServiceAddress', 'CreateSIPRegistrationResponseDeviceEmergencySyncStatus', 'CreateSIPRegistrationResponseDeviceExtension', 'CreateSIPRegistrationResponseDeviceLinePooling', 'CreateSIPRegistrationResponseDeviceModel', 'CreateSIPRegistrationResponseDeviceModelAddonsItem', 'CreateSIPRegistrationResponseDeviceModelFeaturesItem', 'CreateSIPRegistrationResponseDevicePhoneLinesItem', 'CreateSIPRegistrationResponseDevicePhoneLinesItemEmergencyAddress', 'CreateSIPRegistrationResponseDevicePhoneLinesItemLineType', 'CreateSIPRegistrationResponseDevicePhoneLinesItemPhoneInfo', 'CreateSIPRegistrationResponseDevicePhoneLinesItemPhoneInfoCountry', 'CreateSIPRegistrationResponseDevicePhoneLinesItemPhoneInfoPaymentType', 'CreateSIPRegistrationResponseDevicePhoneLinesItemPhoneInfoType', 'CreateSIPRegistrationResponseDevicePhoneLinesItemPhoneInfoUsageType', 'CreateSIPRegistrationResponseDeviceShipping', 'CreateSIPRegistrationResponseDeviceShippingAddress', 'CreateSIPRegistrationResponseDeviceShippingMethod', 'CreateSIPRegistrationResponseDeviceSite', 'CreateSIPRegistrationResponseDeviceStatus', 'CreateSIPRegistrationResponseDeviceType', 'CreateSIPRegistrationResponseSipFlags', 'CreateSIPRegistrationResponseSipFlagsOutboundCallsEnabled', 'CreateSIPRegistrationResponseSipFlagsVoipCountryBlocked', 'CreateSIPRegistrationResponseSipFlagsVoipFeatureEnabled', 'CreateSIPRegistrationResponseSipInfoItem', 'CreateSIPRegistrationResponseSipInfoItemTransport', 'CreateSIPRegistrationResponseSipInfoPstnItem', 'CreateSIPRegistrationResponseSipInfoPstnItemTransport', 'CreateSMSMessageRequest', 'CreateSMSMessageRequest', 'CreateSMSMessageRequestCountry', 'CreateSMSMessageRequestCountry', 'CreateSMSMessageRequestFrom', 'CreateSMSMessageRequestFrom', 'CreateSMSMessageRequestToItem', 'CreateSMSMessageResponse', 'CreateSMSMessageResponseAttachmentsItem', 'CreateSMSMessageResponseAttachmentsItemType', 'CreateSMSMessageResponseAvailability', 'CreateSMSMessageResponseConversation', 'CreateSMSMessageResponseDirection', 'CreateSMSMessageResponseFaxResolution', 'CreateSMSMessageResponseFrom', 'CreateSMSMessageResponseMessageStatus', 'CreateSMSMessageResponsePriority', 'CreateSMSMessageResponseReadStatus', 'CreateSMSMessageResponseToItem', 'CreateSMSMessageResponseToItemFaxErrorCode', 'CreateSMSMessageResponseToItemMessageStatus', 'CreateSMSMessageResponseType', 'CreateSMSMessageResponseVmTranscriptionStatus', 'CreateSipRegistrationRequest', 'CreateSipRegistrationRequestDevice', 'CreateSipRegistrationRequestSipInfoItem', 'CreateSipRegistrationRequestSipInfoItemTransport', 'CreateSipRegistrationResponse', 'CreateSipRegistrationResponseDevice', 'CreateSipRegistrationResponseDeviceEmergency', 'CreateSipRegistrationResponseDeviceEmergencyAddressEditableStatus', 'CreateSipRegistrationResponseDeviceEmergencyAddressStatus', 'CreateSipRegistrationResponseDeviceEmergencyLocation', 'CreateSipRegistrationResponseDeviceEmergencyServiceAddress', 'CreateSipRegistrationResponseDeviceEmergencySyncStatus', 'CreateSipRegistrationResponseDeviceExtension', 'CreateSipRegistrationResponseDeviceLinePooling', 'CreateSipRegistrationResponseDeviceModel', 'CreateSipRegistrationResponseDeviceModelAddonsItem', 'CreateSipRegistrationResponseDeviceModelFeaturesItem', 'CreateSipRegistrationResponseDevicePhoneLinesItem', 'CreateSipRegistrationResponseDevicePhoneLinesItemEmergencyAddress', 'CreateSipRegistrationResponseDevicePhoneLinesItemLineType', 'CreateSipRegistrationResponseDevicePhoneLinesItemPhoneInfo', 'CreateSipRegistrationResponseDevicePhoneLinesItemPhoneInfoCountry', 'CreateSipRegistrationResponseDevicePhoneLinesItemPhoneInfoPaymentType', 'CreateSipRegistrationResponseDevicePhoneLinesItemPhoneInfoType', 'CreateSipRegistrationResponseDevicePhoneLinesItemPhoneInfoUsageType', 'CreateSipRegistrationResponseDeviceShipping', 'CreateSipRegistrationResponseDeviceShippingMethod', 'CreateSipRegistrationResponseDeviceSite', 'CreateSipRegistrationResponseDeviceStatus', 'CreateSipRegistrationResponseDeviceType', 'CreateSipRegistrationResponseSipFlags', 'CreateSipRegistrationResponseSipFlagsOutboundCallsEnabled', 'CreateSipRegistrationResponseSipFlagsVoipCountryBlocked', 'CreateSipRegistrationResponseSipFlagsVoipFeatureEnabled', 'CreateSipRegistrationResponseSipInfoItem', 'CreateSipRegistrationResponseSipInfoItemTransport', 'CreateSubscriptionRequest', 'CreateSubscriptionRequest', 'CreateSubscriptionRequestDeliveryMode', 'CreateSubscriptionRequestDeliveryMode', 'CreateSubscriptionRequestDeliveryModeTransportType', 'CreateSubscriptionRequestDeliveryModeTransportType', 'CreateSubscriptionResponse', 'CreateSubscriptionResponseBlacklistedData', 'CreateSubscriptionResponseDeliveryMode', 'CreateSubscriptionResponseDeliveryModeTransportType', 'CreateSubscriptionResponseDisabledFiltersItem', 'CreateSubscriptionResponseStatus', 'CreateSubscriptionResponseTransportType', 'CreateSwitchRequest', 'CreateSwitchRequestEmergencyAddress', 'CreateSwitchRequestEmergencyLocation', 'CreateSwitchRequestSite', 'CreateSwitchResponse', 'CreateSwitchResponseEmergencyAddress', 'CreateSwitchResponseEmergencyLocation', 'CreateSwitchResponseSite', 'CreateTaskRequest', 'CreateTaskRequestAssigneesItem', 'CreateTaskRequestAttachmentsItem', 'CreateTaskRequestAttachmentsItemType', 'CreateTaskRequestColor', 'CreateTaskRequestCompletenessCondition', 'CreateTaskRequestRecurrence', 'CreateTaskRequestRecurrenceEndingCondition', 'CreateTaskRequestRecurrenceSchedule', 'CreateTaskResponse', 'CreateTaskResponseAssigneesItem', 'CreateTaskResponseAssigneesItemStatus', 'CreateTaskResponseAttachmentsItem', 'CreateTaskResponseAttachmentsItemType', 'CreateTaskResponseColor', 'CreateTaskResponseCompletenessCondition', 'CreateTaskResponseCreator', 'CreateTaskResponseRecurrence', 'CreateTaskResponseRecurrenceEndingCondition', 'CreateTaskResponseRecurrenceSchedule', 'CreateTaskResponseStatus', 'CreateTaskResponseType', 'CreateUser', 'CreateUser2Request', 'CreateUser2RequestAddressesItem', 'CreateUser2RequestAddressesItemType', 'CreateUser2RequestEmailsItem', 'CreateUser2RequestEmailsItemType', 'CreateUser2RequestName', 'CreateUser2RequestPhoneNumbersItem', 'CreateUser2RequestPhoneNumbersItemType', 'CreateUser2RequestPhotosItem', 'CreateUser2RequestPhotosItemType', 'CreateUser2RequestSchemasItem', 'CreateUser2RequestUrnIetfParamsScimSchemasExtensionEnterprise_2_0_User', 'CreateUser2Response', 'CreateUser2Response', 'CreateUser2Response', 'CreateUser2Response', 'CreateUser2Response', 'CreateUser2Response', 'CreateUser2Response', 'CreateUser2Response', 'CreateUser2ResponseAddressesItem', 'CreateUser2ResponseAddressesItemType', 'CreateUser2ResponseEmailsItem', 'CreateUser2ResponseEmailsItemType', 'CreateUser2ResponseMeta', 'CreateUser2ResponseMetaResourceType', 'CreateUser2ResponseName', 'CreateUser2ResponsePhoneNumbersItem', 'CreateUser2ResponsePhoneNumbersItemType', 'CreateUser2ResponsePhotosItem', 'CreateUser2ResponsePhotosItemType', 'CreateUser2ResponseSchemasItem', 'CreateUser2ResponseSchemasItem', 'CreateUser2ResponseSchemasItem', 'CreateUser2ResponseSchemasItem', 'CreateUser2ResponseSchemasItem', 'CreateUser2ResponseSchemasItem', 'CreateUser2ResponseSchemasItem', 'CreateUser2ResponseSchemasItem', 'CreateUser2ResponseScimType', 'CreateUser2ResponseScimType', 'CreateUser2ResponseScimType', 'CreateUser2ResponseScimType', 'CreateUser2ResponseScimType', 'CreateUser2ResponseScimType', 'CreateUser2ResponseScimType', 'CreateUser2ResponseUrnIetfParamsScimSchemasExtensionEnterprise_2_0_User', 'CreateUserProfileImageRequest', 'CreateUserRequest', 'CreateUserRequestAddressesItem', 'CreateUserRequestAddressesItemType', 'CreateUserRequestEmailsItem', 'CreateUserRequestEmailsItemType', 'CreateUserRequestName', 'CreateUserRequestPhoneNumbersItem', 'CreateUserRequestPhoneNumbersItemType', 'CreateUserRequestPhotosItem', 'CreateUserRequestPhotosItemType', 'CreateUserRequestSchemasItem', 'CreateUserRequestUrnIetfParamsScimSchemasExtensionEnterprise_2_0_User', 'CreateUserResponse', 'CreateUserResponse', 'CreateUserResponse', 'CreateUserResponse', 'CreateUserResponse', 'CreateUserResponse', 'CreateUserResponse', 'CreateUserResponse', 'CreateUserResponseAddressesItem', 'CreateUserResponseAddressesItemType', 'CreateUserResponseEmailsItem', 'CreateUserResponseEmailsItemType', 'CreateUserResponseMeta', 'CreateUserResponseMetaResourceType', 'CreateUserResponseName', 'CreateUserResponsePhoneNumbersItem', 'CreateUserResponsePhoneNumbersItemType', 'CreateUserResponsePhotosItem', 'CreateUserResponsePhotosItemType', 'CreateUserResponseSchemasItem', 'CreateUserResponseSchemasItem', 'CreateUserResponseSchemasItem', 'CreateUserResponseSchemasItem', 'CreateUserResponseSchemasItem', 'CreateUserResponseSchemasItem', 'CreateUserResponseSchemasItem', 'CreateUserResponseSchemasItem', 'CreateUserResponseScimType', 'CreateUserResponseScimType', 'CreateUserResponseScimType', 'CreateUserResponseScimType', 'CreateUserResponseScimType', 'CreateUserResponseScimType', 'CreateUserResponseScimType', 'CreateUserResponseUrnIetfParamsScimSchemasExtensionEnterprise_2_0_User', 'CreateUserSchemasItem', 'CreateWirelessPointRequest', 'CreateWirelessPointRequestEmergencyAddress', 'CreateWirelessPointRequestEmergencyLocation', 'CreateWirelessPointRequestSite', 'CreateWirelessPointResponse', 'CreateWirelessPointResponseEmergencyAddress', 'CreateWirelessPointResponseEmergencyLocation', 'CreateWirelessPointResponseSite', 'CustomAnsweringRuleInfo', 'CustomAnsweringRuleInfoCallHandlingAction', 'CustomAnsweringRuleInfoScreening', 'CustomAnsweringRuleInfoType', 'CustomCompanyGreetingInfo', 'CustomCompanyGreetingInfoAnsweringRule', 'CustomCompanyGreetingInfoContentType', 'CustomCompanyGreetingInfoLanguage', 'CustomCompanyGreetingInfoType', 'CustomFieldCreateRequest', 'CustomFieldCreateRequestCategory', 'CustomFieldUpdateRequest', 'CustomFieldsResource', 'CustomFieldsResourceRecordsItem', 'CustomFieldsResourceRecordsItemCategory', 'CustomUserGreetingInfo', 'CustomUserGreetingInfoContentType', 'CustomUserGreetingInfoType', 'DataExportTask', 'DataExportTaskDatasetsItem', 'DataExportTaskList', 'DataExportTaskListNavigation', 'DataExportTaskListNavigationFirstPage', 'DataExportTaskListPaging', 'DataExportTaskSpecific', 'DataExportTaskSpecificContactsItem', 'DataExportTaskStatus', 'DeleteMessageByFilterType', 'DeleteUser2Response', 'DeleteUser2Response', 'DeleteUser2Response', 'DeleteUser2Response', 'DeleteUser2Response', 'DeleteUser2ResponseSchemasItem', 'DeleteUser2ResponseSchemasItem', 'DeleteUser2ResponseSchemasItem', 'DeleteUser2ResponseSchemasItem', 'DeleteUser2ResponseSchemasItem', 'DeleteUser2ResponseScimType', 'DeleteUser2ResponseScimType', 'DeleteUser2ResponseScimType', 'DeleteUser2ResponseScimType', 'DeleteUser2ResponseScimType', 'DeleteUserCallLogDirectionItem', 'DeleteUserCallLogTypeItem', 'DepartmentBulkAssignResource', 'DepartmentBulkAssignResourceItemsItem', 'DepartmentMemberList', 'DictionaryGreetingList', 'DictionaryGreetingListRecordsItem', 'DictionaryGreetingListRecordsItemCategory', 'DictionaryGreetingListRecordsItemType', 'DictionaryGreetingListRecordsItemUsageType', 'DirectoryResource', 'DirectoryResourcePaging', 'DirectoryResourceRecordsItem', 'DirectoryResourceRecordsItemAccount', 'DirectoryResourceRecordsItemAccountMainNumber', 'DirectoryResourceRecordsItemAccountMainNumberUsageType', 'DirectoryResourceRecordsItemProfileImage', 'DirectoryResourceRecordsItemSite', 'EditGroupRequest', 'EditPagingGroupRequest', 'EmergencyLocationInfoRequest', 'EmergencyLocationInfoRequestAddress', 'EmergencyLocationInfoRequestAddressStatus', 'EmergencyLocationInfoRequestOwnersItem', 'EmergencyLocationInfoRequestSite', 'EmergencyLocationInfoRequestUsageStatus', 'EmergencyLocationInfoRequestVisibility', 'EmergencyLocationList', 'EmergencyLocationListRecordsItem', 'EmergencyLocationListRecordsItemAddressStatus', 'EmergencyLocationListRecordsItemSyncStatus', 'EmergencyLocationListRecordsItemUsageStatus', 'EmergencyLocationListRecordsItemVisibility', 'ErrorResponse', 'ErrorResponseErrorsItem', 'ErrorResponseErrorsItemErrorCode', 'ExtensionCallQueuePresenceList', 'ExtensionCallQueuePresenceListRecordsItem', 'ExtensionCallQueuePresenceListRecordsItemCallQueue', 'ExtensionCallQueueUpdatePresenceList', 'ExtensionCallQueueUpdatePresenceListRecordsItem', 'ExtensionCallQueueUpdatePresenceListRecordsItemCallQueue', 'ExtensionCallerIdInfo', 'ExtensionCallerIdInfoByDeviceItem', 'ExtensionCallerIdInfoByDeviceItemCallerId', 'ExtensionCallerIdInfoByDeviceItemCallerIdPhoneInfo', 'ExtensionCallerIdInfoByDeviceItemDevice', 'ExtensionCallerIdInfoByFeatureItem', 'ExtensionCallerIdInfoByFeatureItemCallerId', 'ExtensionCallerIdInfoByFeatureItemFeature', 'ExtensionCreationRequest', 'ExtensionCreationRequestContact', 'ExtensionCreationRequestContactBusinessAddress', 'ExtensionCreationRequestContactPronouncedName', 'ExtensionCreationRequestContactPronouncedNamePrompt', 'ExtensionCreationRequestContactPronouncedNamePromptContentType', 'ExtensionCreationRequestContactPronouncedNameType', 'ExtensionCreationRequestCustomFieldsItem', 'ExtensionCreationRequestReferencesItem', 'ExtensionCreationRequestReferencesItemType', 'ExtensionCreationRequestRegionalSettings', 'ExtensionCreationRequestRegionalSettingsFormattingLocale', 'ExtensionCreationRequestRegionalSettingsGreetingLanguage', 'ExtensionCreationRequestRegionalSettingsLanguage', 'ExtensionCreationRequestRegionalSettingsTimeFormat', 'ExtensionCreationRequestRegionalSettingsTimezone', 'ExtensionCreationRequestSetupWizardState', 'ExtensionCreationRequestSite', 'ExtensionCreationRequestSiteOperator', 'ExtensionCreationRequestStatus', 'ExtensionCreationRequestStatusInfo', 'ExtensionCreationRequestStatusInfoReason', 'ExtensionCreationRequestType', 'ExtensionCreationResponse', 'ExtensionCreationResponseContact', 'ExtensionCreationResponsePermissions', 'ExtensionCreationResponsePermissionsAdmin', 'ExtensionCreationResponseProfileImage', 'ExtensionCreationResponseProfileImageScalesItem', 'ExtensionCreationResponseServiceFeaturesItem', 'ExtensionCreationResponseServiceFeaturesItemFeatureName', 'ExtensionCreationResponseSetupWizardState', 'ExtensionCreationResponseStatus', 'ExtensionCreationResponseType', 'ExtensionUpdateRequest', 'ExtensionUpdateRequestCallQueueInfo', 'ExtensionUpdateRequestContact', 'ExtensionUpdateRequestRegionalSettings', 'ExtensionUpdateRequestRegionalSettingsFormattingLocale', 'ExtensionUpdateRequestRegionalSettingsGreetingLanguage', 'ExtensionUpdateRequestRegionalSettingsHomeCountry', 'ExtensionUpdateRequestRegionalSettingsLanguage', 'ExtensionUpdateRequestRegionalSettingsTimeFormat', 'ExtensionUpdateRequestRegionalSettingsTimezone', 'ExtensionUpdateRequestSetupWizardState', 'ExtensionUpdateRequestStatus', 'ExtensionUpdateRequestTransitionItem', 'ExtensionUpdateRequestType', 'FavoriteCollection', 'FavoriteCollectionRecordsItem', 'FavoriteContactList', 'FaxResponse', 'FaxResponseAttachmentsItem', 'FaxResponseAttachmentsItemType', 'FaxResponseAvailability', 'FaxResponseDirection', 'FaxResponseFaxResolution', 'FaxResponseFrom', 'FaxResponseMessageStatus', 'FaxResponsePriority', 'FaxResponseReadStatus', 'FaxResponseToItem', 'FaxResponseToItemFaxErrorCode', 'FaxResponseToItemMessageStatus', 'FeatureList', 'FeatureListRecordsItem', 'FeatureListRecordsItemParamsItem', 'FeatureListRecordsItemReason', 'FeatureListRecordsItemReasonCode', 'FederationResource', 'FederationResourceAccountsItem', 'ForwardCallPartyRequest', 'ForwardCallPartyResponse', 'ForwardCallPartyResponseConferenceRole', 'ForwardCallPartyResponseDirection', 'ForwardCallPartyResponseFrom', 'ForwardCallPartyResponseOwner', 'ForwardCallPartyResponsePark', 'ForwardCallPartyResponseRecordingsItem', 'ForwardCallPartyResponseRingMeRole', 'ForwardCallPartyResponseRingOutRole', 'ForwardCallPartyResponseStatus', 'ForwardCallPartyResponseStatusCode', 'ForwardCallPartyResponseStatusPeerId', 'ForwardCallPartyResponseStatusReason', 'ForwardCallPartyResponseTo', 'ForwardTarget', 'GetAccountInfoResponse', 'GetAccountInfoResponseRegionalSettings', 'GetAccountInfoResponseRegionalSettingsCurrency', 'GetAccountInfoResponseRegionalSettingsTimeFormat', 'GetAccountInfoResponseServiceInfo', 'GetAccountInfoResponseSetupWizardState', 'GetAccountInfoResponseSignupInfo', 'GetAccountInfoResponseSignupInfoSignupStateItem', 'GetAccountInfoResponseSignupInfoVerificationReason', 'GetAccountInfoResponseStatus', 'GetAccountInfoResponseStatusInfo', 'GetAccountInfoResponseStatusInfoReason', 'GetAccountLockedSettingResponse', 'GetAccountLockedSettingResponseRecording', 'GetAccountLockedSettingResponseRecordingAutoRecording', 'GetAccountLockedSettingResponseScheduleMeeting', 'GetAccountLockedSettingResponseScheduleMeetingAudioOptionsItem', 'GetAccountLockedSettingResponseScheduleMeetingRequirePasswordForPmiMeetings', 'GetCallRecordingResponse', 'GetConferencingInfoResponse', 'GetConferencingInfoResponsePhoneNumbersItem', 'GetConferencingInfoResponsePhoneNumbersItemCountry', 'GetCountryListResponse', 'GetCountryListResponseRecordsItem', 'GetDeviceInfoResponse', 'GetDeviceInfoResponseBillingStatement', 'GetDeviceInfoResponseBillingStatementChargesItem', 'GetDeviceInfoResponseBillingStatementFeesItem', 'GetDeviceInfoResponseEmergency', 'GetDeviceInfoResponseEmergencyAddress', 'GetDeviceInfoResponseEmergencyAddressEditableStatus', 'GetDeviceInfoResponseEmergencyAddressStatus', 'GetDeviceInfoResponseEmergencyLocation', 'GetDeviceInfoResponseEmergencyServiceAddress', 'GetDeviceInfoResponseEmergencyServiceAddressSyncStatus', 'GetDeviceInfoResponseEmergencySyncStatus', 'GetDeviceInfoResponseExtension', 'GetDeviceInfoResponseLinePooling', 'GetDeviceInfoResponseModel', 'GetDeviceInfoResponseModelAddonsItem', 'GetDeviceInfoResponseModelFeaturesItem', 'GetDeviceInfoResponsePhoneLinesItem', 'GetDeviceInfoResponsePhoneLinesItemEmergencyAddress', 'GetDeviceInfoResponsePhoneLinesItemLineType', 'GetDeviceInfoResponsePhoneLinesItemPhoneInfo', 'GetDeviceInfoResponsePhoneLinesItemPhoneInfoCountry', 'GetDeviceInfoResponsePhoneLinesItemPhoneInfoExtension', 'GetDeviceInfoResponsePhoneLinesItemPhoneInfoPaymentType', 'GetDeviceInfoResponsePhoneLinesItemPhoneInfoType', 'GetDeviceInfoResponsePhoneLinesItemPhoneInfoUsageType', 'GetDeviceInfoResponseShipping', 'GetDeviceInfoResponseShippingAddress', 'GetDeviceInfoResponseShippingMethod', 'GetDeviceInfoResponseShippingMethodId', 'GetDeviceInfoResponseShippingMethodName', 'GetDeviceInfoResponseShippingStatus', 'GetDeviceInfoResponseStatus', 'GetDeviceInfoResponseType', 'GetExtensionDevicesResponse', 'GetExtensionDevicesResponseNavigation', 'GetExtensionDevicesResponseNavigationFirstPage', 'GetExtensionDevicesResponsePaging', 'GetExtensionDevicesResponseRecordsItem', 'GetExtensionDevicesResponseRecordsItemLinePooling', 'GetExtensionDevicesResponseRecordsItemStatus', 'GetExtensionDevicesResponseRecordsItemType', 'GetExtensionForwardingNumberListResponse', 'GetExtensionForwardingNumberListResponseNavigation', 'GetExtensionForwardingNumberListResponseNavigationFirstPage', 'GetExtensionForwardingNumberListResponsePaging', 'GetExtensionForwardingNumberListResponseRecordsItem', 'GetExtensionForwardingNumberListResponseRecordsItemDevice', 'GetExtensionForwardingNumberListResponseRecordsItemFeaturesItem', 'GetExtensionForwardingNumberListResponseRecordsItemLabel', 'GetExtensionForwardingNumberListResponseRecordsItemType', 'GetExtensionGrantListResponse', 'GetExtensionGrantListResponseRecordsItem', 'GetExtensionGrantListResponseRecordsItemExtension', 'GetExtensionGrantListResponseRecordsItemExtensionType', 'GetExtensionListResponse', 'GetExtensionListResponseRecordsItem', 'GetExtensionListResponseRecordsItemAccount', 'GetExtensionListResponseRecordsItemCallQueueInfo', 'GetExtensionListResponseRecordsItemDepartmentsItem', 'GetExtensionListResponseRecordsItemRolesItem', 'GetExtensionListResponseRecordsItemSetupWizardState', 'GetExtensionListResponseRecordsItemStatus', 'GetExtensionListResponseRecordsItemType', 'GetExtensionPhoneNumbersResponse', 'GetExtensionPhoneNumbersResponseRecordsItem', 'GetExtensionPhoneNumbersResponseRecordsItemContactCenterProvider', 'GetExtensionPhoneNumbersResponseRecordsItemCountry', 'GetExtensionPhoneNumbersResponseRecordsItemExtension', 'GetExtensionPhoneNumbersResponseRecordsItemExtensionType', 'GetExtensionPhoneNumbersResponseRecordsItemFeaturesItem', 'GetExtensionPhoneNumbersResponseRecordsItemPaymentType', 'GetExtensionPhoneNumbersResponseRecordsItemType', 'GetExtensionPhoneNumbersResponseRecordsItemUsageType', 'GetGlipNoteInfo', 'GetGlipNoteInfoStatus', 'GetGlipNoteInfoType', 'GetLocationListResponse', 'GetLocationListResponseRecordsItem', 'GetLocationListResponseRecordsItemState', 'GetMessageInfoResponse', 'GetMessageInfoResponseAvailability', 'GetMessageInfoResponseDirection', 'GetMessageInfoResponseFaxResolution', 'GetMessageInfoResponseFrom', 'GetMessageInfoResponseMessageStatus', 'GetMessageInfoResponsePriority', 'GetMessageInfoResponseReadStatus', 'GetMessageInfoResponseToItem', 'GetMessageInfoResponseToItemFaxErrorCode', 'GetMessageInfoResponseToItemMessageStatus', 'GetMessageInfoResponseType', 'GetMessageInfoResponseVmTranscriptionStatus', 'GetMessageList', 'GetMessageMultiResponseItem', 'GetMessageMultiResponseItemBody', 'GetMessageMultiResponseItemBodyAvailability', 'GetMessageMultiResponseItemBodyDirection', 'GetMessageMultiResponseItemBodyFaxResolution', 'GetMessageMultiResponseItemBodyFrom', 'GetMessageMultiResponseItemBodyMessageStatus', 'GetMessageMultiResponseItemBodyPriority', 'GetMessageMultiResponseItemBodyReadStatus', 'GetMessageMultiResponseItemBodyToItem', 'GetMessageMultiResponseItemBodyType', 'GetMessageMultiResponseItemBodyVmTranscriptionStatus', 'GetMessageSyncResponse', 'GetMessageSyncResponseSyncInfo', 'GetMessageSyncResponseSyncInfoSyncType', 'GetPresenceInfo', 'GetPresenceInfoDndStatus', 'GetPresenceInfoExtension', 'GetPresenceInfoMeetingStatus', 'GetPresenceInfoPresenceStatus', 'GetPresenceInfoTelephonyStatus', 'GetPresenceInfoUserStatus', 'GetRingOutStatusResponse', 'GetRingOutStatusResponseIntId', 'GetRingOutStatusResponseStatus', 'GetRingOutStatusResponseStatusCallStatus', 'GetRingOutStatusResponseStatusCalleeStatus', 'GetRingOutStatusResponseStatusCallerStatus', 'GetServiceInfoResponse', 'GetServiceInfoResponseBillingPlan', 'GetServiceInfoResponseBillingPlanDurationUnit', 'GetServiceInfoResponseBillingPlanType', 'GetServiceInfoResponseBrand', 'GetServiceInfoResponseContractedCountry', 'GetServiceInfoResponseLimits', 'GetServiceInfoResponsePackage', 'GetServiceInfoResponseServiceFeaturesItem', 'GetServiceInfoResponseServiceFeaturesItemFeatureName', 'GetServiceInfoResponseServicePlan', 'GetServiceInfoResponseServicePlanFreemiumProductType', 'GetServiceInfoResponseTargetServicePlan', 'GetServiceInfoResponseTargetServicePlanFreemiumProductType', 'GetStateListResponse', 'GetStateListResponseRecordsItem', 'GetStateListResponseRecordsItemCountry', 'GetTimezoneListResponse', 'GetTimezoneListResponseNavigation', 'GetTimezoneListResponseNavigationFirstPage', 'GetTimezoneListResponsePaging', 'GetTimezoneListResponseRecordsItem', 'GetUserBusinessHoursResponse', 'GetUserBusinessHoursResponseSchedule', 'GetUserSettingResponse', 'GetUserSettingResponseRecording', 'GetUserSettingResponseRecordingAutoRecording', 'GetUserSettingResponseScheduleMeeting', 'GetUserSettingResponseScheduleMeetingAudioOptionsItem', 'GetUserSettingResponseScheduleMeetingRequirePasswordForPmiMeetings', 'GetVersionResponse', 'GetVersionsResponse', 'GetVersionsResponseApiVersionsItem', 'GlipChatsList', 'GlipChatsListWithoutNavigation', 'GlipChatsListWithoutNavigationRecordsItem', 'GlipChatsListWithoutNavigationRecordsItemStatus', 'GlipChatsListWithoutNavigationRecordsItemType', 'GlipCompleteTask', 'GlipCompleteTaskStatus', 'GlipConversationInfo', 'GlipConversationInfoMembersItem', 'GlipConversationInfoType', 'GlipConversationsList', 'GlipCreateGroup', 'GlipCreateGroupType', 'GlipCreatePost', 'GlipCreatePostAttachmentsItem', 'GlipCreatePostAttachmentsItemRecurrence', 'GlipCreatePostAttachmentsItemType', 'GlipCreateTask', 'GlipCreateTaskColor', 'GlipCreateTaskCompletenessCondition', 'GlipEventCreate', 'GlipEventCreateColor', 'GlipEventCreateEndingOn', 'GlipEventCreateRecurrence', 'GlipEveryoneInfo', 'GlipEveryoneInfoType', 'GlipGroupList', 'GlipNoteCreate', 'GlipNoteInfo', 'GlipNoteInfoLastModifiedBy', 'GlipNoteInfoLockedBy', 'GlipNoteInfoStatus', 'GlipNoteInfoType', 'GlipNotesInfo', 'GlipPatchPostBody', 'GlipPatchTeamBody', 'GlipPersonInfo', 'GlipPostMembersIdsListBody', 'GlipPostMembersListBody', 'GlipPostPostBody', 'GlipPostPostBodyAttachmentsItem', 'GlipPostPostBodyAttachmentsItemType', 'GlipPostTeamBody', 'GlipPosts', 'GlipPostsList', 'GlipPostsRecordsItem', 'GlipPostsRecordsItemType', 'GlipPreferencesInfo', 'GlipPreferencesInfoChats', 'GlipPreferencesInfoChatsLeftRailMode', 'GlipTaskInfo', 'GlipTaskInfoAssigneesItem', 'GlipTaskInfoAssigneesItemStatus', 'GlipTaskInfoAttachmentsItem', 'GlipTaskInfoAttachmentsItemType', 'GlipTaskInfoColor', 'GlipTaskInfoCompletenessCondition', 'GlipTaskInfoCreator', 'GlipTaskInfoRecurrence', 'GlipTaskInfoRecurrenceEndingCondition', 'GlipTaskInfoRecurrenceSchedule', 'GlipTaskInfoStatus', 'GlipTaskInfoType', 'GlipTaskList', 'GlipTeamInfo', 'GlipTeamInfoStatus', 'GlipTeamInfoType', 'GlipTeamsList', 'GlipUpdateTask', 'GlipUpdateTaskAssigneesItem', 'GlipUpdateTaskColor', 'GlipUpdateTaskCompletenessCondition', 'HoldCallPartyResponse', 'HoldCallPartyResponseConferenceRole', 'HoldCallPartyResponseDirection', 'HoldCallPartyResponseFrom', 'HoldCallPartyResponseOwner', 'HoldCallPartyResponsePark', 'HoldCallPartyResponseRecordingsItem', 'HoldCallPartyResponseRingMeRole', 'HoldCallPartyResponseRingOutRole', 'HoldCallPartyResponseStatus', 'HoldCallPartyResponseStatusCode', 'HoldCallPartyResponseStatusPeerId', 'HoldCallPartyResponseStatusReason', 'HoldCallPartyResponseTo', 'IVRMenuInfo', 'IVRMenuInfoActionsItem', 'IVRMenuInfoActionsItemAction', 'IVRMenuInfoActionsItemExtension', 'IVRMenuInfoPrompt', 'IVRMenuInfoPromptAudio', 'IVRMenuInfoPromptLanguage', 'IVRMenuInfoPromptMode', 'IVRPrompts', 'IgnoreCallInQueueRequest', 'IgnoreRequestBody', 'LanguageList', 'ListAccountMeetingRecordingsResponse', 'ListAccountMeetingRecordingsResponseNavigation', 'ListAccountMeetingRecordingsResponseNavigationFirstPage', 'ListAccountMeetingRecordingsResponseNavigationLastPage', 'ListAccountMeetingRecordingsResponseNavigationNextPage', 'ListAccountMeetingRecordingsResponseNavigationPreviousPage', 'ListAccountMeetingRecordingsResponsePaging', 'ListAccountMeetingRecordingsResponseRecordsItem', 'ListAccountMeetingRecordingsResponseRecordsItemMeeting', 'ListAccountMeetingRecordingsResponseRecordsItemRecordingItem', 'ListAccountMeetingRecordingsResponseRecordsItemRecordingItemContentType', 'ListAccountMeetingRecordingsResponseRecordsItemRecordingItemStatus', 'ListAccountPhoneNumbersResponse', 'ListAccountPhoneNumbersResponseNavigation', 'ListAccountPhoneNumbersResponseNavigationFirstPage', 'ListAccountPhoneNumbersResponseNavigationLastPage', 'ListAccountPhoneNumbersResponseNavigationNextPage', 'ListAccountPhoneNumbersResponseNavigationPreviousPage', 'ListAccountPhoneNumbersResponsePaging', 'ListAccountPhoneNumbersResponseRecordsItem', 'ListAccountPhoneNumbersResponseRecordsItemContactCenterProvider', 'ListAccountPhoneNumbersResponseRecordsItemCountry', 'ListAccountPhoneNumbersResponseRecordsItemExtension', 'ListAccountPhoneNumbersResponseRecordsItemPaymentType', 'ListAccountPhoneNumbersResponseRecordsItemTemporaryNumber', 'ListAccountPhoneNumbersResponseRecordsItemType', 'ListAccountPhoneNumbersResponseRecordsItemUsageType', 'ListAccountPhoneNumbersStatus', 'ListAccountPhoneNumbersUsageTypeItem', 'ListAccountSwitchesResponse', 'ListAccountSwitchesResponseNavigation', 'ListAccountSwitchesResponseNavigationFirstPage', 'ListAccountSwitchesResponseNavigationLastPage', 'ListAccountSwitchesResponseNavigationNextPage', 'ListAccountSwitchesResponseNavigationPreviousPage', 'ListAccountSwitchesResponsePaging', 'ListAccountSwitchesResponseRecordsItem', 'ListAccountSwitchesResponseRecordsItemEmergencyAddress', 'ListAccountSwitchesResponseRecordsItemEmergencyLocation', 'ListAccountSwitchesResponseRecordsItemSite', 'ListAnsweringRulesResponse', 'ListAnsweringRulesResponseNavigation', 'ListAnsweringRulesResponseNavigationFirstPage', 'ListAnsweringRulesResponseNavigationLastPage', 'ListAnsweringRulesResponseNavigationNextPage', 'ListAnsweringRulesResponseNavigationPreviousPage', 'ListAnsweringRulesResponsePaging', 'ListAnsweringRulesResponseRecordsItem', 'ListAnsweringRulesResponseRecordsItemSharedLines', 'ListAnsweringRulesResponseRecordsItemType', 'ListAnsweringRulesView', 'ListAutomaticLocationUpdatesUsersResponse', 'ListAutomaticLocationUpdatesUsersResponseNavigation', 'ListAutomaticLocationUpdatesUsersResponseNavigationFirstPage', 'ListAutomaticLocationUpdatesUsersResponseNavigationLastPage', 'ListAutomaticLocationUpdatesUsersResponseNavigationNextPage', 'ListAutomaticLocationUpdatesUsersResponseNavigationPreviousPage', 'ListAutomaticLocationUpdatesUsersResponsePaging', 'ListAutomaticLocationUpdatesUsersResponseRecordsItem', 'ListAutomaticLocationUpdatesUsersResponseRecordsItemType', 'ListAutomaticLocationUpdatesUsersType', 'ListBlockedAllowedNumbersResponse', 'ListBlockedAllowedNumbersResponseNavigation', 'ListBlockedAllowedNumbersResponseNavigationFirstPage', 'ListBlockedAllowedNumbersResponseNavigationLastPage', 'ListBlockedAllowedNumbersResponseNavigationNextPage', 'ListBlockedAllowedNumbersResponseNavigationPreviousPage', 'ListBlockedAllowedNumbersResponsePaging', 'ListBlockedAllowedNumbersResponseRecordsItem', 'ListBlockedAllowedNumbersResponseRecordsItemStatus', 'ListBlockedAllowedNumbersStatus', 'ListCallMonitoringGroupMembersResponse', 'ListCallMonitoringGroupMembersResponseNavigation', 'ListCallMonitoringGroupMembersResponseNavigationFirstPage', 'ListCallMonitoringGroupMembersResponseNavigationLastPage', 'ListCallMonitoringGroupMembersResponseNavigationNextPage', 'ListCallMonitoringGroupMembersResponseNavigationPreviousPage', 'ListCallMonitoringGroupMembersResponsePaging', 'ListCallMonitoringGroupMembersResponseRecordsItem', 'ListCallMonitoringGroupMembersResponseRecordsItemPermissionsItem', 'ListCallMonitoringGroupsResponse', 'ListCallMonitoringGroupsResponseNavigation', 'ListCallMonitoringGroupsResponseNavigationFirstPage', 'ListCallMonitoringGroupsResponseNavigationLastPage', 'ListCallMonitoringGroupsResponseNavigationNextPage', 'ListCallMonitoringGroupsResponseNavigationPreviousPage', 'ListCallMonitoringGroupsResponsePaging', 'ListCallMonitoringGroupsResponseRecordsItem', 'ListCallQueueMembersResponse', 'ListCallQueueMembersResponseNavigation', 'ListCallQueueMembersResponseNavigationFirstPage', 'ListCallQueueMembersResponseNavigationLastPage', 'ListCallQueueMembersResponseNavigationNextPage', 'ListCallQueueMembersResponseNavigationPreviousPage', 'ListCallQueueMembersResponsePaging', 'ListCallQueueMembersResponseRecordsItem', 'ListCallQueuesResponse', 'ListCallQueuesResponseNavigation', 'ListCallQueuesResponseNavigationFirstPage', 'ListCallQueuesResponseNavigationLastPage', 'ListCallQueuesResponseNavigationNextPage', 'ListCallQueuesResponseNavigationPreviousPage', 'ListCallQueuesResponsePaging', 'ListCallQueuesResponseRecordsItem', 'ListCallRecordingCustomGreetingsResponse', 'ListCallRecordingCustomGreetingsResponseRecordsItem', 'ListCallRecordingCustomGreetingsResponseRecordsItemCustom', 'ListCallRecordingCustomGreetingsResponseRecordsItemLanguage', 'ListCallRecordingCustomGreetingsResponseRecordsItemType', 'ListCallRecordingCustomGreetingsType', 'ListCallRecordingExtensionsResponse', 'ListCallRecordingExtensionsResponseNavigation', 'ListCallRecordingExtensionsResponseNavigationFirstPage', 'ListCallRecordingExtensionsResponseNavigationLastPage', 'ListCallRecordingExtensionsResponseNavigationNextPage', 'ListCallRecordingExtensionsResponseNavigationPreviousPage', 'ListCallRecordingExtensionsResponsePaging', 'ListCallRecordingExtensionsResponseRecordsItem', 'ListChatNotesResponse', 'ListChatNotesResponseNavigation', 'ListChatNotesResponseRecordsItem', 'ListChatNotesResponseRecordsItemCreator', 'ListChatNotesResponseRecordsItemLastModifiedBy', 'ListChatNotesResponseRecordsItemLockedBy', 'ListChatNotesResponseRecordsItemStatus', 'ListChatNotesResponseRecordsItemType', 'ListChatNotesStatus', 'ListChatTasksAssigneeStatus', 'ListChatTasksAssignmentStatus', 'ListChatTasksResponse', 'ListChatTasksResponseRecordsItem', 'ListChatTasksResponseRecordsItemAssigneesItem', 'ListChatTasksResponseRecordsItemAssigneesItemStatus', 'ListChatTasksResponseRecordsItemAttachmentsItem', 'ListChatTasksResponseRecordsItemAttachmentsItemType', 'ListChatTasksResponseRecordsItemColor', 'ListChatTasksResponseRecordsItemCompletenessCondition', 'ListChatTasksResponseRecordsItemCreator', 'ListChatTasksResponseRecordsItemRecurrence', 'ListChatTasksResponseRecordsItemRecurrenceEndingCondition', 'ListChatTasksResponseRecordsItemRecurrenceSchedule', 'ListChatTasksResponseRecordsItemStatus', 'ListChatTasksResponseRecordsItemType', 'ListChatTasksStatusItem', 'ListCompanyActiveCallsDirectionItem', 'ListCompanyActiveCallsResponse', 'ListCompanyActiveCallsResponseNavigation', 'ListCompanyActiveCallsResponseNavigationFirstPage', 'ListCompanyActiveCallsResponseNavigationLastPage', 'ListCompanyActiveCallsResponseNavigationNextPage', 'ListCompanyActiveCallsResponseNavigationPreviousPage', 'ListCompanyActiveCallsResponsePaging', 'ListCompanyActiveCallsResponseRecordsItem', 'ListCompanyActiveCallsResponseRecordsItemAction', 'ListCompanyActiveCallsResponseRecordsItemBilling', 'ListCompanyActiveCallsResponseRecordsItemDelegate', 'ListCompanyActiveCallsResponseRecordsItemDirection', 'ListCompanyActiveCallsResponseRecordsItemExtension', 'ListCompanyActiveCallsResponseRecordsItemFrom', 'ListCompanyActiveCallsResponseRecordsItemFromDevice', 'ListCompanyActiveCallsResponseRecordsItemLegsItem', 'ListCompanyActiveCallsResponseRecordsItemLegsItemAction', 'ListCompanyActiveCallsResponseRecordsItemLegsItemBilling', 'ListCompanyActiveCallsResponseRecordsItemLegsItemDelegate', 'ListCompanyActiveCallsResponseRecordsItemLegsItemDirection', 'ListCompanyActiveCallsResponseRecordsItemLegsItemExtension', 'ListCompanyActiveCallsResponseRecordsItemLegsItemFrom', 'ListCompanyActiveCallsResponseRecordsItemLegsItemFromDevice', 'ListCompanyActiveCallsResponseRecordsItemLegsItemLegType', 'ListCompanyActiveCallsResponseRecordsItemLegsItemMessage', 'ListCompanyActiveCallsResponseRecordsItemLegsItemReason', 'ListCompanyActiveCallsResponseRecordsItemLegsItemRecording', 'ListCompanyActiveCallsResponseRecordsItemLegsItemRecordingType', 'ListCompanyActiveCallsResponseRecordsItemLegsItemResult', 'ListCompanyActiveCallsResponseRecordsItemLegsItemTo', 'ListCompanyActiveCallsResponseRecordsItemLegsItemToDevice', 'ListCompanyActiveCallsResponseRecordsItemLegsItemTransport', 'ListCompanyActiveCallsResponseRecordsItemLegsItemType', 'ListCompanyActiveCallsResponseRecordsItemMessage', 'ListCompanyActiveCallsResponseRecordsItemReason', 'ListCompanyActiveCallsResponseRecordsItemRecording', 'ListCompanyActiveCallsResponseRecordsItemRecordingType', 'ListCompanyActiveCallsResponseRecordsItemResult', 'ListCompanyActiveCallsResponseRecordsItemTo', 'ListCompanyActiveCallsResponseRecordsItemToDevice', 'ListCompanyActiveCallsResponseRecordsItemTransport', 'ListCompanyActiveCallsResponseRecordsItemType', 'ListCompanyActiveCallsTransportItem', 'ListCompanyActiveCallsTypeItem', 'ListCompanyActiveCallsView', 'ListCompanyAnsweringRulesResponse', 'ListCompanyAnsweringRulesResponseNavigation', 'ListCompanyAnsweringRulesResponseNavigationFirstPage', 'ListCompanyAnsweringRulesResponseNavigationLastPage', 'ListCompanyAnsweringRulesResponseNavigationNextPage', 'ListCompanyAnsweringRulesResponseNavigationPreviousPage', 'ListCompanyAnsweringRulesResponsePaging', 'ListCompanyAnsweringRulesResponseRecordsItem', 'ListCompanyAnsweringRulesResponseRecordsItemCalledNumbersItem', 'ListCompanyAnsweringRulesResponseRecordsItemExtension', 'ListCompanyAnsweringRulesResponseRecordsItemType', 'ListContactsResponse', 'ListContactsResponseGroups', 'ListContactsResponseNavigation', 'ListContactsResponseNavigationFirstPage', 'ListContactsResponseNavigationLastPage', 'ListContactsResponseNavigationNextPage', 'ListContactsResponseNavigationPreviousPage', 'ListContactsResponsePaging', 'ListContactsResponseRecordsItem', 'ListContactsResponseRecordsItemAvailability', 'ListContactsResponseRecordsItemBusinessAddress', 'ListContactsResponseRecordsItemHomeAddress', 'ListContactsResponseRecordsItemOtherAddress', 'ListContactsSortByItem', 'ListCountriesResponse', 'ListCountriesResponseNavigation', 'ListCountriesResponseNavigationFirstPage', 'ListCountriesResponseNavigationLastPage', 'ListCountriesResponseNavigationNextPage', 'ListCountriesResponseNavigationPreviousPage', 'ListCountriesResponsePaging', 'ListCountriesResponseRecordsItem', 'ListCustomFieldsResponse', 'ListCustomFieldsResponseRecordsItem', 'ListCustomFieldsResponseRecordsItemCategory', 'ListDataExportTasksResponse', 'ListDataExportTasksResponseNavigation', 'ListDataExportTasksResponseNavigationFirstPage', 'ListDataExportTasksResponseNavigationLastPage', 'ListDataExportTasksResponseNavigationNextPage', 'ListDataExportTasksResponseNavigationPreviousPage', 'ListDataExportTasksResponsePaging', 'ListDataExportTasksResponseTasksItem', 'ListDataExportTasksResponseTasksItemCreator', 'ListDataExportTasksResponseTasksItemDatasetsItem', 'ListDataExportTasksResponseTasksItemSpecific', 'ListDataExportTasksResponseTasksItemSpecificContactsItem', 'ListDataExportTasksResponseTasksItemStatus', 'ListDataExportTasksStatus', 'ListDepartmentMembersResponse', 'ListDepartmentMembersResponseNavigation', 'ListDepartmentMembersResponseNavigationFirstPage', 'ListDepartmentMembersResponseNavigationLastPage', 'ListDepartmentMembersResponseNavigationNextPage', 'ListDepartmentMembersResponseNavigationPreviousPage', 'ListDepartmentMembersResponsePaging', 'ListDepartmentMembersResponseRecordsItem', 'ListDevicesAutomaticLocationUpdates', 'ListDevicesAutomaticLocationUpdatesRecordsItem', 'ListDevicesAutomaticLocationUpdatesRecordsItemModel', 'ListDevicesAutomaticLocationUpdatesRecordsItemModelFeaturesItem', 'ListDevicesAutomaticLocationUpdatesRecordsItemPhoneLinesItem', 'ListDevicesAutomaticLocationUpdatesRecordsItemPhoneLinesItemLineType', 'ListDevicesAutomaticLocationUpdatesRecordsItemPhoneLinesItemPhoneInfo', 'ListDevicesAutomaticLocationUpdatesRecordsItemType', 'ListDevicesAutomaticLocationUpdatesResponse', 'ListDevicesAutomaticLocationUpdatesResponseNavigation', 'ListDevicesAutomaticLocationUpdatesResponseNavigationFirstPage', 'ListDevicesAutomaticLocationUpdatesResponseNavigationLastPage', 'ListDevicesAutomaticLocationUpdatesResponseNavigationNextPage', 'ListDevicesAutomaticLocationUpdatesResponseNavigationPreviousPage', 'ListDevicesAutomaticLocationUpdatesResponsePaging', 'ListDevicesAutomaticLocationUpdatesResponseRecordsItem', 'ListDevicesAutomaticLocationUpdatesResponseRecordsItemModel', 'ListDevicesAutomaticLocationUpdatesResponseRecordsItemModelFeaturesItem', 'ListDevicesAutomaticLocationUpdatesResponseRecordsItemPhoneLinesItem', 'ListDevicesAutomaticLocationUpdatesResponseRecordsItemPhoneLinesItemLineType', 'ListDevicesAutomaticLocationUpdatesResponseRecordsItemPhoneLinesItemPhoneInfo', 'ListDevicesAutomaticLocationUpdatesResponseRecordsItemType', 'ListDirectoryEntriesResponse', 'ListDirectoryEntriesResponse', 'ListDirectoryEntriesResponse', 'ListDirectoryEntriesResponse', 'ListDirectoryEntriesResponseErrorsItem', 'ListDirectoryEntriesResponseErrorsItem', 'ListDirectoryEntriesResponseErrorsItem', 'ListDirectoryEntriesResponseErrorsItemErrorCode', 'ListDirectoryEntriesResponseErrorsItemErrorCode', 'ListDirectoryEntriesResponseErrorsItemErrorCode', 'ListDirectoryEntriesResponsePaging', 'ListDirectoryEntriesResponseRecordsItem', 'ListDirectoryEntriesResponseRecordsItemAccount', 'ListDirectoryEntriesResponseRecordsItemAccountMainNumber', 'ListDirectoryEntriesResponseRecordsItemAccountMainNumberUsageType', 'ListDirectoryEntriesResponseRecordsItemPhoneNumbersItem', 'ListDirectoryEntriesResponseRecordsItemPhoneNumbersItemUsageType', 'ListDirectoryEntriesResponseRecordsItemProfileImage', 'ListDirectoryEntriesResponseRecordsItemSite', 'ListDirectoryEntriesType', 'ListEmergencyLocationsAddressStatus', 'ListEmergencyLocationsResponse', 'ListEmergencyLocationsResponseNavigation', 'ListEmergencyLocationsResponseNavigationFirstPage', 'ListEmergencyLocationsResponseNavigationLastPage', 'ListEmergencyLocationsResponseNavigationNextPage', 'ListEmergencyLocationsResponseNavigationPreviousPage', 'ListEmergencyLocationsResponsePaging', 'ListEmergencyLocationsResponseRecordsItem', 'ListEmergencyLocationsResponseRecordsItemAddress', 'ListEmergencyLocationsResponseRecordsItemAddressStatus', 'ListEmergencyLocationsResponseRecordsItemOwnersItem', 'ListEmergencyLocationsResponseRecordsItemSite', 'ListEmergencyLocationsResponseRecordsItemSyncStatus', 'ListEmergencyLocationsResponseRecordsItemUsageStatus', 'ListEmergencyLocationsResponseRecordsItemVisibility', 'ListEmergencyLocationsUsageStatus', 'ListExtensionActiveCallsDirectionItem', 'ListExtensionActiveCallsResponse', 'ListExtensionActiveCallsResponseNavigation', 'ListExtensionActiveCallsResponseNavigationFirstPage', 'ListExtensionActiveCallsResponseNavigationLastPage', 'ListExtensionActiveCallsResponseNavigationNextPage', 'ListExtensionActiveCallsResponseNavigationPreviousPage', 'ListExtensionActiveCallsResponsePaging', 'ListExtensionActiveCallsResponseRecordsItem', 'ListExtensionActiveCallsResponseRecordsItemAction', 'ListExtensionActiveCallsResponseRecordsItemBilling', 'ListExtensionActiveCallsResponseRecordsItemDelegate', 'ListExtensionActiveCallsResponseRecordsItemDirection', 'ListExtensionActiveCallsResponseRecordsItemExtension', 'ListExtensionActiveCallsResponseRecordsItemFrom', 'ListExtensionActiveCallsResponseRecordsItemFromDevice', 'ListExtensionActiveCallsResponseRecordsItemLegsItem', 'ListExtensionActiveCallsResponseRecordsItemLegsItemAction', 'ListExtensionActiveCallsResponseRecordsItemLegsItemBilling', 'ListExtensionActiveCallsResponseRecordsItemLegsItemDelegate', 'ListExtensionActiveCallsResponseRecordsItemLegsItemDirection', 'ListExtensionActiveCallsResponseRecordsItemLegsItemExtension', 'ListExtensionActiveCallsResponseRecordsItemLegsItemFrom', 'ListExtensionActiveCallsResponseRecordsItemLegsItemFromDevice', 'ListExtensionActiveCallsResponseRecordsItemLegsItemLegType', 'ListExtensionActiveCallsResponseRecordsItemLegsItemMessage', 'ListExtensionActiveCallsResponseRecordsItemLegsItemReason', 'ListExtensionActiveCallsResponseRecordsItemLegsItemRecording', 'ListExtensionActiveCallsResponseRecordsItemLegsItemRecordingType', 'ListExtensionActiveCallsResponseRecordsItemLegsItemResult', 'ListExtensionActiveCallsResponseRecordsItemLegsItemTo', 'ListExtensionActiveCallsResponseRecordsItemLegsItemToDevice', 'ListExtensionActiveCallsResponseRecordsItemLegsItemTransport', 'ListExtensionActiveCallsResponseRecordsItemLegsItemType', 'ListExtensionActiveCallsResponseRecordsItemMessage', 'ListExtensionActiveCallsResponseRecordsItemReason', 'ListExtensionActiveCallsResponseRecordsItemRecording', 'ListExtensionActiveCallsResponseRecordsItemRecordingType', 'ListExtensionActiveCallsResponseRecordsItemResult', 'ListExtensionActiveCallsResponseRecordsItemTo', 'ListExtensionActiveCallsResponseRecordsItemToDevice', 'ListExtensionActiveCallsResponseRecordsItemTransport', 'ListExtensionActiveCallsResponseRecordsItemType', 'ListExtensionActiveCallsTypeItem', 'ListExtensionActiveCallsView', 'ListExtensionDevicesFeature', 'ListExtensionDevicesLinePooling', 'ListExtensionDevicesResponse', 'ListExtensionDevicesResponseNavigation', 'ListExtensionDevicesResponseNavigationFirstPage', 'ListExtensionDevicesResponseNavigationLastPage', 'ListExtensionDevicesResponseNavigationNextPage', 'ListExtensionDevicesResponseNavigationPreviousPage', 'ListExtensionDevicesResponsePaging', 'ListExtensionDevicesResponseRecordsItem', 'ListExtensionDevicesResponseRecordsItemEmergency', 'ListExtensionDevicesResponseRecordsItemEmergencyAddress', 'ListExtensionDevicesResponseRecordsItemEmergencyAddressEditableStatus', 'ListExtensionDevicesResponseRecordsItemEmergencyAddressStatus', 'ListExtensionDevicesResponseRecordsItemEmergencyLocation', 'ListExtensionDevicesResponseRecordsItemEmergencyServiceAddress', 'ListExtensionDevicesResponseRecordsItemEmergencyServiceAddressSyncStatus', 'ListExtensionDevicesResponseRecordsItemEmergencySyncStatus', 'ListExtensionDevicesResponseRecordsItemExtension', 'ListExtensionDevicesResponseRecordsItemLinePooling', 'ListExtensionDevicesResponseRecordsItemModel', 'ListExtensionDevicesResponseRecordsItemModelAddonsItem', 'ListExtensionDevicesResponseRecordsItemModelFeaturesItem', 'ListExtensionDevicesResponseRecordsItemPhoneLinesItem', 'ListExtensionDevicesResponseRecordsItemPhoneLinesItemEmergencyAddress', 'ListExtensionDevicesResponseRecordsItemPhoneLinesItemLineType', 'ListExtensionDevicesResponseRecordsItemPhoneLinesItemPhoneInfo', 'ListExtensionDevicesResponseRecordsItemPhoneLinesItemPhoneInfoCountry', 'ListExtensionDevicesResponseRecordsItemPhoneLinesItemPhoneInfoExtension', 'ListExtensionDevicesResponseRecordsItemPhoneLinesItemPhoneInfoPaymentType', 'ListExtensionDevicesResponseRecordsItemPhoneLinesItemPhoneInfoType', 'ListExtensionDevicesResponseRecordsItemPhoneLinesItemPhoneInfoUsageType', 'ListExtensionDevicesResponseRecordsItemShipping', 'ListExtensionDevicesResponseRecordsItemShippingAddress', 'ListExtensionDevicesResponseRecordsItemShippingMethod', 'ListExtensionDevicesResponseRecordsItemShippingMethodId', 'ListExtensionDevicesResponseRecordsItemShippingMethodName', 'ListExtensionDevicesResponseRecordsItemShippingStatus', 'ListExtensionDevicesResponseRecordsItemSite', 'ListExtensionDevicesResponseRecordsItemStatus', 'ListExtensionDevicesResponseRecordsItemType', 'ListExtensionGrantsExtensionType', 'ListExtensionGrantsResponse', 'ListExtensionGrantsResponseNavigation', 'ListExtensionGrantsResponseNavigationFirstPage', 'ListExtensionGrantsResponseNavigationLastPage', 'ListExtensionGrantsResponseNavigationNextPage', 'ListExtensionGrantsResponseNavigationPreviousPage', 'ListExtensionGrantsResponsePaging', 'ListExtensionGrantsResponseRecordsItem', 'ListExtensionGrantsResponseRecordsItemExtension', 'ListExtensionGrantsResponseRecordsItemExtensionType', 'ListExtensionPhoneNumbersResponse', 'ListExtensionPhoneNumbersResponseNavigation', 'ListExtensionPhoneNumbersResponseNavigationFirstPage', 'ListExtensionPhoneNumbersResponseNavigationLastPage', 'ListExtensionPhoneNumbersResponseNavigationNextPage', 'ListExtensionPhoneNumbersResponseNavigationPreviousPage', 'ListExtensionPhoneNumbersResponsePaging', 'ListExtensionPhoneNumbersResponseRecordsItem', 'ListExtensionPhoneNumbersResponseRecordsItemContactCenterProvider', 'ListExtensionPhoneNumbersResponseRecordsItemCountry', 'ListExtensionPhoneNumbersResponseRecordsItemExtension', 'ListExtensionPhoneNumbersResponseRecordsItemExtensionContactCenterProvider', 'ListExtensionPhoneNumbersResponseRecordsItemExtensionType', 'ListExtensionPhoneNumbersResponseRecordsItemFeaturesItem', 'ListExtensionPhoneNumbersResponseRecordsItemPaymentType', 'ListExtensionPhoneNumbersResponseRecordsItemType', 'ListExtensionPhoneNumbersResponseRecordsItemUsageType', 'ListExtensionPhoneNumbersStatus', 'ListExtensionPhoneNumbersUsageTypeItem', 'ListExtensionsResponse', 'ListExtensionsResponseNavigation', 'ListExtensionsResponseNavigationFirstPage', 'ListExtensionsResponseNavigationLastPage', 'ListExtensionsResponseNavigationNextPage', 'ListExtensionsResponseNavigationPreviousPage', 'ListExtensionsResponsePaging', 'ListExtensionsResponseRecordsItem', 'ListExtensionsResponseRecordsItemAccount', 'ListExtensionsResponseRecordsItemCallQueueInfo', 'ListExtensionsResponseRecordsItemContact', 'ListExtensionsResponseRecordsItemContactBusinessAddress', 'ListExtensionsResponseRecordsItemContactPronouncedName', 'ListExtensionsResponseRecordsItemContactPronouncedNamePrompt', 'ListExtensionsResponseRecordsItemContactPronouncedNamePromptContentType', 'ListExtensionsResponseRecordsItemContactPronouncedNameType', 'ListExtensionsResponseRecordsItemCustomFieldsItem', 'ListExtensionsResponseRecordsItemDepartmentsItem', 'ListExtensionsResponseRecordsItemPermissions', 'ListExtensionsResponseRecordsItemPermissionsAdmin', 'ListExtensionsResponseRecordsItemPermissionsInternationalCalling', 'ListExtensionsResponseRecordsItemProfileImage', 'ListExtensionsResponseRecordsItemProfileImageScalesItem', 'ListExtensionsResponseRecordsItemReferencesItem', 'ListExtensionsResponseRecordsItemReferencesItemType', 'ListExtensionsResponseRecordsItemRegionalSettings', 'ListExtensionsResponseRecordsItemRegionalSettingsFormattingLocale', 'ListExtensionsResponseRecordsItemRegionalSettingsGreetingLanguage', 'ListExtensionsResponseRecordsItemRegionalSettingsHomeCountry', 'ListExtensionsResponseRecordsItemRegionalSettingsLanguage', 'ListExtensionsResponseRecordsItemRegionalSettingsTimeFormat', 'ListExtensionsResponseRecordsItemRegionalSettingsTimezone', 'ListExtensionsResponseRecordsItemRolesItem', 'ListExtensionsResponseRecordsItemServiceFeaturesItem', 'ListExtensionsResponseRecordsItemServiceFeaturesItemFeatureName', 'ListExtensionsResponseRecordsItemSetupWizardState', 'ListExtensionsResponseRecordsItemSite', 'ListExtensionsResponseRecordsItemStatus', 'ListExtensionsResponseRecordsItemStatusInfo', 'ListExtensionsResponseRecordsItemStatusInfoReason', 'ListExtensionsResponseRecordsItemType', 'ListExtensionsStatusItem', 'ListExtensionsTypeItem', 'ListFavoriteChatsResponse', 'ListFavoriteChatsResponseRecordsItem', 'ListFavoriteChatsResponseRecordsItemMembersItem', 'ListFavoriteChatsResponseRecordsItemStatus', 'ListFavoriteChatsResponseRecordsItemType', 'ListFavoriteContactsResponse', 'ListFavoriteContactsResponseRecordsItem', 'ListFaxCoverPagesResponse', 'ListFaxCoverPagesResponse', 'ListFaxCoverPagesResponseNavigation', 'ListFaxCoverPagesResponseNavigation', 'ListFaxCoverPagesResponseNavigationFirstPage', 'ListFaxCoverPagesResponseNavigationFirstPage', 'ListFaxCoverPagesResponseNavigationLastPage', 'ListFaxCoverPagesResponseNavigationNextPage', 'ListFaxCoverPagesResponseNavigationPreviousPage', 'ListFaxCoverPagesResponsePaging', 'ListFaxCoverPagesResponsePaging', 'ListFaxCoverPagesResponseRecordsItem', 'ListFaxCoverPagesResponseRecordsItem', 'ListForwardingNumbersResponse', 'ListForwardingNumbersResponseNavigation', 'ListForwardingNumbersResponseNavigationFirstPage', 'ListForwardingNumbersResponseNavigationLastPage', 'ListForwardingNumbersResponseNavigationNextPage', 'ListForwardingNumbersResponseNavigationPreviousPage', 'ListForwardingNumbersResponsePaging', 'ListForwardingNumbersResponseRecordsItem', 'ListForwardingNumbersResponseRecordsItemDevice', 'ListForwardingNumbersResponseRecordsItemFeaturesItem', 'ListForwardingNumbersResponseRecordsItemLabel', 'ListForwardingNumbersResponseRecordsItemType', 'ListGlipChatsResponse', 'ListGlipChatsResponseNavigation', 'ListGlipChatsResponseRecordsItem', 'ListGlipChatsResponseRecordsItemMembersItem', 'ListGlipChatsResponseRecordsItemStatus', 'ListGlipChatsResponseRecordsItemType', 'ListGlipChatsTypeItem', 'ListGlipConversationsResponse', 'ListGlipConversationsResponseNavigation', 'ListGlipConversationsResponseRecordsItem', 'ListGlipConversationsResponseRecordsItemMembersItem', 'ListGlipConversationsResponseRecordsItemType', 'ListGlipGroupPostsResponse', 'ListGlipGroupPostsResponseNavigation', 'ListGlipGroupPostsResponseRecordsItem', 'ListGlipGroupPostsResponseRecordsItemAttachmentsItem', 'ListGlipGroupPostsResponseRecordsItemAttachmentsItemAuthor', 'ListGlipGroupPostsResponseRecordsItemAttachmentsItemColor', 'ListGlipGroupPostsResponseRecordsItemAttachmentsItemEndingOn', 'ListGlipGroupPostsResponseRecordsItemAttachmentsItemFieldsItem', 'ListGlipGroupPostsResponseRecordsItemAttachmentsItemFieldsItemStyle', 'ListGlipGroupPostsResponseRecordsItemAttachmentsItemFootnote', 'ListGlipGroupPostsResponseRecordsItemAttachmentsItemRecurrence', 'ListGlipGroupPostsResponseRecordsItemAttachmentsItemType', 'ListGlipGroupPostsResponseRecordsItemMentionsItem', 'ListGlipGroupPostsResponseRecordsItemMentionsItemType', 'ListGlipGroupPostsResponseRecordsItemType', 'ListGlipGroupWebhooksResponse', 'ListGlipGroupWebhooksResponseRecordsItem', 'ListGlipGroupWebhooksResponseRecordsItemStatus', 'ListGlipGroupsResponse', 'ListGlipGroupsResponseNavigation', 'ListGlipGroupsResponseRecordsItem', 'ListGlipGroupsResponseRecordsItemType', 'ListGlipGroupsType', 'ListGlipPostsResponse', 'ListGlipPostsResponseNavigation', 'ListGlipPostsResponseRecordsItem', 'ListGlipPostsResponseRecordsItemAttachmentsItem', 'ListGlipPostsResponseRecordsItemAttachmentsItemAuthor', 'ListGlipPostsResponseRecordsItemAttachmentsItemColor', 'ListGlipPostsResponseRecordsItemAttachmentsItemEndingOn', 'ListGlipPostsResponseRecordsItemAttachmentsItemFieldsItem', 'ListGlipPostsResponseRecordsItemAttachmentsItemFieldsItemStyle', 'ListGlipPostsResponseRecordsItemAttachmentsItemFootnote', 'ListGlipPostsResponseRecordsItemAttachmentsItemRecurrence', 'ListGlipPostsResponseRecordsItemAttachmentsItemType', 'ListGlipPostsResponseRecordsItemMentionsItem', 'ListGlipPostsResponseRecordsItemMentionsItemType', 'ListGlipPostsResponseRecordsItemType', 'ListGlipTeamsResponse', 'ListGlipTeamsResponseNavigation', 'ListGlipTeamsResponseRecordsItem', 'ListGlipTeamsResponseRecordsItemStatus', 'ListGlipTeamsResponseRecordsItemType', 'ListGlipWebhooksResponse', 'ListGlipWebhooksResponse', 'ListGlipWebhooksResponseRecordsItem', 'ListGlipWebhooksResponseRecordsItem', 'ListGlipWebhooksResponseRecordsItemStatus', 'ListGlipWebhooksResponseRecordsItemStatus', 'ListGroupEventsResponse', 'ListGroupEventsResponseColor', 'ListGroupEventsResponseEndingOn', 'ListGroupEventsResponseRecurrence', 'ListIVRPromptsResponse', 'ListIVRPromptsResponseNavigation', 'ListIVRPromptsResponseNavigationFirstPage', 'ListIVRPromptsResponseNavigationLastPage', 'ListIVRPromptsResponseNavigationNextPage', 'ListIVRPromptsResponseNavigationPreviousPage', 'ListIVRPromptsResponsePaging', 'ListIVRPromptsResponseRecordsItem', 'ListLanguagesResponse', 'ListLanguagesResponseNavigation', 'ListLanguagesResponseNavigationFirstPage', 'ListLanguagesResponseNavigationLastPage', 'ListLanguagesResponseNavigationNextPage', 'ListLanguagesResponseNavigationPreviousPage', 'ListLanguagesResponsePaging', 'ListLanguagesResponseRecordsItem', 'ListLocationsOrderBy', 'ListLocationsResponse', 'ListLocationsResponseNavigation', 'ListLocationsResponseNavigationFirstPage', 'ListLocationsResponseNavigationLastPage', 'ListLocationsResponseNavigationNextPage', 'ListLocationsResponseNavigationPreviousPage', 'ListLocationsResponsePaging', 'ListLocationsResponseRecordsItem', 'ListLocationsResponseRecordsItemState', 'ListMeetingRecordingsResponse', 'ListMeetingRecordingsResponseNavigation', 'ListMeetingRecordingsResponseNavigationFirstPage', 'ListMeetingRecordingsResponsePaging', 'ListMeetingRecordingsResponseRecordsItem', 'ListMeetingRecordingsResponseRecordsItemMeeting', 'ListMeetingRecordingsResponseRecordsItemRecordingItem', 'ListMeetingRecordingsResponseRecordsItemRecordingItemContentType', 'ListMeetingRecordingsResponseRecordsItemRecordingItemStatus', 'ListMeetingsResponse', 'ListMeetingsResponseNavigation', 'ListMeetingsResponseNavigationFirstPage', 'ListMeetingsResponseNavigationLastPage', 'ListMeetingsResponseNavigationNextPage', 'ListMeetingsResponseNavigationPreviousPage', 'ListMeetingsResponsePaging', 'ListMeetingsResponseRecordsItem', 'ListMeetingsResponseRecordsItemHost', 'ListMeetingsResponseRecordsItemLinks', 'ListMeetingsResponseRecordsItemMeetingType', 'ListMeetingsResponseRecordsItemOccurrencesItem', 'ListMeetingsResponseRecordsItemSchedule', 'ListMeetingsResponseRecordsItemScheduleTimeZone', 'ListMessagesAvailabilityItem', 'ListMessagesDirectionItem', 'ListMessagesMessageTypeItem', 'ListMessagesReadStatusItem', 'ListMessagesResponse', 'ListMessagesResponseNavigation', 'ListMessagesResponseNavigationFirstPage', 'ListMessagesResponseNavigationLastPage', 'ListMessagesResponseNavigationNextPage', 'ListMessagesResponseNavigationPreviousPage', 'ListMessagesResponsePaging', 'ListMessagesResponseRecordsItem', 'ListMessagesResponseRecordsItemAttachmentsItem', 'ListMessagesResponseRecordsItemAttachmentsItemType', 'ListMessagesResponseRecordsItemAvailability', 'ListMessagesResponseRecordsItemConversation', 'ListMessagesResponseRecordsItemDirection', 'ListMessagesResponseRecordsItemFaxResolution', 'ListMessagesResponseRecordsItemFrom', 'ListMessagesResponseRecordsItemMessageStatus', 'ListMessagesResponseRecordsItemPriority', 'ListMessagesResponseRecordsItemReadStatus', 'ListMessagesResponseRecordsItemToItem', 'ListMessagesResponseRecordsItemToItemFaxErrorCode', 'ListMessagesResponseRecordsItemToItemMessageStatus', 'ListMessagesResponseRecordsItemType', 'ListMessagesResponseRecordsItemVmTranscriptionStatus', 'ListNetworksResponse', 'ListNetworksResponseNavigation', 'ListNetworksResponseNavigationFirstPage', 'ListNetworksResponseNavigationLastPage', 'ListNetworksResponseNavigationNextPage', 'ListNetworksResponseNavigationPreviousPage', 'ListNetworksResponsePaging', 'ListNetworksResponseRecordsItem', 'ListNetworksResponseRecordsItemEmergencyLocation', 'ListNetworksResponseRecordsItemPrivateIpRangesItem', 'ListNetworksResponseRecordsItemPrivateIpRangesItemEmergencyAddress', 'ListNetworksResponseRecordsItemPublicIpRangesItem', 'ListNetworksResponseRecordsItemSite', 'ListPagingGroupDevicesResponse', 'ListPagingGroupDevicesResponseNavigation', 'ListPagingGroupDevicesResponseNavigationFirstPage', 'ListPagingGroupDevicesResponseNavigationLastPage', 'ListPagingGroupDevicesResponseNavigationNextPage', 'ListPagingGroupDevicesResponseNavigationPreviousPage', 'ListPagingGroupDevicesResponsePaging', 'ListPagingGroupDevicesResponseRecordsItem', 'ListPagingGroupUsersResponse', 'ListPagingGroupUsersResponseNavigation', 'ListPagingGroupUsersResponseNavigationFirstPage', 'ListPagingGroupUsersResponseNavigationLastPage', 'ListPagingGroupUsersResponseNavigationNextPage', 'ListPagingGroupUsersResponseNavigationPreviousPage', 'ListPagingGroupUsersResponsePaging', 'ListPagingGroupUsersResponseRecordsItem', 'ListRecentChatsResponse', 'ListRecentChatsResponseRecordsItem', 'ListRecentChatsResponseRecordsItemMembersItem', 'ListRecentChatsResponseRecordsItemStatus', 'ListRecentChatsResponseRecordsItemType', 'ListRecentChatsTypeItem', 'ListStandardGreetingsResponse', 'ListStandardGreetingsResponseNavigation', 'ListStandardGreetingsResponseNavigationFirstPage', 'ListStandardGreetingsResponseNavigationLastPage', 'ListStandardGreetingsResponseNavigationNextPage', 'ListStandardGreetingsResponseNavigationPreviousPage', 'ListStandardGreetingsResponsePaging', 'ListStandardGreetingsResponseRecordsItem', 'ListStandardGreetingsResponseRecordsItemCategory', 'ListStandardGreetingsResponseRecordsItemNavigation', 'ListStandardGreetingsResponseRecordsItemNavigationFirstPage', 'ListStandardGreetingsResponseRecordsItemNavigationLastPage', 'ListStandardGreetingsResponseRecordsItemNavigationNextPage', 'ListStandardGreetingsResponseRecordsItemNavigationPreviousPage', 'ListStandardGreetingsResponseRecordsItemPaging', 'ListStandardGreetingsResponseRecordsItemType', 'ListStandardGreetingsResponseRecordsItemUsageType', 'ListStandardGreetingsType', 'ListStandardGreetingsUsageType', 'ListStatesResponse', 'ListStatesResponseNavigation', 'ListStatesResponseNavigationFirstPage', 'ListStatesResponseNavigationLastPage', 'ListStatesResponseNavigationNextPage', 'ListStatesResponseNavigationPreviousPage', 'ListStatesResponsePaging', 'ListStatesResponseRecordsItem', 'ListStatesResponseRecordsItemCountry', 'ListSubscriptionsResponse', 'ListSubscriptionsResponseRecordsItem', 'ListSubscriptionsResponseRecordsItemBlacklistedData', 'ListSubscriptionsResponseRecordsItemDeliveryMode', 'ListSubscriptionsResponseRecordsItemDeliveryModeTransportType', 'ListSubscriptionsResponseRecordsItemDisabledFiltersItem', 'ListSubscriptionsResponseRecordsItemStatus', 'ListSubscriptionsResponseRecordsItemTransportType', 'ListTimezonesResponse', 'ListTimezonesResponseNavigation', 'ListTimezonesResponseNavigationFirstPage', 'ListTimezonesResponseNavigationLastPage', 'ListTimezonesResponseNavigationNextPage', 'ListTimezonesResponseNavigationPreviousPage', 'ListTimezonesResponsePaging', 'ListTimezonesResponseRecordsItem', 'ListUserMeetingRecordingsResponse', 'ListUserMeetingRecordingsResponseNavigation', 'ListUserMeetingRecordingsResponseNavigationFirstPage', 'ListUserMeetingRecordingsResponseNavigationLastPage', 'ListUserMeetingRecordingsResponseNavigationNextPage', 'ListUserMeetingRecordingsResponseNavigationPreviousPage', 'ListUserMeetingRecordingsResponsePaging', 'ListUserMeetingRecordingsResponseRecordsItem', 'ListUserMeetingRecordingsResponseRecordsItemMeeting', 'ListUserMeetingRecordingsResponseRecordsItemRecordingItem', 'ListUserMeetingRecordingsResponseRecordsItemRecordingItemContentType', 'ListUserMeetingRecordingsResponseRecordsItemRecordingItemStatus', 'ListUserTemplatesResponse', 'ListUserTemplatesResponseNavigation', 'ListUserTemplatesResponseNavigationFirstPage', 'ListUserTemplatesResponseNavigationLastPage', 'ListUserTemplatesResponseNavigationNextPage', 'ListUserTemplatesResponseNavigationPreviousPage', 'ListUserTemplatesResponsePaging', 'ListUserTemplatesResponseRecordsItem', 'ListUserTemplatesResponseRecordsItemType', 'ListUserTemplatesType', 'ListWirelessPointsResponse', 'ListWirelessPointsResponseNavigation', 'ListWirelessPointsResponseNavigationFirstPage', 'ListWirelessPointsResponseNavigationLastPage', 'ListWirelessPointsResponseNavigationNextPage', 'ListWirelessPointsResponseNavigationPreviousPage', 'ListWirelessPointsResponsePaging', 'ListWirelessPointsResponseRecordsItem', 'ListWirelessPointsResponseRecordsItemEmergencyAddress', 'ListWirelessPointsResponseRecordsItemEmergencyLocation', 'ListWirelessPointsResponseRecordsItemSite', 'MakeCallOutRequest', 'MakeCallOutRequestFrom', 'MakeCallOutRequestTo', 'MakeRingOutRequest', 'MakeRingOutRequestCountry', 'MakeRingOutRequestFrom', 'MakeRingOutRequestTo', 'MeetingRequestResource', 'MeetingRequestResourceAutoRecordType', 'MeetingRequestResourceMeetingType', 'MeetingRequestResourceRecurrence', 'MeetingRequestResourceRecurrenceFrequency', 'MeetingRequestResourceRecurrenceMonthlyByWeek', 'MeetingRequestResourceRecurrenceWeeklyByDay', 'MeetingRequestResourceRecurrenceWeeklyByDays', 'MeetingResponseResource', 'MeetingResponseResourceHost', 'MeetingResponseResourceLinks', 'MeetingResponseResourceMeetingType', 'MeetingResponseResourceOccurrencesItem', 'MeetingResponseResourceSchedule', 'MeetingResponseResourceScheduleTimeZone', 'MeetingServiceInfoRequest', 'MeetingServiceInfoRequestExternalUserInfo', 'MeetingServiceInfoResource', 'MeetingServiceInfoResourceDialInNumbersItem', 'MeetingServiceInfoResourceDialInNumbersItemCountry', 'MeetingUserSettingsResponse', 'MeetingUserSettingsResponseRecording', 'MeetingUserSettingsResponseRecordingAutoRecording', 'MeetingUserSettingsResponseScheduleMeeting', 'MeetingUserSettingsResponseScheduleMeetingAudioOptionsItem', 'MeetingUserSettingsResponseScheduleMeetingRequirePasswordForPmiMeetings', 'MeetingsResource', 'MeetingsResourceNavigation', 'MeetingsResourceNavigationNextPage', 'MeetingsResourcePaging', 'MessageStoreConfiguration', 'MessageStoreReport', 'MessageStoreReportArchive', 'MessageStoreReportArchiveRecordsItem', 'MessageStoreReportStatus', 'ModifyAccountBusinessAddressRequest', 'ModifyAccountBusinessAddressRequestBusinessAddress', 'ModifySubscriptionRequest', 'NetworksList', 'NetworksListRecordsItem', 'NetworksListRecordsItemPrivateIpRangesItem', 'NotificationSettings', 'NotificationSettingsEmailRecipientsItem', 'NotificationSettingsEmailRecipientsItemPermission', 'NotificationSettingsEmailRecipientsItemStatus', 'NotificationSettingsUpdateRequest', 'NotificationSettingsUpdateRequestInboundFaxes', 'NotificationSettingsUpdateRequestInboundTexts', 'NotificationSettingsUpdateRequestMissedCalls', 'NotificationSettingsUpdateRequestOutboundFaxes', 'NotificationSettingsUpdateRequestVoicemails', 'PagingOnlyGroupDevices', 'PagingOnlyGroupDevicesRecordsItem', 'PagingOnlyGroupUsers', 'PagingOnlyGroupUsersRecordsItem', 'ParsePhoneNumberRequest', 'ParsePhoneNumberRequest', 'ParsePhoneNumberResponse', 'ParsePhoneNumberResponse', 'ParsePhoneNumberResponseHomeCountry', 'ParsePhoneNumberResponseHomeCountry', 'ParsePhoneNumberResponsePhoneNumbersItem', 'ParsePhoneNumberResponsePhoneNumbersItem', 'ParsePhoneNumberResponsePhoneNumbersItemCountry', 'PartySuperviseRequest', 'PartySuperviseRequestMode', 'PartySuperviseResponse', 'PartySuperviseResponseDirection', 'PartyUpdateRequest', 'PartyUpdateRequestParty', 'PatchGlipEveryoneRequest', 'PatchGlipEveryoneResponse', 'PatchGlipEveryoneResponseType', 'PatchGlipPostRequest', 'PatchGlipPostResponse', 'PatchGlipPostResponseAttachmentsItem', 'PatchGlipPostResponseAttachmentsItemAuthor', 'PatchGlipPostResponseAttachmentsItemColor', 'PatchGlipPostResponseAttachmentsItemEndingOn', 'PatchGlipPostResponseAttachmentsItemFieldsItem', 'PatchGlipPostResponseAttachmentsItemFieldsItemStyle', 'PatchGlipPostResponseAttachmentsItemFootnote', 'PatchGlipPostResponseAttachmentsItemRecurrence', 'PatchGlipPostResponseAttachmentsItemType', 'PatchGlipPostResponseMentionsItem', 'PatchGlipPostResponseMentionsItemType', 'PatchGlipPostResponseType', 'PatchGlipTeamRequest', 'PatchGlipTeamResponse', 'PatchGlipTeamResponseStatus', 'PatchGlipTeamResponseType', 'PatchNoteResponse', 'PatchNoteResponseCreator', 'PatchNoteResponseLastModifiedBy', 'PatchNoteResponseLockedBy', 'PatchNoteResponseStatus', 'PatchNoteResponseType', 'PatchTaskRequest', 'PatchTaskRequestAssigneesItem', 'PatchTaskRequestAttachmentsItem', 'PatchTaskRequestAttachmentsItemType', 'PatchTaskRequestColor', 'PatchTaskRequestCompletenessCondition', 'PatchTaskRequestRecurrence', 'PatchTaskRequestRecurrenceEndingCondition', 'PatchTaskRequestRecurrenceSchedule', 'PatchTaskResponse', 'PatchTaskResponseRecordsItem', 'PatchTaskResponseRecordsItemAssigneesItem', 'PatchTaskResponseRecordsItemAssigneesItemStatus', 'PatchTaskResponseRecordsItemAttachmentsItem', 'PatchTaskResponseRecordsItemAttachmentsItemType', 'PatchTaskResponseRecordsItemColor', 'PatchTaskResponseRecordsItemCompletenessCondition', 'PatchTaskResponseRecordsItemCreator', 'PatchTaskResponseRecordsItemRecurrence', 'PatchTaskResponseRecordsItemRecurrenceEndingCondition', 'PatchTaskResponseRecordsItemRecurrenceSchedule', 'PatchTaskResponseRecordsItemStatus', 'PatchTaskResponseRecordsItemType', 'PatchUser2Request', 'PatchUser2RequestSchemasItem', 'PatchUser2Request_OperationsItem', 'PatchUser2Request_OperationsItemOp', 'PatchUser2Response', 'PatchUser2Response', 'PatchUser2Response', 'PatchUser2Response', 'PatchUser2Response', 'PatchUser2Response', 'PatchUser2Response', 'PatchUser2Response', 'PatchUser2ResponseAddressesItem', 'PatchUser2ResponseAddressesItemType', 'PatchUser2ResponseEmailsItem', 'PatchUser2ResponseEmailsItemType', 'PatchUser2ResponseMeta', 'PatchUser2ResponseMetaResourceType', 'PatchUser2ResponseName', 'PatchUser2ResponsePhoneNumbersItem', 'PatchUser2ResponsePhoneNumbersItemType', 'PatchUser2ResponsePhotosItem', 'PatchUser2ResponsePhotosItemType', 'PatchUser2ResponseSchemasItem', 'PatchUser2ResponseSchemasItem', 'PatchUser2ResponseSchemasItem', 'PatchUser2ResponseSchemasItem', 'PatchUser2ResponseSchemasItem', 'PatchUser2ResponseSchemasItem', 'PatchUser2ResponseSchemasItem', 'PatchUser2ResponseSchemasItem', 'PatchUser2ResponseScimType', 'PatchUser2ResponseScimType', 'PatchUser2ResponseScimType', 'PatchUser2ResponseScimType', 'PatchUser2ResponseScimType', 'PatchUser2ResponseScimType', 'PatchUser2ResponseScimType', 'PatchUser2ResponseUrnIetfParamsScimSchemasExtensionEnterprise_2_0_User', 'PauseResumeCallRecordingRequest', 'PauseResumeCallRecordingResponse', 'PersonalContactRequest', 'PickupCallPartyRequest', 'PickupCallPartyResponse', 'PickupCallPartyResponseConferenceRole', 'PickupCallPartyResponseDirection', 'PickupCallPartyResponseFrom', 'PickupCallPartyResponseOwner', 'PickupCallPartyResponsePark', 'PickupCallPartyResponseRecordingsItem', 'PickupCallPartyResponseRingMeRole', 'PickupCallPartyResponseRingOutRole', 'PickupCallPartyResponseStatus', 'PickupCallPartyResponseStatusCode', 'PickupCallPartyResponseStatusPeerId', 'PickupCallPartyResponseStatusReason', 'PickupCallPartyResponseTo', 'PickupTarget', 'PresenceInfoResource', 'PresenceInfoResourceDndStatus', 'PresenceInfoResourceUserStatus', 'PresenceInfoResponse', 'PresenceInfoResponseDndStatus', 'PresenceInfoResponseMeetingStatus', 'PresenceInfoResponsePresenceStatus', 'PresenceInfoResponseTelephonyStatus', 'PresenceInfoResponseUserStatus', 'PromptInfo', 'PublicMeetingInvitationResponse', 'ReadAPIVersionResponse', 'ReadAPIVersionsResponse', 'ReadAPIVersionsResponseApiVersionsItem', 'ReadAccountBusinessAddressResponse', 'ReadAccountBusinessAddressResponseBusinessAddress', 'ReadAccountFederationResponse', 'ReadAccountFederationResponse', 'ReadAccountFederationResponse', 'ReadAccountFederationResponse', 'ReadAccountFederationResponseAccountsItem', 'ReadAccountFederationResponseAccountsItemMainNumber', 'ReadAccountFederationResponseAccountsItemMainNumberUsageType', 'ReadAccountFederationResponseErrorsItem', 'ReadAccountFederationResponseErrorsItem', 'ReadAccountFederationResponseErrorsItem', 'ReadAccountFederationResponseErrorsItemErrorCode', 'ReadAccountFederationResponseErrorsItemErrorCode', 'ReadAccountFederationResponseErrorsItemErrorCode', 'ReadAccountInfoResponse', 'ReadAccountInfoResponseLimits', 'ReadAccountInfoResponseOperator', 'ReadAccountInfoResponseOperatorAccount', 'ReadAccountInfoResponseOperatorCallQueueInfo', 'ReadAccountInfoResponseOperatorContact', 'ReadAccountInfoResponseOperatorContactBusinessAddress', 'ReadAccountInfoResponseOperatorContactPronouncedName', 'ReadAccountInfoResponseOperatorContactPronouncedNamePrompt', 'ReadAccountInfoResponseOperatorContactPronouncedNamePromptContentType', 'ReadAccountInfoResponseOperatorContactPronouncedNameType', 'ReadAccountInfoResponseOperatorCustomFieldsItem', 'ReadAccountInfoResponseOperatorDepartmentsItem', 'ReadAccountInfoResponseOperatorPermissions', 'ReadAccountInfoResponseOperatorPermissionsAdmin', 'ReadAccountInfoResponseOperatorPermissionsInternationalCalling', 'ReadAccountInfoResponseOperatorProfileImage', 'ReadAccountInfoResponseOperatorProfileImageScalesItem', 'ReadAccountInfoResponseOperatorReferencesItem', 'ReadAccountInfoResponseOperatorReferencesItemType', 'ReadAccountInfoResponseOperatorRegionalSettings', 'ReadAccountInfoResponseOperatorRegionalSettingsFormattingLocale', 'ReadAccountInfoResponseOperatorRegionalSettingsGreetingLanguage', 'ReadAccountInfoResponseOperatorRegionalSettingsHomeCountry', 'ReadAccountInfoResponseOperatorRegionalSettingsLanguage', 'ReadAccountInfoResponseOperatorRegionalSettingsTimeFormat', 'ReadAccountInfoResponseOperatorRegionalSettingsTimezone', 'ReadAccountInfoResponseOperatorRolesItem', 'ReadAccountInfoResponseOperatorServiceFeaturesItem', 'ReadAccountInfoResponseOperatorServiceFeaturesItemFeatureName', 'ReadAccountInfoResponseOperatorSetupWizardState', 'ReadAccountInfoResponseOperatorSite', 'ReadAccountInfoResponseOperatorStatus', 'ReadAccountInfoResponseOperatorStatusInfo', 'ReadAccountInfoResponseOperatorStatusInfoReason', 'ReadAccountInfoResponseOperatorType', 'ReadAccountInfoResponseRegionalSettings', 'ReadAccountInfoResponseRegionalSettingsCurrency', 'ReadAccountInfoResponseRegionalSettingsFormattingLocale', 'ReadAccountInfoResponseRegionalSettingsGreetingLanguage', 'ReadAccountInfoResponseRegionalSettingsHomeCountry', 'ReadAccountInfoResponseRegionalSettingsLanguage', 'ReadAccountInfoResponseRegionalSettingsTimeFormat', 'ReadAccountInfoResponseRegionalSettingsTimezone', 'ReadAccountInfoResponseServiceInfo', 'ReadAccountInfoResponseServiceInfoBillingPlan', 'ReadAccountInfoResponseServiceInfoBillingPlanDurationUnit', 'ReadAccountInfoResponseServiceInfoBillingPlanType', 'ReadAccountInfoResponseServiceInfoBrand', 'ReadAccountInfoResponseServiceInfoBrandHomeCountry', 'ReadAccountInfoResponseServiceInfoContractedCountry', 'ReadAccountInfoResponseServiceInfoServicePlan', 'ReadAccountInfoResponseServiceInfoServicePlanFreemiumProductType', 'ReadAccountInfoResponseServiceInfoTargetServicePlan', 'ReadAccountInfoResponseServiceInfoTargetServicePlanFreemiumProductType', 'ReadAccountInfoResponseSetupWizardState', 'ReadAccountInfoResponseSignupInfo', 'ReadAccountInfoResponseSignupInfoSignupStateItem', 'ReadAccountInfoResponseSignupInfoVerificationReason', 'ReadAccountInfoResponseStatus', 'ReadAccountInfoResponseStatusInfo', 'ReadAccountInfoResponseStatusInfoReason', 'ReadAccountPhoneNumberResponse', 'ReadAccountPhoneNumberResponseContactCenterProvider', 'ReadAccountPhoneNumberResponseCountry', 'ReadAccountPhoneNumberResponseExtension', 'ReadAccountPhoneNumberResponsePaymentType', 'ReadAccountPhoneNumberResponseTemporaryNumber', 'ReadAccountPhoneNumberResponseType', 'ReadAccountPhoneNumberResponseUsageType', 'ReadAccountPresenceResponse', 'ReadAccountPresenceResponseNavigation', 'ReadAccountPresenceResponseNavigationFirstPage', 'ReadAccountPresenceResponseNavigationLastPage', 'ReadAccountPresenceResponseNavigationNextPage', 'ReadAccountPresenceResponseNavigationPreviousPage', 'ReadAccountPresenceResponsePaging', 'ReadAccountPresenceResponseRecordsItem', 'ReadAccountPresenceResponseRecordsItemActiveCallsItem', 'ReadAccountPresenceResponseRecordsItemActiveCallsItemAdditional', 'ReadAccountPresenceResponseRecordsItemActiveCallsItemAdditionalType', 'ReadAccountPresenceResponseRecordsItemActiveCallsItemDirection', 'ReadAccountPresenceResponseRecordsItemActiveCallsItemPrimary', 'ReadAccountPresenceResponseRecordsItemActiveCallsItemPrimaryType', 'ReadAccountPresenceResponseRecordsItemActiveCallsItemSipData', 'ReadAccountPresenceResponseRecordsItemActiveCallsItemTelephonyStatus', 'ReadAccountPresenceResponseRecordsItemDndStatus', 'ReadAccountPresenceResponseRecordsItemExtension', 'ReadAccountPresenceResponseRecordsItemMeetingStatus', 'ReadAccountPresenceResponseRecordsItemPresenceStatus', 'ReadAccountPresenceResponseRecordsItemTelephonyStatus', 'ReadAccountPresenceResponseRecordsItemUserStatus', 'ReadAccountServiceInfoResponse', 'ReadAccountServiceInfoResponseBillingPlan', 'ReadAccountServiceInfoResponseBillingPlanDurationUnit', 'ReadAccountServiceInfoResponseBillingPlanType', 'ReadAccountServiceInfoResponseBrand', 'ReadAccountServiceInfoResponseBrandHomeCountry', 'ReadAccountServiceInfoResponseContractedCountry', 'ReadAccountServiceInfoResponseLimits', 'ReadAccountServiceInfoResponsePackage', 'ReadAccountServiceInfoResponseServiceFeaturesItem', 'ReadAccountServiceInfoResponseServiceFeaturesItemFeatureName', 'ReadAccountServiceInfoResponseServicePlan', 'ReadAccountServiceInfoResponseServicePlanFreemiumProductType', 'ReadAccountServiceInfoResponseTargetServicePlan', 'ReadAccountServiceInfoResponseTargetServicePlanFreemiumProductType', 'ReadAnsweringRuleResponse', 'ReadAnsweringRuleResponseCallHandlingAction', 'ReadAnsweringRuleResponseCalledNumbersItem', 'ReadAnsweringRuleResponseCallersItem', 'ReadAnsweringRuleResponseForwarding', 'ReadAnsweringRuleResponseForwardingRingingMode', 'ReadAnsweringRuleResponseForwardingRulesItem', 'ReadAnsweringRuleResponseForwardingRulesItemForwardingNumbersItem', 'ReadAnsweringRuleResponseForwardingRulesItemForwardingNumbersItemLabel', 'ReadAnsweringRuleResponseForwardingRulesItemForwardingNumbersItemType', 'ReadAnsweringRuleResponseGreetingsItem', 'ReadAnsweringRuleResponseGreetingsItemCustom', 'ReadAnsweringRuleResponseGreetingsItemPreset', 'ReadAnsweringRuleResponseGreetingsItemType', 'ReadAnsweringRuleResponseGreetingsItemUsageType', 'ReadAnsweringRuleResponseQueue', 'ReadAnsweringRuleResponseQueueFixedOrderAgentsItem', 'ReadAnsweringRuleResponseQueueFixedOrderAgentsItemExtension', 'ReadAnsweringRuleResponseQueueHoldAudioInterruptionMode', 'ReadAnsweringRuleResponseQueueHoldTimeExpirationAction', 'ReadAnsweringRuleResponseQueueMaxCallersAction', 'ReadAnsweringRuleResponseQueueNoAnswerAction', 'ReadAnsweringRuleResponseQueueTransferItem', 'ReadAnsweringRuleResponseQueueTransferItemAction', 'ReadAnsweringRuleResponseQueueTransferItemExtension', 'ReadAnsweringRuleResponseQueueTransferMode', 'ReadAnsweringRuleResponseQueueUnconditionalForwardingItem', 'ReadAnsweringRuleResponseQueueUnconditionalForwardingItemAction', 'ReadAnsweringRuleResponseSchedule', 'ReadAnsweringRuleResponseScheduleRangesItem', 'ReadAnsweringRuleResponseScheduleRef', 'ReadAnsweringRuleResponseScheduleWeeklyRanges', 'ReadAnsweringRuleResponseScheduleWeeklyRangesFridayItem', 'ReadAnsweringRuleResponseScheduleWeeklyRangesMondayItem', 'ReadAnsweringRuleResponseScheduleWeeklyRangesSaturdayItem', 'ReadAnsweringRuleResponseScheduleWeeklyRangesSundayItem', 'ReadAnsweringRuleResponseScheduleWeeklyRangesThursdayItem', 'ReadAnsweringRuleResponseScheduleWeeklyRangesTuesdayItem', 'ReadAnsweringRuleResponseScheduleWeeklyRangesWednesdayItem', 'ReadAnsweringRuleResponseScreening', 'ReadAnsweringRuleResponseSharedLines', 'ReadAnsweringRuleResponseTransfer', 'ReadAnsweringRuleResponseTransferExtension', 'ReadAnsweringRuleResponseType', 'ReadAnsweringRuleResponseUnconditionalForwarding', 'ReadAnsweringRuleResponseUnconditionalForwardingAction', 'ReadAnsweringRuleResponseVoicemail', 'ReadAnsweringRuleResponseVoicemailRecipient', 'ReadAssistantsResponse', 'ReadAssistantsResponseRecordsItem', 'ReadAssistedUsersResponse', 'ReadAssistedUsersResponseRecordsItem', 'ReadAuthorizationProfileResponse', 'ReadAuthorizationProfileResponsePermissionsItem', 'ReadAuthorizationProfileResponsePermissionsItemEffectiveRole', 'ReadAuthorizationProfileResponsePermissionsItemPermission', 'ReadAuthorizationProfileResponsePermissionsItemPermissionSiteCompatible', 'ReadAuthorizationProfileResponsePermissionsItemScopesItem', 'ReadAutomaticLocationUpdatesTaskResponse', 'ReadAutomaticLocationUpdatesTaskResponseResult', 'ReadAutomaticLocationUpdatesTaskResponseResultRecordsItem', 'ReadAutomaticLocationUpdatesTaskResponseResultRecordsItemErrorsItem', 'ReadAutomaticLocationUpdatesTaskResponseStatus', 'ReadAutomaticLocationUpdatesTaskResponseType', 'ReadBlockedAllowedNumberResponse', 'ReadBlockedAllowedNumberResponseStatus', 'ReadCallPartyStatusResponse', 'ReadCallPartyStatusResponseConferenceRole', 'ReadCallPartyStatusResponseDirection', 'ReadCallPartyStatusResponseFrom', 'ReadCallPartyStatusResponseOwner', 'ReadCallPartyStatusResponsePark', 'ReadCallPartyStatusResponseRecordingsItem', 'ReadCallPartyStatusResponseRingMeRole', 'ReadCallPartyStatusResponseRingOutRole', 'ReadCallPartyStatusResponseStatus', 'ReadCallPartyStatusResponseStatusCode', 'ReadCallPartyStatusResponseStatusPeerId', 'ReadCallPartyStatusResponseStatusReason', 'ReadCallPartyStatusResponseTo', 'ReadCallQueueInfoResponse', 'ReadCallQueueInfoResponseServiceLevelSettings', 'ReadCallQueueInfoResponseStatus', 'ReadCallQueuePresenceResponse', 'ReadCallQueuePresenceResponseRecordsItem', 'ReadCallQueuePresenceResponseRecordsItemMember', 'ReadCallQueuePresenceResponseRecordsItemMemberSite', 'ReadCallRecordingResponse', 'ReadCallRecordingSettingsResponse', 'ReadCallRecordingSettingsResponseAutomatic', 'ReadCallRecordingSettingsResponseGreetingsItem', 'ReadCallRecordingSettingsResponseGreetingsItemMode', 'ReadCallRecordingSettingsResponseGreetingsItemType', 'ReadCallRecordingSettingsResponseOnDemand', 'ReadCallSessionStatusResponse', 'ReadCallSessionStatusResponseSession', 'ReadCallSessionStatusResponseSessionOrigin', 'ReadCallSessionStatusResponseSessionOriginType', 'ReadCallSessionStatusResponseSessionPartiesItem', 'ReadCallSessionStatusResponseSessionPartiesItemConferenceRole', 'ReadCallSessionStatusResponseSessionPartiesItemDirection', 'ReadCallSessionStatusResponseSessionPartiesItemFrom', 'ReadCallSessionStatusResponseSessionPartiesItemOwner', 'ReadCallSessionStatusResponseSessionPartiesItemPark', 'ReadCallSessionStatusResponseSessionPartiesItemRecordingsItem', 'ReadCallSessionStatusResponseSessionPartiesItemRingMeRole', 'ReadCallSessionStatusResponseSessionPartiesItemRingOutRole', 'ReadCallSessionStatusResponseSessionPartiesItemStatus', 'ReadCallSessionStatusResponseSessionPartiesItemStatusCode', 'ReadCallSessionStatusResponseSessionPartiesItemStatusPeerId', 'ReadCallSessionStatusResponseSessionPartiesItemStatusReason', 'ReadCallSessionStatusResponseSessionPartiesItemTo', 'ReadCallerBlockingSettingsResponse', 'ReadCallerBlockingSettingsResponseGreetingsItem', 'ReadCallerBlockingSettingsResponseGreetingsItemPreset', 'ReadCallerBlockingSettingsResponseMode', 'ReadCallerBlockingSettingsResponseNoCallerId', 'ReadCallerBlockingSettingsResponsePayPhones', 'ReadCompanyAnsweringRuleResponse', 'ReadCompanyAnsweringRuleResponseCallHandlingAction', 'ReadCompanyAnsweringRuleResponseCalledNumbersItem', 'ReadCompanyAnsweringRuleResponseCallersItem', 'ReadCompanyAnsweringRuleResponseExtension', 'ReadCompanyAnsweringRuleResponseGreetingsItem', 'ReadCompanyAnsweringRuleResponseGreetingsItemCustom', 'ReadCompanyAnsweringRuleResponseGreetingsItemPreset', 'ReadCompanyAnsweringRuleResponseGreetingsItemType', 'ReadCompanyAnsweringRuleResponseGreetingsItemUsageType', 'ReadCompanyAnsweringRuleResponseSchedule', 'ReadCompanyAnsweringRuleResponseScheduleRangesItem', 'ReadCompanyAnsweringRuleResponseScheduleRef', 'ReadCompanyAnsweringRuleResponseScheduleWeeklyRanges', 'ReadCompanyAnsweringRuleResponseScheduleWeeklyRangesFridayItem', 'ReadCompanyAnsweringRuleResponseScheduleWeeklyRangesMondayItem', 'ReadCompanyAnsweringRuleResponseScheduleWeeklyRangesSaturdayItem', 'ReadCompanyAnsweringRuleResponseScheduleWeeklyRangesSundayItem', 'ReadCompanyAnsweringRuleResponseScheduleWeeklyRangesThursdayItem', 'ReadCompanyAnsweringRuleResponseScheduleWeeklyRangesTuesdayItem', 'ReadCompanyAnsweringRuleResponseScheduleWeeklyRangesWednesdayItem', 'ReadCompanyAnsweringRuleResponseType', 'ReadCompanyBusinessHoursResponse', 'ReadCompanyBusinessHoursResponseSchedule', 'ReadCompanyBusinessHoursResponseScheduleWeeklyRanges', 'ReadCompanyBusinessHoursResponseScheduleWeeklyRangesFridayItem', 'ReadCompanyBusinessHoursResponseScheduleWeeklyRangesMondayItem', 'ReadCompanyBusinessHoursResponseScheduleWeeklyRangesSaturdayItem', 'ReadCompanyBusinessHoursResponseScheduleWeeklyRangesSundayItem', 'ReadCompanyBusinessHoursResponseScheduleWeeklyRangesThursdayItem', 'ReadCompanyBusinessHoursResponseScheduleWeeklyRangesTuesdayItem', 'ReadCompanyBusinessHoursResponseScheduleWeeklyRangesWednesdayItem', 'ReadCompanyCallLogDirectionItem', 'ReadCompanyCallLogRecordingType', 'ReadCompanyCallLogResponse', 'ReadCompanyCallLogResponseNavigation', 'ReadCompanyCallLogResponseNavigationFirstPage', 'ReadCompanyCallLogResponseNavigationLastPage', 'ReadCompanyCallLogResponseNavigationNextPage', 'ReadCompanyCallLogResponseNavigationPreviousPage', 'ReadCompanyCallLogResponsePaging', 'ReadCompanyCallLogResponseRecordsItem', 'ReadCompanyCallLogResponseRecordsItemAction', 'ReadCompanyCallLogResponseRecordsItemBilling', 'ReadCompanyCallLogResponseRecordsItemDelegate', 'ReadCompanyCallLogResponseRecordsItemDirection', 'ReadCompanyCallLogResponseRecordsItemExtension', 'ReadCompanyCallLogResponseRecordsItemFrom', 'ReadCompanyCallLogResponseRecordsItemFromDevice', 'ReadCompanyCallLogResponseRecordsItemLegsItem', 'ReadCompanyCallLogResponseRecordsItemLegsItemAction', 'ReadCompanyCallLogResponseRecordsItemLegsItemBilling', 'ReadCompanyCallLogResponseRecordsItemLegsItemDelegate', 'ReadCompanyCallLogResponseRecordsItemLegsItemDirection', 'ReadCompanyCallLogResponseRecordsItemLegsItemExtension', 'ReadCompanyCallLogResponseRecordsItemLegsItemFrom', 'ReadCompanyCallLogResponseRecordsItemLegsItemFromDevice', 'ReadCompanyCallLogResponseRecordsItemLegsItemLegType', 'ReadCompanyCallLogResponseRecordsItemLegsItemMessage', 'ReadCompanyCallLogResponseRecordsItemLegsItemReason', 'ReadCompanyCallLogResponseRecordsItemLegsItemRecording', 'ReadCompanyCallLogResponseRecordsItemLegsItemRecordingType', 'ReadCompanyCallLogResponseRecordsItemLegsItemResult', 'ReadCompanyCallLogResponseRecordsItemLegsItemTo', 'ReadCompanyCallLogResponseRecordsItemLegsItemToDevice', 'ReadCompanyCallLogResponseRecordsItemLegsItemTransport', 'ReadCompanyCallLogResponseRecordsItemLegsItemType', 'ReadCompanyCallLogResponseRecordsItemMessage', 'ReadCompanyCallLogResponseRecordsItemReason', 'ReadCompanyCallLogResponseRecordsItemRecording', 'ReadCompanyCallLogResponseRecordsItemRecordingType', 'ReadCompanyCallLogResponseRecordsItemResult', 'ReadCompanyCallLogResponseRecordsItemTo', 'ReadCompanyCallLogResponseRecordsItemToDevice', 'ReadCompanyCallLogResponseRecordsItemTransport', 'ReadCompanyCallLogResponseRecordsItemType', 'ReadCompanyCallLogTypeItem', 'ReadCompanyCallLogView', 'ReadCompanyCallRecordResponse', 'ReadCompanyCallRecordResponseAction', 'ReadCompanyCallRecordResponseBilling', 'ReadCompanyCallRecordResponseDelegate', 'ReadCompanyCallRecordResponseDirection', 'ReadCompanyCallRecordResponseExtension', 'ReadCompanyCallRecordResponseFrom', 'ReadCompanyCallRecordResponseFromDevice', 'ReadCompanyCallRecordResponseLegsItem', 'ReadCompanyCallRecordResponseLegsItemAction', 'ReadCompanyCallRecordResponseLegsItemBilling', 'ReadCompanyCallRecordResponseLegsItemDelegate', 'ReadCompanyCallRecordResponseLegsItemDirection', 'ReadCompanyCallRecordResponseLegsItemExtension', 'ReadCompanyCallRecordResponseLegsItemFrom', 'ReadCompanyCallRecordResponseLegsItemFromDevice', 'ReadCompanyCallRecordResponseLegsItemLegType', 'ReadCompanyCallRecordResponseLegsItemMessage', 'ReadCompanyCallRecordResponseLegsItemReason', 'ReadCompanyCallRecordResponseLegsItemRecording', 'ReadCompanyCallRecordResponseLegsItemRecordingType', 'ReadCompanyCallRecordResponseLegsItemResult', 'ReadCompanyCallRecordResponseLegsItemTo', 'ReadCompanyCallRecordResponseLegsItemToDevice', 'ReadCompanyCallRecordResponseLegsItemTransport', 'ReadCompanyCallRecordResponseLegsItemType', 'ReadCompanyCallRecordResponseMessage', 'ReadCompanyCallRecordResponseReason', 'ReadCompanyCallRecordResponseRecording', 'ReadCompanyCallRecordResponseRecordingType', 'ReadCompanyCallRecordResponseResult', 'ReadCompanyCallRecordResponseTo', 'ReadCompanyCallRecordResponseToDevice', 'ReadCompanyCallRecordResponseTransport', 'ReadCompanyCallRecordResponseType', 'ReadCompanyCallRecordView', 'ReadConferencingSettingsResponse', 'ReadConferencingSettingsResponsePhoneNumbersItem', 'ReadConferencingSettingsResponsePhoneNumbersItemCountry', 'ReadContactResponse', 'ReadContactResponseAvailability', 'ReadContactResponseBusinessAddress', 'ReadContactResponseHomeAddress', 'ReadContactResponseOtherAddress', 'ReadCountryResponse', 'ReadCustomGreetingResponse', 'ReadCustomGreetingResponseAnsweringRule', 'ReadCustomGreetingResponseContentType', 'ReadCustomGreetingResponseType', 'ReadDataExportTaskResponse', 'ReadDataExportTaskResponseCreator', 'ReadDataExportTaskResponseDatasetsItem', 'ReadDataExportTaskResponseSpecific', 'ReadDataExportTaskResponseSpecificContactsItem', 'ReadDataExportTaskResponseStatus', 'ReadDeviceResponse', 'ReadDeviceResponseBillingStatement', 'ReadDeviceResponseBillingStatementChargesItem', 'ReadDeviceResponseBillingStatementFeesItem', 'ReadDeviceResponseEmergency', 'ReadDeviceResponseEmergencyAddress', 'ReadDeviceResponseEmergencyAddressEditableStatus', 'ReadDeviceResponseEmergencyAddressStatus', 'ReadDeviceResponseEmergencyLocation', 'ReadDeviceResponseEmergencyServiceAddress', 'ReadDeviceResponseEmergencyServiceAddressSyncStatus', 'ReadDeviceResponseEmergencySyncStatus', 'ReadDeviceResponseExtension', 'ReadDeviceResponseLinePooling', 'ReadDeviceResponseModel', 'ReadDeviceResponseModelAddonsItem', 'ReadDeviceResponseModelFeaturesItem', 'ReadDeviceResponsePhoneLinesItem', 'ReadDeviceResponsePhoneLinesItemEmergencyAddress', 'ReadDeviceResponsePhoneLinesItemLineType', 'ReadDeviceResponsePhoneLinesItemPhoneInfo', 'ReadDeviceResponsePhoneLinesItemPhoneInfoCountry', 'ReadDeviceResponsePhoneLinesItemPhoneInfoExtension', 'ReadDeviceResponsePhoneLinesItemPhoneInfoPaymentType', 'ReadDeviceResponsePhoneLinesItemPhoneInfoType', 'ReadDeviceResponsePhoneLinesItemPhoneInfoUsageType', 'ReadDeviceResponseShipping', 'ReadDeviceResponseShippingAddress', 'ReadDeviceResponseShippingMethod', 'ReadDeviceResponseShippingMethodId', 'ReadDeviceResponseShippingMethodName', 'ReadDeviceResponseShippingStatus', 'ReadDeviceResponseSite', 'ReadDeviceResponseStatus', 'ReadDeviceResponseType', 'ReadDirectoryEntryResponse', 'ReadDirectoryEntryResponse', 'ReadDirectoryEntryResponse', 'ReadDirectoryEntryResponse', 'ReadDirectoryEntryResponseAccount', 'ReadDirectoryEntryResponseAccountMainNumber', 'ReadDirectoryEntryResponseAccountMainNumberUsageType', 'ReadDirectoryEntryResponseErrorsItem', 'ReadDirectoryEntryResponseErrorsItem', 'ReadDirectoryEntryResponseErrorsItem', 'ReadDirectoryEntryResponseErrorsItemErrorCode', 'ReadDirectoryEntryResponseErrorsItemErrorCode', 'ReadDirectoryEntryResponseErrorsItemErrorCode', 'ReadDirectoryEntryResponsePhoneNumbersItem', 'ReadDirectoryEntryResponsePhoneNumbersItemUsageType', 'ReadDirectoryEntryResponseProfileImage', 'ReadDirectoryEntryResponseSite', 'ReadEmergencyLocationResponse', 'ReadEmergencyLocationResponseAddress', 'ReadEmergencyLocationResponseAddressStatus', 'ReadEmergencyLocationResponseOwnersItem', 'ReadEmergencyLocationResponseSite', 'ReadEmergencyLocationResponseSyncStatus', 'ReadEmergencyLocationResponseUsageStatus', 'ReadEmergencyLocationResponseVisibility', 'ReadEventResponse', 'ReadEventResponseColor', 'ReadEventResponseEndingOn', 'ReadEventResponseRecurrence', 'ReadExtensionCallQueuePresenceResponse', 'ReadExtensionCallQueuePresenceResponseRecordsItem', 'ReadExtensionCallQueuePresenceResponseRecordsItemCallQueue', 'ReadExtensionCallerIdResponse', 'ReadExtensionCallerIdResponseByDeviceItem', 'ReadExtensionCallerIdResponseByDeviceItemCallerId', 'ReadExtensionCallerIdResponseByDeviceItemCallerIdPhoneInfo', 'ReadExtensionCallerIdResponseByDeviceItemDevice', 'ReadExtensionCallerIdResponseByFeatureItem', 'ReadExtensionCallerIdResponseByFeatureItemCallerId', 'ReadExtensionCallerIdResponseByFeatureItemCallerIdPhoneInfo', 'ReadExtensionCallerIdResponseByFeatureItemFeature', 'ReadExtensionResponse', 'ReadExtensionResponseAccount', 'ReadExtensionResponseCallQueueInfo', 'ReadExtensionResponseContact', 'ReadExtensionResponseContactBusinessAddress', 'ReadExtensionResponseContactPronouncedName', 'ReadExtensionResponseContactPronouncedNamePrompt', 'ReadExtensionResponseContactPronouncedNamePromptContentType', 'ReadExtensionResponseContactPronouncedNameType', 'ReadExtensionResponseCustomFieldsItem', 'ReadExtensionResponseDepartmentsItem', 'ReadExtensionResponsePermissions', 'ReadExtensionResponsePermissionsAdmin', 'ReadExtensionResponsePermissionsInternationalCalling', 'ReadExtensionResponseProfileImage', 'ReadExtensionResponseProfileImageScalesItem', 'ReadExtensionResponseReferencesItem', 'ReadExtensionResponseReferencesItemType', 'ReadExtensionResponseRegionalSettings', 'ReadExtensionResponseRegionalSettingsFormattingLocale', 'ReadExtensionResponseRegionalSettingsGreetingLanguage', 'ReadExtensionResponseRegionalSettingsHomeCountry', 'ReadExtensionResponseRegionalSettingsLanguage', 'ReadExtensionResponseRegionalSettingsTimeFormat', 'ReadExtensionResponseRegionalSettingsTimezone', 'ReadExtensionResponseRolesItem', 'ReadExtensionResponseServiceFeaturesItem', 'ReadExtensionResponseServiceFeaturesItemFeatureName', 'ReadExtensionResponseSetupWizardState', 'ReadExtensionResponseSite', 'ReadExtensionResponseStatus', 'ReadExtensionResponseStatusInfo', 'ReadExtensionResponseStatusInfoReason', 'ReadExtensionResponseType', 'ReadForwardingNumberResponse', 'ReadForwardingNumberResponseDevice', 'ReadForwardingNumberResponseFeaturesItem', 'ReadForwardingNumberResponseLabel', 'ReadForwardingNumberResponseType', 'ReadGlipCardResponse', 'ReadGlipCardResponse', 'ReadGlipCardResponseAuthor', 'ReadGlipCardResponseAuthor', 'ReadGlipCardResponseColor', 'ReadGlipCardResponseColor', 'ReadGlipCardResponseEndingOn', 'ReadGlipCardResponseEndingOn', 'ReadGlipCardResponseFieldsItem', 'ReadGlipCardResponseFieldsItem', 'ReadGlipCardResponseFieldsItemStyle', 'ReadGlipCardResponseFieldsItemStyle', 'ReadGlipCardResponseFootnote', 'ReadGlipCardResponseFootnote', 'ReadGlipCardResponseRecurrence', 'ReadGlipCardResponseRecurrence', 'ReadGlipCardResponseType', 'ReadGlipCardResponseType', 'ReadGlipChatResponse', 'ReadGlipChatResponseMembersItem', 'ReadGlipChatResponseStatus', 'ReadGlipChatResponseType', 'ReadGlipCompanyResponse', 'ReadGlipCompanyResponse', 'ReadGlipConversationResponse', 'ReadGlipConversationResponseMembersItem', 'ReadGlipConversationResponseType', 'ReadGlipEventsResponse', 'ReadGlipEventsResponse', 'ReadGlipEventsResponseNavigation', 'ReadGlipEventsResponseNavigation', 'ReadGlipEventsResponseRecordsItem', 'ReadGlipEventsResponseRecordsItem', 'ReadGlipEventsResponseRecordsItemColor', 'ReadGlipEventsResponseRecordsItemColor', 'ReadGlipEventsResponseRecordsItemEndingOn', 'ReadGlipEventsResponseRecordsItemEndingOn', 'ReadGlipEventsResponseRecordsItemRecurrence', 'ReadGlipEventsResponseRecordsItemRecurrence', 'ReadGlipEveryoneResponse', 'ReadGlipEveryoneResponseType', 'ReadGlipGroupResponse', 'ReadGlipGroupResponse', 'ReadGlipGroupResponseType', 'ReadGlipGroupResponseType', 'ReadGlipPersonResponse', 'ReadGlipPostResponse', 'ReadGlipPostResponseAttachmentsItem', 'ReadGlipPostResponseAttachmentsItemAuthor', 'ReadGlipPostResponseAttachmentsItemColor', 'ReadGlipPostResponseAttachmentsItemEndingOn', 'ReadGlipPostResponseAttachmentsItemFieldsItem', 'ReadGlipPostResponseAttachmentsItemFieldsItemStyle', 'ReadGlipPostResponseAttachmentsItemFootnote', 'ReadGlipPostResponseAttachmentsItemRecurrence', 'ReadGlipPostResponseAttachmentsItemType', 'ReadGlipPostResponseMentionsItem', 'ReadGlipPostResponseMentionsItemType', 'ReadGlipPostResponseType', 'ReadGlipPostsResponse', 'ReadGlipPostsResponseNavigation', 'ReadGlipPostsResponseRecordsItem', 'ReadGlipPostsResponseRecordsItemAttachmentsItem', 'ReadGlipPostsResponseRecordsItemAttachmentsItemAuthor', 'ReadGlipPostsResponseRecordsItemAttachmentsItemColor', 'ReadGlipPostsResponseRecordsItemAttachmentsItemEndingOn', 'ReadGlipPostsResponseRecordsItemAttachmentsItemFieldsItem', 'ReadGlipPostsResponseRecordsItemAttachmentsItemFieldsItemStyle', 'ReadGlipPostsResponseRecordsItemAttachmentsItemFootnote', 'ReadGlipPostsResponseRecordsItemAttachmentsItemRecurrence', 'ReadGlipPostsResponseRecordsItemAttachmentsItemType', 'ReadGlipPostsResponseRecordsItemMentionsItem', 'ReadGlipPostsResponseRecordsItemMentionsItemType', 'ReadGlipPostsResponseRecordsItemType', 'ReadGlipPreferencesResponse', 'ReadGlipPreferencesResponseChats', 'ReadGlipPreferencesResponseChatsLeftRailMode', 'ReadGlipTeamResponse', 'ReadGlipTeamResponseStatus', 'ReadGlipTeamResponseType', 'ReadGlipWebhookResponse', 'ReadGlipWebhookResponseRecordsItem', 'ReadGlipWebhookResponseRecordsItemStatus', 'ReadIVRMenuResponse', 'ReadIVRMenuResponseActionsItem', 'ReadIVRMenuResponseActionsItemAction', 'ReadIVRMenuResponseActionsItemExtension', 'ReadIVRMenuResponsePrompt', 'ReadIVRMenuResponsePromptAudio', 'ReadIVRMenuResponsePromptLanguage', 'ReadIVRMenuResponsePromptMode', 'ReadIVRPromptResponse', 'ReadLanguageResponse', 'ReadMeetingInvitationResponse', 'ReadMeetingResponse', 'ReadMeetingResponseHost', 'ReadMeetingResponseLinks', 'ReadMeetingResponseMeetingType', 'ReadMeetingResponseOccurrencesItem', 'ReadMeetingResponseSchedule', 'ReadMeetingResponseScheduleTimeZone', 'ReadMeetingServiceInfoResponse', 'ReadMeetingServiceInfoResponseDialInNumbersItem', 'ReadMeetingServiceInfoResponseDialInNumbersItemCountry', 'ReadMeetingServiceInfoResponseExternalUserInfo', 'ReadMessageContentContentDisposition', 'ReadMessageResponse', 'ReadMessageResponse', 'ReadMessageResponseAttachmentsItem', 'ReadMessageResponseAttachmentsItemType', 'ReadMessageResponseAvailability', 'ReadMessageResponseBody', 'ReadMessageResponseBodyAttachmentsItem', 'ReadMessageResponseBodyAttachmentsItemType', 'ReadMessageResponseBodyAvailability', 'ReadMessageResponseBodyConversation', 'ReadMessageResponseBodyDirection', 'ReadMessageResponseBodyFaxResolution', 'ReadMessageResponseBodyFrom', 'ReadMessageResponseBodyMessageStatus', 'ReadMessageResponseBodyPriority', 'ReadMessageResponseBodyReadStatus', 'ReadMessageResponseBodyToItem', 'ReadMessageResponseBodyType', 'ReadMessageResponseBodyVmTranscriptionStatus', 'ReadMessageResponseConversation', 'ReadMessageResponseDirection', 'ReadMessageResponseFaxResolution', 'ReadMessageResponseFrom', 'ReadMessageResponseMessageStatus', 'ReadMessageResponsePriority', 'ReadMessageResponseReadStatus', 'ReadMessageResponseToItem', 'ReadMessageResponseToItemFaxErrorCode', 'ReadMessageResponseToItemMessageStatus', 'ReadMessageResponseType', 'ReadMessageResponseVmTranscriptionStatus', 'ReadMessageStoreConfigurationResponse', 'ReadMessageStoreReportArchiveResponse', 'ReadMessageStoreReportArchiveResponseRecordsItem', 'ReadMessageStoreReportTaskResponse', 'ReadMessageStoreReportTaskResponseStatus', 'ReadNetworkResponse', 'ReadNetworkResponseEmergencyLocation', 'ReadNetworkResponsePrivateIpRangesItem', 'ReadNetworkResponsePrivateIpRangesItemEmergencyAddress', 'ReadNetworkResponsePublicIpRangesItem', 'ReadNetworkResponseSite', 'ReadNotificationSettingsResponse', 'ReadNotificationSettingsResponseEmailRecipientsItem', 'ReadNotificationSettingsResponseEmailRecipientsItemPermission', 'ReadNotificationSettingsResponseEmailRecipientsItemStatus', 'ReadNotificationSettingsResponseInboundFaxes', 'ReadNotificationSettingsResponseInboundTexts', 'ReadNotificationSettingsResponseMissedCalls', 'ReadNotificationSettingsResponseOutboundFaxes', 'ReadNotificationSettingsResponseVoicemails', 'ReadRingOutCallStatusDeprecatedResponse', 'ReadRingOutCallStatusDeprecatedResponseStatus', 'ReadRingOutCallStatusDeprecatedResponseStatusCallStatus', 'ReadRingOutCallStatusDeprecatedResponseStatusCalleeStatus', 'ReadRingOutCallStatusDeprecatedResponseStatusCallerStatus', 'ReadRingOutCallStatusResponse', 'ReadRingOutCallStatusResponseStatus', 'ReadRingOutCallStatusResponseStatusCallStatus', 'ReadRingOutCallStatusResponseStatusCalleeStatus', 'ReadRingOutCallStatusResponseStatusCallerStatus', 'ReadServiceProviderConfig2Response', 'ReadServiceProviderConfig2ResponseAuthenticationSchemesItem', 'ReadServiceProviderConfig2ResponseBulk', 'ReadServiceProviderConfig2ResponseChangePassword', 'ReadServiceProviderConfig2ResponseEtag', 'ReadServiceProviderConfig2ResponseFilter', 'ReadServiceProviderConfig2ResponsePatch', 'ReadServiceProviderConfig2ResponseSchemasItem', 'ReadServiceProviderConfig2ResponseSort', 'ReadServiceProviderConfig2ResponseXmlDataFormat', 'ReadServiceProviderConfigResponse', 'ReadServiceProviderConfigResponseAuthenticationSchemesItem', 'ReadServiceProviderConfigResponseBulk', 'ReadServiceProviderConfigResponseChangePassword', 'ReadServiceProviderConfigResponseEtag', 'ReadServiceProviderConfigResponseFilter', 'ReadServiceProviderConfigResponsePatch', 'ReadServiceProviderConfigResponseSchemasItem', 'ReadServiceProviderConfigResponseSort', 'ReadServiceProviderConfigResponseXmlDataFormat', 'ReadStandardGreetingResponse', 'ReadStandardGreetingResponseCategory', 'ReadStandardGreetingResponseNavigation', 'ReadStandardGreetingResponseNavigationFirstPage', 'ReadStandardGreetingResponseNavigationLastPage', 'ReadStandardGreetingResponseNavigationNextPage', 'ReadStandardGreetingResponseNavigationPreviousPage', 'ReadStandardGreetingResponsePaging', 'ReadStandardGreetingResponseType', 'ReadStandardGreetingResponseUsageType', 'ReadStateResponse', 'ReadStateResponseCountry', 'ReadSubscriptionResponse', 'ReadSubscriptionResponseBlacklistedData', 'ReadSubscriptionResponseDeliveryMode', 'ReadSubscriptionResponseDeliveryModeTransportType', 'ReadSubscriptionResponseDisabledFiltersItem', 'ReadSubscriptionResponseStatus', 'ReadSubscriptionResponseTransportType', 'ReadSwitchResponse', 'ReadSwitchResponseEmergencyAddress', 'ReadSwitchResponseEmergencyLocation', 'ReadSwitchResponseSite', 'ReadTaskResponse', 'ReadTaskResponseAssigneesItem', 'ReadTaskResponseAssigneesItemStatus', 'ReadTaskResponseAttachmentsItem', 'ReadTaskResponseAttachmentsItemType', 'ReadTaskResponseColor', 'ReadTaskResponseCompletenessCondition', 'ReadTaskResponseCreator', 'ReadTaskResponseRecurrence', 'ReadTaskResponseRecurrenceEndingCondition', 'ReadTaskResponseRecurrenceSchedule', 'ReadTaskResponseStatus', 'ReadTaskResponseType', 'ReadTimezoneResponse', 'ReadUnifiedPresenceResponse', 'ReadUnifiedPresenceResponse', 'ReadUnifiedPresenceResponseBody', 'ReadUnifiedPresenceResponseBodyGlip', 'ReadUnifiedPresenceResponseBodyGlipAvailability', 'ReadUnifiedPresenceResponseBodyGlipStatus', 'ReadUnifiedPresenceResponseBodyGlipVisibility', 'ReadUnifiedPresenceResponseBodyMeeting', 'ReadUnifiedPresenceResponseBodyMeetingStatus', 'ReadUnifiedPresenceResponseBodyStatus', 'ReadUnifiedPresenceResponseBodyTelephony', 'ReadUnifiedPresenceResponseBodyTelephonyAvailability', 'ReadUnifiedPresenceResponseBodyTelephonyStatus', 'ReadUnifiedPresenceResponseBodyTelephonyVisibility', 'ReadUnifiedPresenceResponseGlip', 'ReadUnifiedPresenceResponseGlipAvailability', 'ReadUnifiedPresenceResponseGlipStatus', 'ReadUnifiedPresenceResponseGlipVisibility', 'ReadUnifiedPresenceResponseMeeting', 'ReadUnifiedPresenceResponseMeetingStatus', 'ReadUnifiedPresenceResponseStatus', 'ReadUnifiedPresenceResponseTelephony', 'ReadUnifiedPresenceResponseTelephonyAvailability', 'ReadUnifiedPresenceResponseTelephonyStatus', 'ReadUnifiedPresenceResponseTelephonyVisibility', 'ReadUser2Response', 'ReadUser2Response', 'ReadUser2Response', 'ReadUser2Response', 'ReadUser2Response', 'ReadUser2Response', 'ReadUser2ResponseAddressesItem', 'ReadUser2ResponseAddressesItemType', 'ReadUser2ResponseEmailsItem', 'ReadUser2ResponseEmailsItemType', 'ReadUser2ResponseMeta', 'ReadUser2ResponseMetaResourceType', 'ReadUser2ResponseName', 'ReadUser2ResponsePhoneNumbersItem', 'ReadUser2ResponsePhoneNumbersItemType', 'ReadUser2ResponsePhotosItem', 'ReadUser2ResponsePhotosItemType', 'ReadUser2ResponseSchemasItem', 'ReadUser2ResponseSchemasItem', 'ReadUser2ResponseSchemasItem', 'ReadUser2ResponseSchemasItem', 'ReadUser2ResponseSchemasItem', 'ReadUser2ResponseSchemasItem', 'ReadUser2ResponseScimType', 'ReadUser2ResponseScimType', 'ReadUser2ResponseScimType', 'ReadUser2ResponseScimType', 'ReadUser2ResponseScimType', 'ReadUser2ResponseUrnIetfParamsScimSchemasExtensionEnterprise_2_0_User', 'ReadUserBusinessHoursResponse', 'ReadUserBusinessHoursResponseSchedule', 'ReadUserBusinessHoursResponseScheduleWeeklyRanges', 'ReadUserBusinessHoursResponseScheduleWeeklyRangesFridayItem', 'ReadUserBusinessHoursResponseScheduleWeeklyRangesMondayItem', 'ReadUserBusinessHoursResponseScheduleWeeklyRangesSaturdayItem', 'ReadUserBusinessHoursResponseScheduleWeeklyRangesSundayItem', 'ReadUserBusinessHoursResponseScheduleWeeklyRangesThursdayItem', 'ReadUserBusinessHoursResponseScheduleWeeklyRangesTuesdayItem', 'ReadUserBusinessHoursResponseScheduleWeeklyRangesWednesdayItem', 'ReadUserCallLogDirectionItem', 'ReadUserCallLogRecordingType', 'ReadUserCallLogResponse', 'ReadUserCallLogResponseNavigation', 'ReadUserCallLogResponseNavigationFirstPage', 'ReadUserCallLogResponseNavigationLastPage', 'ReadUserCallLogResponseNavigationNextPage', 'ReadUserCallLogResponseNavigationPreviousPage', 'ReadUserCallLogResponsePaging', 'ReadUserCallLogResponseRecordsItem', 'ReadUserCallLogResponseRecordsItemAction', 'ReadUserCallLogResponseRecordsItemBilling', 'ReadUserCallLogResponseRecordsItemDelegate', 'ReadUserCallLogResponseRecordsItemDirection', 'ReadUserCallLogResponseRecordsItemExtension', 'ReadUserCallLogResponseRecordsItemFrom', 'ReadUserCallLogResponseRecordsItemFromDevice', 'ReadUserCallLogResponseRecordsItemLegsItem', 'ReadUserCallLogResponseRecordsItemLegsItemAction', 'ReadUserCallLogResponseRecordsItemLegsItemBilling', 'ReadUserCallLogResponseRecordsItemLegsItemDelegate', 'ReadUserCallLogResponseRecordsItemLegsItemDirection', 'ReadUserCallLogResponseRecordsItemLegsItemExtension', 'ReadUserCallLogResponseRecordsItemLegsItemFrom', 'ReadUserCallLogResponseRecordsItemLegsItemFromDevice', 'ReadUserCallLogResponseRecordsItemLegsItemLegType', 'ReadUserCallLogResponseRecordsItemLegsItemMessage', 'ReadUserCallLogResponseRecordsItemLegsItemReason', 'ReadUserCallLogResponseRecordsItemLegsItemRecording', 'ReadUserCallLogResponseRecordsItemLegsItemRecordingType', 'ReadUserCallLogResponseRecordsItemLegsItemResult', 'ReadUserCallLogResponseRecordsItemLegsItemTo', 'ReadUserCallLogResponseRecordsItemLegsItemToDevice', 'ReadUserCallLogResponseRecordsItemLegsItemTransport', 'ReadUserCallLogResponseRecordsItemLegsItemType', 'ReadUserCallLogResponseRecordsItemMessage', 'ReadUserCallLogResponseRecordsItemReason', 'ReadUserCallLogResponseRecordsItemRecording', 'ReadUserCallLogResponseRecordsItemRecordingType', 'ReadUserCallLogResponseRecordsItemResult', 'ReadUserCallLogResponseRecordsItemTo', 'ReadUserCallLogResponseRecordsItemToDevice', 'ReadUserCallLogResponseRecordsItemTransport', 'ReadUserCallLogResponseRecordsItemType', 'ReadUserCallLogTransportItem', 'ReadUserCallLogTypeItem', 'ReadUserCallLogView', 'ReadUserCallRecordResponse', 'ReadUserCallRecordResponseAction', 'ReadUserCallRecordResponseBilling', 'ReadUserCallRecordResponseDelegate', 'ReadUserCallRecordResponseDirection', 'ReadUserCallRecordResponseExtension', 'ReadUserCallRecordResponseFrom', 'ReadUserCallRecordResponseFromDevice', 'ReadUserCallRecordResponseLegsItem', 'ReadUserCallRecordResponseLegsItemAction', 'ReadUserCallRecordResponseLegsItemBilling', 'ReadUserCallRecordResponseLegsItemDelegate', 'ReadUserCallRecordResponseLegsItemDirection', 'ReadUserCallRecordResponseLegsItemExtension', 'ReadUserCallRecordResponseLegsItemFrom', 'ReadUserCallRecordResponseLegsItemFromDevice', 'ReadUserCallRecordResponseLegsItemLegType', 'ReadUserCallRecordResponseLegsItemMessage', 'ReadUserCallRecordResponseLegsItemReason', 'ReadUserCallRecordResponseLegsItemRecording', 'ReadUserCallRecordResponseLegsItemRecordingType', 'ReadUserCallRecordResponseLegsItemResult', 'ReadUserCallRecordResponseLegsItemTo', 'ReadUserCallRecordResponseLegsItemToDevice', 'ReadUserCallRecordResponseLegsItemTransport', 'ReadUserCallRecordResponseLegsItemType', 'ReadUserCallRecordResponseMessage', 'ReadUserCallRecordResponseReason', 'ReadUserCallRecordResponseRecording', 'ReadUserCallRecordResponseRecordingType', 'ReadUserCallRecordResponseResult', 'ReadUserCallRecordResponseTo', 'ReadUserCallRecordResponseToDevice', 'ReadUserCallRecordResponseTransport', 'ReadUserCallRecordResponseType', 'ReadUserCallRecordView', 'ReadUserFeaturesResponse', 'ReadUserFeaturesResponseRecordsItem', 'ReadUserFeaturesResponseRecordsItemParamsItem', 'ReadUserFeaturesResponseRecordsItemReason', 'ReadUserFeaturesResponseRecordsItemReasonCode', 'ReadUserNoteResponse', 'ReadUserNoteResponseCreator', 'ReadUserNoteResponseLastModifiedBy', 'ReadUserNoteResponseLockedBy', 'ReadUserNoteResponseStatus', 'ReadUserNoteResponseType', 'ReadUserPresenceStatusResponse', 'ReadUserPresenceStatusResponseActiveCallsItem', 'ReadUserPresenceStatusResponseActiveCallsItemAdditional', 'ReadUserPresenceStatusResponseActiveCallsItemAdditionalType', 'ReadUserPresenceStatusResponseActiveCallsItemDirection', 'ReadUserPresenceStatusResponseActiveCallsItemPrimary', 'ReadUserPresenceStatusResponseActiveCallsItemPrimaryType', 'ReadUserPresenceStatusResponseActiveCallsItemSipData', 'ReadUserPresenceStatusResponseActiveCallsItemTelephonyStatus', 'ReadUserPresenceStatusResponseDndStatus', 'ReadUserPresenceStatusResponseExtension', 'ReadUserPresenceStatusResponseMeetingStatus', 'ReadUserPresenceStatusResponsePresenceStatus', 'ReadUserPresenceStatusResponseTelephonyStatus', 'ReadUserPresenceStatusResponseUserStatus', 'ReadUserTemplateResponse', 'ReadUserTemplateResponseType', 'ReadUserVideoConfigurationResponse', 'ReadUserVideoConfigurationResponseProvider', 'ReadWirelessPointResponse', 'ReadWirelessPointResponseEmergencyAddress', 'ReadWirelessPointResponseEmergencyLocation', 'ReadWirelessPointResponseSite', 'RecordsCollectionResourceSubscriptionResponse', 'RecordsCollectionResourceSubscriptionResponseRecordsItem', 'RecordsCollectionResourceSubscriptionResponseRecordsItemBlacklistedData', 'RecordsCollectionResourceSubscriptionResponseRecordsItemDeliveryMode', 'RecordsCollectionResourceSubscriptionResponseRecordsItemDeliveryModeTransportType', 'RecordsCollectionResourceSubscriptionResponseRecordsItemDisabledFiltersItem', 'RecordsCollectionResourceSubscriptionResponseRecordsItemStatus', 'RecordsCollectionResourceSubscriptionResponseRecordsItemTransportType', 'RemoveGlipTeamMembersRequest', 'RemoveGlipTeamMembersRequestMembersItem', 'RenewSubscriptionResponse', 'RenewSubscriptionResponseBlacklistedData', 'RenewSubscriptionResponseDeliveryMode', 'RenewSubscriptionResponseDeliveryModeTransportType', 'RenewSubscriptionResponseDisabledFiltersItem', 'RenewSubscriptionResponseStatus', 'RenewSubscriptionResponseTransportType', 'ReplaceUser2Request', 'ReplaceUser2RequestAddressesItem', 'ReplaceUser2RequestAddressesItemType', 'ReplaceUser2RequestEmailsItem', 'ReplaceUser2RequestEmailsItemType', 'ReplaceUser2RequestName', 'ReplaceUser2RequestPhoneNumbersItem', 'ReplaceUser2RequestPhoneNumbersItemType', 'ReplaceUser2RequestPhotosItem', 'ReplaceUser2RequestPhotosItemType', 'ReplaceUser2RequestSchemasItem', 'ReplaceUser2RequestUrnIetfParamsScimSchemasExtensionEnterprise_2_0_User', 'ReplaceUser2Response', 'ReplaceUser2Response', 'ReplaceUser2Response', 'ReplaceUser2Response', 'ReplaceUser2Response', 'ReplaceUser2Response', 'ReplaceUser2Response', 'ReplaceUser2Response', 'ReplaceUser2ResponseAddressesItem', 'ReplaceUser2ResponseAddressesItemType', 'ReplaceUser2ResponseEmailsItem', 'ReplaceUser2ResponseEmailsItemType', 'ReplaceUser2ResponseMeta', 'ReplaceUser2ResponseMetaResourceType', 'ReplaceUser2ResponseName', 'ReplaceUser2ResponsePhoneNumbersItem', 'ReplaceUser2ResponsePhoneNumbersItemType', 'ReplaceUser2ResponsePhotosItem', 'ReplaceUser2ResponsePhotosItemType', 'ReplaceUser2ResponseSchemasItem', 'ReplaceUser2ResponseSchemasItem', 'ReplaceUser2ResponseSchemasItem', 'ReplaceUser2ResponseSchemasItem', 'ReplaceUser2ResponseSchemasItem', 'ReplaceUser2ResponseSchemasItem', 'ReplaceUser2ResponseSchemasItem', 'ReplaceUser2ResponseSchemasItem', 'ReplaceUser2ResponseScimType', 'ReplaceUser2ResponseScimType', 'ReplaceUser2ResponseScimType', 'ReplaceUser2ResponseScimType', 'ReplaceUser2ResponseScimType', 'ReplaceUser2ResponseScimType', 'ReplaceUser2ResponseScimType', 'ReplaceUser2ResponseUrnIetfParamsScimSchemasExtensionEnterprise_2_0_User', 'ReplyParty', 'ReplyPartyDirection', 'ReplyPartyRequest', 'ReplyPartyRequestReplyWithPattern', 'ReplyPartyRequestReplyWithPatternPattern', 'ReplyPartyRequestReplyWithPatternTimeUnit', 'ReplyPartyResponse', 'ReplyPartyResponseDirection', 'ReplyPartyResponseFrom', 'ReplyPartyResponseOwner', 'ReplyPartyResponsePark', 'ReplyPartyResponseStatus', 'ReplyPartyResponseStatusCode', 'ReplyPartyResponseStatusPeerId', 'ReplyPartyResponseStatusReason', 'ReplyPartyResponseTo', 'ScimErrorResponse', 'ScimErrorResponseSchemasItem', 'ScimErrorResponseScimType', 'SearchDirectoryEntriesRequest', 'SearchDirectoryEntriesRequest', 'SearchDirectoryEntriesRequestExtensionType', 'SearchDirectoryEntriesRequestExtensionType', 'SearchDirectoryEntriesRequestOrderByItem', 'SearchDirectoryEntriesRequestOrderByItem', 'SearchDirectoryEntriesRequestOrderByItemDirection', 'SearchDirectoryEntriesRequestOrderByItemDirection', 'SearchDirectoryEntriesRequestOrderByItemFieldName', 'SearchDirectoryEntriesRequestOrderByItemFieldName', 'SearchDirectoryEntriesRequestSearchFieldsItem', 'SearchDirectoryEntriesRequestSearchFieldsItem', 'SearchDirectoryEntriesResponse', 'SearchDirectoryEntriesResponse', 'SearchDirectoryEntriesResponse', 'SearchDirectoryEntriesResponse', 'SearchDirectoryEntriesResponseErrorsItem', 'SearchDirectoryEntriesResponseErrorsItem', 'SearchDirectoryEntriesResponseErrorsItem', 'SearchDirectoryEntriesResponseErrorsItemErrorCode', 'SearchDirectoryEntriesResponseErrorsItemErrorCode', 'SearchDirectoryEntriesResponseErrorsItemErrorCode', 'SearchDirectoryEntriesResponsePaging', 'SearchDirectoryEntriesResponseRecordsItem', 'SearchDirectoryEntriesResponseRecordsItemAccount', 'SearchDirectoryEntriesResponseRecordsItemAccountMainNumber', 'SearchDirectoryEntriesResponseRecordsItemAccountMainNumberUsageType', 'SearchDirectoryEntriesResponseRecordsItemPhoneNumbersItem', 'SearchDirectoryEntriesResponseRecordsItemPhoneNumbersItemUsageType', 'SearchDirectoryEntriesResponseRecordsItemProfileImage', 'SearchDirectoryEntriesResponseRecordsItemSite', 'SearchRequest', 'SearchRequestSchemasItem', 'SearchViaGet2Response', 'SearchViaGet2Response', 'SearchViaGet2Response', 'SearchViaGet2Response', 'SearchViaGet2Response', 'SearchViaGet2Response', 'SearchViaGet2ResponseSchemasItem', 'SearchViaGet2ResponseSchemasItem', 'SearchViaGet2ResponseSchemasItem', 'SearchViaGet2ResponseSchemasItem', 'SearchViaGet2ResponseSchemasItem', 'SearchViaGet2ResponseSchemasItem', 'SearchViaGet2ResponseScimType', 'SearchViaGet2ResponseScimType', 'SearchViaGet2ResponseScimType', 'SearchViaGet2ResponseScimType', 'SearchViaGet2ResponseScimType', 'SearchViaGet2Response_ResourcesItem', 'SearchViaGet2Response_ResourcesItemAddressesItem', 'SearchViaGet2Response_ResourcesItemAddressesItemType', 'SearchViaGet2Response_ResourcesItemEmailsItem', 'SearchViaGet2Response_ResourcesItemEmailsItemType', 'SearchViaGet2Response_ResourcesItemMeta', 'SearchViaGet2Response_ResourcesItemMetaResourceType', 'SearchViaGet2Response_ResourcesItemName', 'SearchViaGet2Response_ResourcesItemPhoneNumbersItem', 'SearchViaGet2Response_ResourcesItemPhoneNumbersItemType', 'SearchViaGet2Response_ResourcesItemPhotosItem', 'SearchViaGet2Response_ResourcesItemPhotosItemType', 'SearchViaGet2Response_ResourcesItemSchemasItem', 'SearchViaGet2Response_ResourcesItemUrnIetfParamsScimSchemasExtensionEnterprise_2_0_User', 'SearchViaGetResponse', 'SearchViaGetResponse', 'SearchViaGetResponse', 'SearchViaGetResponse', 'SearchViaGetResponse', 'SearchViaGetResponse', 'SearchViaGetResponseSchemasItem', 'SearchViaGetResponseSchemasItem', 'SearchViaGetResponseSchemasItem', 'SearchViaGetResponseSchemasItem', 'SearchViaGetResponseSchemasItem', 'SearchViaGetResponseSchemasItem', 'SearchViaGetResponseScimType', 'SearchViaGetResponseScimType', 'SearchViaGetResponseScimType', 'SearchViaGetResponseScimType', 'SearchViaGetResponseScimType', 'SearchViaGetResponse_ResourcesItem', 'SearchViaGetResponse_ResourcesItemAddressesItem', 'SearchViaGetResponse_ResourcesItemAddressesItemType', 'SearchViaGetResponse_ResourcesItemEmailsItem', 'SearchViaGetResponse_ResourcesItemEmailsItemType', 'SearchViaGetResponse_ResourcesItemMeta', 'SearchViaGetResponse_ResourcesItemMetaResourceType', 'SearchViaGetResponse_ResourcesItemName', 'SearchViaGetResponse_ResourcesItemPhoneNumbersItem', 'SearchViaGetResponse_ResourcesItemPhoneNumbersItemType', 'SearchViaGetResponse_ResourcesItemPhotosItem', 'SearchViaGetResponse_ResourcesItemPhotosItemType', 'SearchViaGetResponse_ResourcesItemSchemasItem', 'SearchViaGetResponse_ResourcesItemUrnIetfParamsScimSchemasExtensionEnterprise_2_0_User', 'SearchViaPost2Request', 'SearchViaPost2RequestSchemasItem', 'SearchViaPost2Response', 'SearchViaPost2Response', 'SearchViaPost2Response', 'SearchViaPost2Response', 'SearchViaPost2Response', 'SearchViaPost2Response', 'SearchViaPost2ResponseSchemasItem', 'SearchViaPost2ResponseSchemasItem', 'SearchViaPost2ResponseSchemasItem', 'SearchViaPost2ResponseSchemasItem', 'SearchViaPost2ResponseSchemasItem', 'SearchViaPost2ResponseSchemasItem', 'SearchViaPost2ResponseScimType', 'SearchViaPost2ResponseScimType', 'SearchViaPost2ResponseScimType', 'SearchViaPost2ResponseScimType', 'SearchViaPost2ResponseScimType', 'SearchViaPost2Response_ResourcesItem', 'SearchViaPost2Response_ResourcesItemAddressesItem', 'SearchViaPost2Response_ResourcesItemAddressesItemType', 'SearchViaPost2Response_ResourcesItemEmailsItem', 'SearchViaPost2Response_ResourcesItemEmailsItemType', 'SearchViaPost2Response_ResourcesItemMeta', 'SearchViaPost2Response_ResourcesItemMetaResourceType', 'SearchViaPost2Response_ResourcesItemName', 'SearchViaPost2Response_ResourcesItemPhoneNumbersItem', 'SearchViaPost2Response_ResourcesItemPhoneNumbersItemType', 'SearchViaPost2Response_ResourcesItemPhotosItem', 'SearchViaPost2Response_ResourcesItemPhotosItemType', 'SearchViaPost2Response_ResourcesItemSchemasItem', 'SearchViaPost2Response_ResourcesItemUrnIetfParamsScimSchemasExtensionEnterprise_2_0_User', 'ServiceProviderConfig', 'ServiceProviderConfigAuthenticationSchemesItem', 'ServiceProviderConfigBulk', 'ServiceProviderConfigChangePassword', 'ServiceProviderConfigFilter', 'ServiceProviderConfigSchemasItem', 'SuperviseCallPartyRequest', 'SuperviseCallPartyRequestMode', 'SuperviseCallPartyResponse', 'SuperviseCallPartyResponseDirection', 'SuperviseCallPartyResponseFrom', 'SuperviseCallPartyResponseOwner', 'SuperviseCallPartyResponseStatus', 'SuperviseCallPartyResponseStatusCode', 'SuperviseCallPartyResponseStatusPeerId', 'SuperviseCallPartyResponseStatusReason', 'SuperviseCallPartyResponseTo', 'SuperviseCallSession', 'SuperviseCallSessionDirection', 'SuperviseCallSessionFrom', 'SuperviseCallSessionOwner', 'SuperviseCallSessionRequest', 'SuperviseCallSessionRequest', 'SuperviseCallSessionRequestMode', 'SuperviseCallSessionRequestMode', 'SuperviseCallSessionResponse', 'SuperviseCallSessionResponseDirection', 'SuperviseCallSessionResponseFrom', 'SuperviseCallSessionResponseOwner', 'SuperviseCallSessionResponseStatus', 'SuperviseCallSessionResponseStatusCode', 'SuperviseCallSessionResponseStatusPeerId', 'SuperviseCallSessionResponseStatusReason', 'SuperviseCallSessionResponseTo', 'SuperviseCallSessionStatus', 'SuperviseCallSessionStatusCode', 'SuperviseCallSessionStatusPeerId', 'SuperviseCallSessionStatusReason', 'SwitchInfo', 'SwitchInfoEmergencyAddress', 'SwitchInfoEmergencyLocation', 'SwitchInfoSite', 'SwitchesList', 'SyncAccountCallLogResponse', 'SyncAccountCallLogResponseRecordsItem', 'SyncAccountCallLogResponseRecordsItemAction', 'SyncAccountCallLogResponseRecordsItemBilling', 'SyncAccountCallLogResponseRecordsItemDelegate', 'SyncAccountCallLogResponseRecordsItemDirection', 'SyncAccountCallLogResponseRecordsItemExtension', 'SyncAccountCallLogResponseRecordsItemFrom', 'SyncAccountCallLogResponseRecordsItemFromDevice', 'SyncAccountCallLogResponseRecordsItemLegsItem', 'SyncAccountCallLogResponseRecordsItemLegsItemAction', 'SyncAccountCallLogResponseRecordsItemLegsItemBilling', 'SyncAccountCallLogResponseRecordsItemLegsItemDelegate', 'SyncAccountCallLogResponseRecordsItemLegsItemDirection', 'SyncAccountCallLogResponseRecordsItemLegsItemExtension', 'SyncAccountCallLogResponseRecordsItemLegsItemFrom', 'SyncAccountCallLogResponseRecordsItemLegsItemFromDevice', 'SyncAccountCallLogResponseRecordsItemLegsItemLegType', 'SyncAccountCallLogResponseRecordsItemLegsItemMessage', 'SyncAccountCallLogResponseRecordsItemLegsItemReason', 'SyncAccountCallLogResponseRecordsItemLegsItemRecording', 'SyncAccountCallLogResponseRecordsItemLegsItemRecordingType', 'SyncAccountCallLogResponseRecordsItemLegsItemResult', 'SyncAccountCallLogResponseRecordsItemLegsItemTo', 'SyncAccountCallLogResponseRecordsItemLegsItemToDevice', 'SyncAccountCallLogResponseRecordsItemLegsItemTransport', 'SyncAccountCallLogResponseRecordsItemLegsItemType', 'SyncAccountCallLogResponseRecordsItemMessage', 'SyncAccountCallLogResponseRecordsItemReason', 'SyncAccountCallLogResponseRecordsItemRecording', 'SyncAccountCallLogResponseRecordsItemRecordingType', 'SyncAccountCallLogResponseRecordsItemResult', 'SyncAccountCallLogResponseRecordsItemTo', 'SyncAccountCallLogResponseRecordsItemToDevice', 'SyncAccountCallLogResponseRecordsItemTransport', 'SyncAccountCallLogResponseRecordsItemType', 'SyncAccountCallLogResponseSyncInfo', 'SyncAccountCallLogResponseSyncInfoSyncType', 'SyncAccountCallLogStatusGroup', 'SyncAccountCallLogSyncType', 'SyncAccountCallLogView', 'SyncAddressBookResponse', 'SyncAddressBookResponseRecordsItem', 'SyncAddressBookResponseRecordsItemAvailability', 'SyncAddressBookResponseRecordsItemBusinessAddress', 'SyncAddressBookResponseRecordsItemHomeAddress', 'SyncAddressBookResponseRecordsItemOtherAddress', 'SyncAddressBookResponseSyncInfo', 'SyncAddressBookResponseSyncInfoSyncType', 'SyncAddressBookSyncTypeItem', 'SyncMessagesDirectionItem', 'SyncMessagesMessageTypeItem', 'SyncMessagesResponse', 'SyncMessagesResponseRecordsItem', 'SyncMessagesResponseRecordsItemAttachmentsItem', 'SyncMessagesResponseRecordsItemAttachmentsItemType', 'SyncMessagesResponseRecordsItemAvailability', 'SyncMessagesResponseRecordsItemConversation', 'SyncMessagesResponseRecordsItemDirection', 'SyncMessagesResponseRecordsItemFaxResolution', 'SyncMessagesResponseRecordsItemFrom', 'SyncMessagesResponseRecordsItemMessageStatus', 'SyncMessagesResponseRecordsItemPriority', 'SyncMessagesResponseRecordsItemReadStatus', 'SyncMessagesResponseRecordsItemToItem', 'SyncMessagesResponseRecordsItemToItemFaxErrorCode', 'SyncMessagesResponseRecordsItemToItemMessageStatus', 'SyncMessagesResponseRecordsItemType', 'SyncMessagesResponseRecordsItemVmTranscriptionStatus', 'SyncMessagesResponseSyncInfo', 'SyncMessagesResponseSyncInfoSyncType', 'SyncMessagesSyncTypeItem', 'SyncUserCallLogResponse', 'SyncUserCallLogResponseRecordsItem', 'SyncUserCallLogResponseRecordsItemAction', 'SyncUserCallLogResponseRecordsItemBilling', 'SyncUserCallLogResponseRecordsItemDelegate', 'SyncUserCallLogResponseRecordsItemDirection', 'SyncUserCallLogResponseRecordsItemExtension', 'SyncUserCallLogResponseRecordsItemFrom', 'SyncUserCallLogResponseRecordsItemFromDevice', 'SyncUserCallLogResponseRecordsItemLegsItem', 'SyncUserCallLogResponseRecordsItemLegsItemAction', 'SyncUserCallLogResponseRecordsItemLegsItemBilling', 'SyncUserCallLogResponseRecordsItemLegsItemDelegate', 'SyncUserCallLogResponseRecordsItemLegsItemDirection', 'SyncUserCallLogResponseRecordsItemLegsItemExtension', 'SyncUserCallLogResponseRecordsItemLegsItemFrom', 'SyncUserCallLogResponseRecordsItemLegsItemFromDevice', 'SyncUserCallLogResponseRecordsItemLegsItemLegType', 'SyncUserCallLogResponseRecordsItemLegsItemMessage', 'SyncUserCallLogResponseRecordsItemLegsItemReason', 'SyncUserCallLogResponseRecordsItemLegsItemRecording', 'SyncUserCallLogResponseRecordsItemLegsItemRecordingType', 'SyncUserCallLogResponseRecordsItemLegsItemResult', 'SyncUserCallLogResponseRecordsItemLegsItemTo', 'SyncUserCallLogResponseRecordsItemLegsItemToDevice', 'SyncUserCallLogResponseRecordsItemLegsItemTransport', 'SyncUserCallLogResponseRecordsItemLegsItemType', 'SyncUserCallLogResponseRecordsItemMessage', 'SyncUserCallLogResponseRecordsItemReason', 'SyncUserCallLogResponseRecordsItemRecording', 'SyncUserCallLogResponseRecordsItemRecordingType', 'SyncUserCallLogResponseRecordsItemResult', 'SyncUserCallLogResponseRecordsItemTo', 'SyncUserCallLogResponseRecordsItemToDevice', 'SyncUserCallLogResponseRecordsItemTransport', 'SyncUserCallLogResponseRecordsItemType', 'SyncUserCallLogResponseSyncInfo', 'SyncUserCallLogResponseSyncInfoSyncType', 'SyncUserCallLogStatusGroupItem', 'SyncUserCallLogSyncTypeItem', 'SyncUserCallLogView', 'TransferCallPartyRequest', 'TransferCallPartyResponse', 'TransferCallPartyResponseConferenceRole', 'TransferCallPartyResponseDirection', 'TransferCallPartyResponseFrom', 'TransferCallPartyResponseOwner', 'TransferCallPartyResponsePark', 'TransferCallPartyResponseRecordingsItem', 'TransferCallPartyResponseRingMeRole', 'TransferCallPartyResponseRingOutRole', 'TransferCallPartyResponseStatus', 'TransferCallPartyResponseStatusCode', 'TransferCallPartyResponseStatusPeerId', 'TransferCallPartyResponseStatusReason', 'TransferCallPartyResponseTo', 'TransferTarget', 'UnholdCallPartyResponse', 'UnholdCallPartyResponseConferenceRole', 'UnholdCallPartyResponseDirection', 'UnholdCallPartyResponseFrom', 'UnholdCallPartyResponseOwner', 'UnholdCallPartyResponsePark', 'UnholdCallPartyResponseRecordingsItem', 'UnholdCallPartyResponseRingMeRole', 'UnholdCallPartyResponseRingOutRole', 'UnholdCallPartyResponseStatus', 'UnholdCallPartyResponseStatusCode', 'UnholdCallPartyResponseStatusPeerId', 'UnholdCallPartyResponseStatusReason', 'UnholdCallPartyResponseTo', 'UnifiedPresence', 'UnifiedPresenceGlip', 'UnifiedPresenceGlipAvailability', 'UnifiedPresenceGlipStatus', 'UnifiedPresenceGlipVisibility', 'UnifiedPresenceListItem', 'UnifiedPresenceMeeting', 'UnifiedPresenceMeetingStatus', 'UnifiedPresenceStatus', 'UnifiedPresenceTelephony', 'UnifiedPresenceTelephonyAvailability', 'UnifiedPresenceTelephonyStatus', 'UnifiedPresenceTelephonyVisibility', 'UpdateAccountBusinessAddressRequest', 'UpdateAccountBusinessAddressRequestBusinessAddress', 'UpdateAccountBusinessAddressResponse', 'UpdateAccountBusinessAddressResponseBusinessAddress', 'UpdateAnsweringRuleRequest', 'UpdateAnsweringRuleRequest', 'UpdateAnsweringRuleRequestCallHandlingAction', 'UpdateAnsweringRuleRequestCallHandlingAction', 'UpdateAnsweringRuleRequestCalledNumbersItem', 'UpdateAnsweringRuleRequestCallersItem', 'UpdateAnsweringRuleRequestForwarding', 'UpdateAnsweringRuleRequestForwarding', 'UpdateAnsweringRuleRequestForwardingRingingMode', 'UpdateAnsweringRuleRequestForwardingRingingMode', 'UpdateAnsweringRuleRequestForwardingRulesItem', 'UpdateAnsweringRuleRequestForwardingRulesItem', 'UpdateAnsweringRuleRequestForwardingRulesItemForwardingNumbersItem', 'UpdateAnsweringRuleRequestForwardingRulesItemForwardingNumbersItem', 'UpdateAnsweringRuleRequestForwardingRulesItemForwardingNumbersItemLabel', 'UpdateAnsweringRuleRequestForwardingRulesItemForwardingNumbersItemLabel', 'UpdateAnsweringRuleRequestForwardingRulesItemForwardingNumbersItemType', 'UpdateAnsweringRuleRequestForwardingRulesItemForwardingNumbersItemType', 'UpdateAnsweringRuleRequestGreetingsItem', 'UpdateAnsweringRuleRequestGreetingsItemCustom', 'UpdateAnsweringRuleRequestGreetingsItemPreset', 'UpdateAnsweringRuleRequestGreetingsItemType', 'UpdateAnsweringRuleRequestGreetingsItemUsageType', 'UpdateAnsweringRuleRequestQueue', 'UpdateAnsweringRuleRequestQueueFixedOrderAgentsItem', 'UpdateAnsweringRuleRequestQueueFixedOrderAgentsItemExtension', 'UpdateAnsweringRuleRequestQueueHoldAudioInterruptionMode', 'UpdateAnsweringRuleRequestQueueHoldTimeExpirationAction', 'UpdateAnsweringRuleRequestQueueMaxCallersAction', 'UpdateAnsweringRuleRequestQueueNoAnswerAction', 'UpdateAnsweringRuleRequestQueueTransferItem', 'UpdateAnsweringRuleRequestQueueTransferItemAction', 'UpdateAnsweringRuleRequestQueueTransferItemExtension', 'UpdateAnsweringRuleRequestQueueTransferMode', 'UpdateAnsweringRuleRequestQueueUnconditionalForwardingItem', 'UpdateAnsweringRuleRequestQueueUnconditionalForwardingItemAction', 'UpdateAnsweringRuleRequestSchedule', 'UpdateAnsweringRuleRequestScheduleRangesItem', 'UpdateAnsweringRuleRequestScheduleRef', 'UpdateAnsweringRuleRequestScheduleWeeklyRanges', 'UpdateAnsweringRuleRequestScheduleWeeklyRangesFridayItem', 'UpdateAnsweringRuleRequestScheduleWeeklyRangesMondayItem', 'UpdateAnsweringRuleRequestScheduleWeeklyRangesSaturdayItem', 'UpdateAnsweringRuleRequestScheduleWeeklyRangesSundayItem', 'UpdateAnsweringRuleRequestScheduleWeeklyRangesThursdayItem', 'UpdateAnsweringRuleRequestScheduleWeeklyRangesTuesdayItem', 'UpdateAnsweringRuleRequestScheduleWeeklyRangesWednesdayItem', 'UpdateAnsweringRuleRequestScreening', 'UpdateAnsweringRuleRequestScreening', 'UpdateAnsweringRuleRequestTransfer', 'UpdateAnsweringRuleRequestTransferExtension', 'UpdateAnsweringRuleRequestType', 'UpdateAnsweringRuleRequestType', 'UpdateAnsweringRuleRequestUnconditionalForwarding', 'UpdateAnsweringRuleRequestUnconditionalForwardingAction', 'UpdateAnsweringRuleRequestVoicemail', 'UpdateAnsweringRuleRequestVoicemailRecipient', 'UpdateAnsweringRuleResponse', 'UpdateAnsweringRuleResponseCallHandlingAction', 'UpdateAnsweringRuleResponseCalledNumbersItem', 'UpdateAnsweringRuleResponseCallersItem', 'UpdateAnsweringRuleResponseForwarding', 'UpdateAnsweringRuleResponseForwardingRingingMode', 'UpdateAnsweringRuleResponseForwardingRulesItem', 'UpdateAnsweringRuleResponseForwardingRulesItemForwardingNumbersItem', 'UpdateAnsweringRuleResponseForwardingRulesItemForwardingNumbersItemLabel', 'UpdateAnsweringRuleResponseForwardingRulesItemForwardingNumbersItemType', 'UpdateAnsweringRuleResponseGreetingsItem', 'UpdateAnsweringRuleResponseGreetingsItemCustom', 'UpdateAnsweringRuleResponseGreetingsItemPreset', 'UpdateAnsweringRuleResponseGreetingsItemType', 'UpdateAnsweringRuleResponseGreetingsItemUsageType', 'UpdateAnsweringRuleResponseQueue', 'UpdateAnsweringRuleResponseQueueFixedOrderAgentsItem', 'UpdateAnsweringRuleResponseQueueFixedOrderAgentsItemExtension', 'UpdateAnsweringRuleResponseQueueHoldAudioInterruptionMode', 'UpdateAnsweringRuleResponseQueueHoldTimeExpirationAction', 'UpdateAnsweringRuleResponseQueueMaxCallersAction', 'UpdateAnsweringRuleResponseQueueNoAnswerAction', 'UpdateAnsweringRuleResponseQueueTransferItem', 'UpdateAnsweringRuleResponseQueueTransferItemAction', 'UpdateAnsweringRuleResponseQueueTransferItemExtension', 'UpdateAnsweringRuleResponseQueueTransferMode', 'UpdateAnsweringRuleResponseQueueUnconditionalForwardingItem', 'UpdateAnsweringRuleResponseQueueUnconditionalForwardingItemAction', 'UpdateAnsweringRuleResponseSchedule', 'UpdateAnsweringRuleResponseScheduleRangesItem', 'UpdateAnsweringRuleResponseScheduleRef', 'UpdateAnsweringRuleResponseScheduleWeeklyRanges', 'UpdateAnsweringRuleResponseScheduleWeeklyRangesFridayItem', 'UpdateAnsweringRuleResponseScheduleWeeklyRangesMondayItem', 'UpdateAnsweringRuleResponseScheduleWeeklyRangesSaturdayItem', 'UpdateAnsweringRuleResponseScheduleWeeklyRangesSundayItem', 'UpdateAnsweringRuleResponseScheduleWeeklyRangesThursdayItem', 'UpdateAnsweringRuleResponseScheduleWeeklyRangesTuesdayItem', 'UpdateAnsweringRuleResponseScheduleWeeklyRangesWednesdayItem', 'UpdateAnsweringRuleResponseScreening', 'UpdateAnsweringRuleResponseSharedLines', 'UpdateAnsweringRuleResponseTransfer', 'UpdateAnsweringRuleResponseTransferExtension', 'UpdateAnsweringRuleResponseType', 'UpdateAnsweringRuleResponseUnconditionalForwarding', 'UpdateAnsweringRuleResponseUnconditionalForwardingAction', 'UpdateAnsweringRuleResponseVoicemail', 'UpdateAnsweringRuleResponseVoicemailRecipient', 'UpdateBlockedAllowedNumberRequest', 'UpdateBlockedAllowedNumberRequestStatus', 'UpdateBlockedAllowedNumberResponse', 'UpdateBlockedAllowedNumberResponseStatus', 'UpdateCallMonitoringGroupListRequest', 'UpdateCallMonitoringGroupListRequestAddedExtensionsItem', 'UpdateCallMonitoringGroupListRequestAddedExtensionsItemPermissionsItem', 'UpdateCallMonitoringGroupListRequestRemovedExtensionsItem', 'UpdateCallMonitoringGroupListRequestRemovedExtensionsItemPermissionsItem', 'UpdateCallMonitoringGroupListRequestUpdatedExtensionsItem', 'UpdateCallMonitoringGroupListRequestUpdatedExtensionsItemPermissionsItem', 'UpdateCallMonitoringGroupRequest', 'UpdateCallMonitoringGroupResponse', 'UpdateCallPartyRequest', 'UpdateCallPartyRequestParty', 'UpdateCallPartyResponse', 'UpdateCallPartyResponseConferenceRole', 'UpdateCallPartyResponseDirection', 'UpdateCallPartyResponseFrom', 'UpdateCallPartyResponseOwner', 'UpdateCallPartyResponsePark', 'UpdateCallPartyResponseRecordingsItem', 'UpdateCallPartyResponseRingMeRole', 'UpdateCallPartyResponseRingOutRole', 'UpdateCallPartyResponseStatus', 'UpdateCallPartyResponseStatusCode', 'UpdateCallPartyResponseStatusPeerId', 'UpdateCallPartyResponseStatusReason', 'UpdateCallPartyResponseTo', 'UpdateCallQueueInfoRequest', 'UpdateCallQueueInfoRequestServiceLevelSettings', 'UpdateCallQueueInfoResponse', 'UpdateCallQueueInfoResponseServiceLevelSettings', 'UpdateCallQueueInfoResponseStatus', 'UpdateCallQueuePresenceRequest', 'UpdateCallQueuePresenceRequestRecordsItem', 'UpdateCallQueuePresenceRequestRecordsItemMember', 'UpdateCallQueuePresenceResponse', 'UpdateCallQueuePresenceResponseRecordsItem', 'UpdateCallQueuePresenceResponseRecordsItemMember', 'UpdateCallQueuePresenceResponseRecordsItemMemberSite', 'UpdateCallRecordingExtensionListRequest', 'UpdateCallRecordingExtensionListRequestAddedExtensionsItem', 'UpdateCallRecordingExtensionListRequestAddedExtensionsItemCallDirection', 'UpdateCallRecordingExtensionListRequestRemovedExtensionsItem', 'UpdateCallRecordingExtensionListRequestRemovedExtensionsItemCallDirection', 'UpdateCallRecordingExtensionListRequestUpdatedExtensionsItem', 'UpdateCallRecordingExtensionListRequestUpdatedExtensionsItemCallDirection', 'UpdateCallRecordingSettingsRequest', 'UpdateCallRecordingSettingsRequestAutomatic', 'UpdateCallRecordingSettingsRequestGreetingsItem', 'UpdateCallRecordingSettingsRequestGreetingsItemMode', 'UpdateCallRecordingSettingsRequestGreetingsItemType', 'UpdateCallRecordingSettingsRequestOnDemand', 'UpdateCallRecordingSettingsResponse', 'UpdateCallRecordingSettingsResponseAutomatic', 'UpdateCallRecordingSettingsResponseGreetingsItem', 'UpdateCallRecordingSettingsResponseGreetingsItemMode', 'UpdateCallRecordingSettingsResponseGreetingsItemType', 'UpdateCallRecordingSettingsResponseOnDemand', 'UpdateCallerBlockingSettingsRequest', 'UpdateCallerBlockingSettingsRequestGreetingsItem', 'UpdateCallerBlockingSettingsRequestGreetingsItemPreset', 'UpdateCallerBlockingSettingsRequestMode', 'UpdateCallerBlockingSettingsRequestNoCallerId', 'UpdateCallerBlockingSettingsRequestPayPhones', 'UpdateCallerBlockingSettingsResponse', 'UpdateCallerBlockingSettingsResponseGreetingsItem', 'UpdateCallerBlockingSettingsResponseGreetingsItemPreset', 'UpdateCallerBlockingSettingsResponseMode', 'UpdateCallerBlockingSettingsResponseNoCallerId', 'UpdateCallerBlockingSettingsResponsePayPhones', 'UpdateCompanyAnsweringRuleRequest', 'UpdateCompanyAnsweringRuleRequestCallHandlingAction', 'UpdateCompanyAnsweringRuleRequestCalledNumbersItem', 'UpdateCompanyAnsweringRuleRequestCallersItem', 'UpdateCompanyAnsweringRuleRequestGreetingsItem', 'UpdateCompanyAnsweringRuleRequestGreetingsItemCustom', 'UpdateCompanyAnsweringRuleRequestGreetingsItemPreset', 'UpdateCompanyAnsweringRuleRequestGreetingsItemType', 'UpdateCompanyAnsweringRuleRequestGreetingsItemUsageType', 'UpdateCompanyAnsweringRuleRequestSchedule', 'UpdateCompanyAnsweringRuleRequestScheduleRangesItem', 'UpdateCompanyAnsweringRuleRequestScheduleRef', 'UpdateCompanyAnsweringRuleRequestScheduleWeeklyRanges', 'UpdateCompanyAnsweringRuleRequestScheduleWeeklyRangesFridayItem', 'UpdateCompanyAnsweringRuleRequestScheduleWeeklyRangesMondayItem', 'UpdateCompanyAnsweringRuleRequestScheduleWeeklyRangesSaturdayItem', 'UpdateCompanyAnsweringRuleRequestScheduleWeeklyRangesSundayItem', 'UpdateCompanyAnsweringRuleRequestScheduleWeeklyRangesThursdayItem', 'UpdateCompanyAnsweringRuleRequestScheduleWeeklyRangesTuesdayItem', 'UpdateCompanyAnsweringRuleRequestScheduleWeeklyRangesWednesdayItem', 'UpdateCompanyAnsweringRuleRequestType', 'UpdateCompanyAnsweringRuleResponse', 'UpdateCompanyAnsweringRuleResponseCallHandlingAction', 'UpdateCompanyAnsweringRuleResponseCalledNumbersItem', 'UpdateCompanyAnsweringRuleResponseCallersItem', 'UpdateCompanyAnsweringRuleResponseExtension', 'UpdateCompanyAnsweringRuleResponseGreetingsItem', 'UpdateCompanyAnsweringRuleResponseGreetingsItemCustom', 'UpdateCompanyAnsweringRuleResponseGreetingsItemPreset', 'UpdateCompanyAnsweringRuleResponseGreetingsItemType', 'UpdateCompanyAnsweringRuleResponseGreetingsItemUsageType', 'UpdateCompanyAnsweringRuleResponseSchedule', 'UpdateCompanyAnsweringRuleResponseScheduleRangesItem', 'UpdateCompanyAnsweringRuleResponseScheduleRef', 'UpdateCompanyAnsweringRuleResponseScheduleWeeklyRanges', 'UpdateCompanyAnsweringRuleResponseScheduleWeeklyRangesFridayItem', 'UpdateCompanyAnsweringRuleResponseScheduleWeeklyRangesMondayItem', 'UpdateCompanyAnsweringRuleResponseScheduleWeeklyRangesSaturdayItem', 'UpdateCompanyAnsweringRuleResponseScheduleWeeklyRangesSundayItem', 'UpdateCompanyAnsweringRuleResponseScheduleWeeklyRangesThursdayItem', 'UpdateCompanyAnsweringRuleResponseScheduleWeeklyRangesTuesdayItem', 'UpdateCompanyAnsweringRuleResponseScheduleWeeklyRangesWednesdayItem', 'UpdateCompanyAnsweringRuleResponseType', 'UpdateCompanyBusinessHoursRequest', 'UpdateCompanyBusinessHoursRequestSchedule', 'UpdateCompanyBusinessHoursRequestScheduleWeeklyRanges', 'UpdateCompanyBusinessHoursRequestScheduleWeeklyRangesFridayItem', 'UpdateCompanyBusinessHoursRequestScheduleWeeklyRangesMondayItem', 'UpdateCompanyBusinessHoursRequestScheduleWeeklyRangesSaturdayItem', 'UpdateCompanyBusinessHoursRequestScheduleWeeklyRangesSundayItem', 'UpdateCompanyBusinessHoursRequestScheduleWeeklyRangesThursdayItem', 'UpdateCompanyBusinessHoursRequestScheduleWeeklyRangesTuesdayItem', 'UpdateCompanyBusinessHoursRequestScheduleWeeklyRangesWednesdayItem', 'UpdateCompanyBusinessHoursResponse', 'UpdateCompanyBusinessHoursResponseSchedule', 'UpdateCompanyBusinessHoursResponseScheduleWeeklyRanges', 'UpdateCompanyBusinessHoursResponseScheduleWeeklyRangesFridayItem', 'UpdateCompanyBusinessHoursResponseScheduleWeeklyRangesMondayItem', 'UpdateCompanyBusinessHoursResponseScheduleWeeklyRangesSaturdayItem', 'UpdateCompanyBusinessHoursResponseScheduleWeeklyRangesSundayItem', 'UpdateCompanyBusinessHoursResponseScheduleWeeklyRangesThursdayItem', 'UpdateCompanyBusinessHoursResponseScheduleWeeklyRangesTuesdayItem', 'UpdateCompanyBusinessHoursResponseScheduleWeeklyRangesWednesdayItem', 'UpdateConferencingInfoRequest', 'UpdateConferencingInfoRequestPhoneNumbersItem', 'UpdateConferencingSettingsRequest', 'UpdateConferencingSettingsRequestPhoneNumbersItem', 'UpdateConferencingSettingsResponse', 'UpdateConferencingSettingsResponsePhoneNumbersItem', 'UpdateConferencingSettingsResponsePhoneNumbersItemCountry', 'UpdateContactResponse', 'UpdateContactResponseAvailability', 'UpdateContactResponseBusinessAddress', 'UpdateContactResponseHomeAddress', 'UpdateContactResponseOtherAddress', 'UpdateCustomFieldRequest', 'UpdateCustomFieldResponse', 'UpdateCustomFieldResponseCategory', 'UpdateDeviceRequest', 'UpdateDeviceRequestEmergency', 'UpdateDeviceRequestEmergencyAddress', 'UpdateDeviceRequestEmergencyAddressEditableStatus', 'UpdateDeviceRequestEmergencyAddressStatus', 'UpdateDeviceRequestEmergencyLocation', 'UpdateDeviceRequestEmergencyServiceAddress', 'UpdateDeviceRequestEmergencySyncStatus', 'UpdateDeviceRequestExtension', 'UpdateDeviceRequestPhoneLines', 'UpdateDeviceRequestPhoneLinesPhoneLinesItem', 'UpdateDeviceResponse', 'UpdateDeviceResponseBillingStatement', 'UpdateDeviceResponseBillingStatementChargesItem', 'UpdateDeviceResponseBillingStatementFeesItem', 'UpdateDeviceResponseEmergency', 'UpdateDeviceResponseEmergencyAddress', 'UpdateDeviceResponseEmergencyAddressEditableStatus', 'UpdateDeviceResponseEmergencyAddressStatus', 'UpdateDeviceResponseEmergencyLocation', 'UpdateDeviceResponseEmergencyServiceAddress', 'UpdateDeviceResponseEmergencyServiceAddressSyncStatus', 'UpdateDeviceResponseEmergencySyncStatus', 'UpdateDeviceResponseExtension', 'UpdateDeviceResponseLinePooling', 'UpdateDeviceResponseModel', 'UpdateDeviceResponseModelAddonsItem', 'UpdateDeviceResponseModelFeaturesItem', 'UpdateDeviceResponsePhoneLinesItem', 'UpdateDeviceResponsePhoneLinesItemEmergencyAddress', 'UpdateDeviceResponsePhoneLinesItemLineType', 'UpdateDeviceResponsePhoneLinesItemPhoneInfo', 'UpdateDeviceResponsePhoneLinesItemPhoneInfoCountry', 'UpdateDeviceResponsePhoneLinesItemPhoneInfoExtension', 'UpdateDeviceResponsePhoneLinesItemPhoneInfoPaymentType', 'UpdateDeviceResponsePhoneLinesItemPhoneInfoType', 'UpdateDeviceResponsePhoneLinesItemPhoneInfoUsageType', 'UpdateDeviceResponseShipping', 'UpdateDeviceResponseShippingAddress', 'UpdateDeviceResponseShippingMethod', 'UpdateDeviceResponseShippingMethodId', 'UpdateDeviceResponseShippingMethodName', 'UpdateDeviceResponseShippingStatus', 'UpdateDeviceResponseSite', 'UpdateDeviceResponseStatus', 'UpdateDeviceResponseType', 'UpdateEmergencyLocationResponse', 'UpdateEmergencyLocationResponseAddress', 'UpdateEmergencyLocationResponseAddressStatus', 'UpdateEmergencyLocationResponseOwnersItem', 'UpdateEmergencyLocationResponseSite', 'UpdateEmergencyLocationResponseSyncStatus', 'UpdateEmergencyLocationResponseUsageStatus', 'UpdateEmergencyLocationResponseVisibility', 'UpdateEventResponse', 'UpdateEventResponseColor', 'UpdateEventResponseEndingOn', 'UpdateEventResponseRecurrence', 'UpdateExtensionCallQueuePresenceRequest', 'UpdateExtensionCallQueuePresenceRequestRecordsItem', 'UpdateExtensionCallQueuePresenceRequestRecordsItemCallQueue', 'UpdateExtensionCallQueuePresenceResponse', 'UpdateExtensionCallQueuePresenceResponseRecordsItem', 'UpdateExtensionCallQueuePresenceResponseRecordsItemCallQueue', 'UpdateExtensionCallerIdRequest', 'UpdateExtensionCallerIdRequestByDeviceItem', 'UpdateExtensionCallerIdRequestByDeviceItemCallerId', 'UpdateExtensionCallerIdRequestByDeviceItemCallerIdPhoneInfo', 'UpdateExtensionCallerIdRequestByDeviceItemDevice', 'UpdateExtensionCallerIdRequestByFeatureItem', 'UpdateExtensionCallerIdRequestByFeatureItemCallerId', 'UpdateExtensionCallerIdRequestByFeatureItemCallerIdPhoneInfo', 'UpdateExtensionCallerIdRequestByFeatureItemFeature', 'UpdateExtensionCallerIdResponse', 'UpdateExtensionCallerIdResponseByDeviceItem', 'UpdateExtensionCallerIdResponseByDeviceItemCallerId', 'UpdateExtensionCallerIdResponseByDeviceItemCallerIdPhoneInfo', 'UpdateExtensionCallerIdResponseByDeviceItemDevice', 'UpdateExtensionCallerIdResponseByFeatureItem', 'UpdateExtensionCallerIdResponseByFeatureItemCallerId', 'UpdateExtensionCallerIdResponseByFeatureItemCallerIdPhoneInfo', 'UpdateExtensionCallerIdResponseByFeatureItemFeature', 'UpdateExtensionRequest', 'UpdateExtensionRequestCallQueueInfo', 'UpdateExtensionRequestContact', 'UpdateExtensionRequestContactBusinessAddress', 'UpdateExtensionRequestContactPronouncedName', 'UpdateExtensionRequestContactPronouncedNamePrompt', 'UpdateExtensionRequestContactPronouncedNamePromptContentType', 'UpdateExtensionRequestContactPronouncedNameType', 'UpdateExtensionRequestCustomFieldsItem', 'UpdateExtensionRequestReferencesItem', 'UpdateExtensionRequestReferencesItemType', 'UpdateExtensionRequestRegionalSettings', 'UpdateExtensionRequestRegionalSettingsFormattingLocale', 'UpdateExtensionRequestRegionalSettingsGreetingLanguage', 'UpdateExtensionRequestRegionalSettingsHomeCountry', 'UpdateExtensionRequestRegionalSettingsLanguage', 'UpdateExtensionRequestRegionalSettingsTimeFormat', 'UpdateExtensionRequestRegionalSettingsTimezone', 'UpdateExtensionRequestSetupWizardState', 'UpdateExtensionRequestSite', 'UpdateExtensionRequestStatus', 'UpdateExtensionRequestStatusInfo', 'UpdateExtensionRequestStatusInfoReason', 'UpdateExtensionRequestTransitionItem', 'UpdateExtensionRequestType', 'UpdateExtensionResponse', 'UpdateExtensionResponseAccount', 'UpdateExtensionResponseCallQueueInfo', 'UpdateExtensionResponseContact', 'UpdateExtensionResponseContactBusinessAddress', 'UpdateExtensionResponseContactPronouncedName', 'UpdateExtensionResponseContactPronouncedNamePrompt', 'UpdateExtensionResponseContactPronouncedNamePromptContentType', 'UpdateExtensionResponseContactPronouncedNameType', 'UpdateExtensionResponseCustomFieldsItem', 'UpdateExtensionResponseDepartmentsItem', 'UpdateExtensionResponsePermissions', 'UpdateExtensionResponsePermissionsAdmin', 'UpdateExtensionResponsePermissionsInternationalCalling', 'UpdateExtensionResponseProfileImage', 'UpdateExtensionResponseProfileImageScalesItem', 'UpdateExtensionResponseReferencesItem', 'UpdateExtensionResponseReferencesItemType', 'UpdateExtensionResponseRegionalSettings', 'UpdateExtensionResponseRegionalSettingsFormattingLocale', 'UpdateExtensionResponseRegionalSettingsGreetingLanguage', 'UpdateExtensionResponseRegionalSettingsHomeCountry', 'UpdateExtensionResponseRegionalSettingsLanguage', 'UpdateExtensionResponseRegionalSettingsTimeFormat', 'UpdateExtensionResponseRegionalSettingsTimezone', 'UpdateExtensionResponseRolesItem', 'UpdateExtensionResponseServiceFeaturesItem', 'UpdateExtensionResponseServiceFeaturesItemFeatureName', 'UpdateExtensionResponseSetupWizardState', 'UpdateExtensionResponseSite', 'UpdateExtensionResponseStatus', 'UpdateExtensionResponseStatusInfo', 'UpdateExtensionResponseStatusInfoReason', 'UpdateExtensionResponseType', 'UpdateFavoriteContactListRequest', 'UpdateFavoriteContactListRequestRecordsItem', 'UpdateFavoriteContactListResponse', 'UpdateFavoriteContactListResponseRecordsItem', 'UpdateForwardingNumberRequest', 'UpdateForwardingNumberRequest', 'UpdateForwardingNumberRequestLabel', 'UpdateForwardingNumberRequestLabel', 'UpdateForwardingNumberRequestType', 'UpdateForwardingNumberRequestType', 'UpdateForwardingNumberResponse', 'UpdateForwardingNumberResponseDevice', 'UpdateForwardingNumberResponseFeaturesItem', 'UpdateForwardingNumberResponseLabel', 'UpdateForwardingNumberResponseType', 'UpdateGlipEveryoneRequest', 'UpdateIVRMenuResponse', 'UpdateIVRMenuResponseActionsItem', 'UpdateIVRMenuResponseActionsItemAction', 'UpdateIVRMenuResponseActionsItemExtension', 'UpdateIVRMenuResponsePrompt', 'UpdateIVRMenuResponsePromptAudio', 'UpdateIVRMenuResponsePromptLanguage', 'UpdateIVRMenuResponsePromptMode', 'UpdateIVRPromptRequest', 'UpdateIVRPromptRequest', 'UpdateIVRPromptResponse', 'UpdateMeetingResponse', 'UpdateMeetingResponseHost', 'UpdateMeetingResponseLinks', 'UpdateMeetingResponseMeetingType', 'UpdateMeetingResponseOccurrencesItem', 'UpdateMeetingResponseSchedule', 'UpdateMeetingResponseScheduleTimeZone', 'UpdateMeetingServiceInfoRequest', 'UpdateMeetingServiceInfoRequestExternalUserInfo', 'UpdateMeetingServiceInfoResponse', 'UpdateMeetingServiceInfoResponseDialInNumbersItem', 'UpdateMeetingServiceInfoResponseDialInNumbersItemCountry', 'UpdateMeetingServiceInfoResponseExternalUserInfo', 'UpdateMessageRequest', 'UpdateMessageRequest', 'UpdateMessageRequestReadStatus', 'UpdateMessageRequestReadStatus', 'UpdateMessageResponse', 'UpdateMessageResponse', 'UpdateMessageResponseAttachmentsItem', 'UpdateMessageResponseAttachmentsItemType', 'UpdateMessageResponseAvailability', 'UpdateMessageResponseBody', 'UpdateMessageResponseBodyAttachmentsItem', 'UpdateMessageResponseBodyAttachmentsItemType', 'UpdateMessageResponseBodyAvailability', 'UpdateMessageResponseBodyConversation', 'UpdateMessageResponseBodyDirection', 'UpdateMessageResponseBodyFaxResolution', 'UpdateMessageResponseBodyFrom', 'UpdateMessageResponseBodyMessageStatus', 'UpdateMessageResponseBodyPriority', 'UpdateMessageResponseBodyReadStatus', 'UpdateMessageResponseBodyToItem', 'UpdateMessageResponseBodyType', 'UpdateMessageResponseBodyVmTranscriptionStatus', 'UpdateMessageResponseConversation', 'UpdateMessageResponseDirection', 'UpdateMessageResponseFaxResolution', 'UpdateMessageResponseFrom', 'UpdateMessageResponseMessageStatus', 'UpdateMessageResponsePriority', 'UpdateMessageResponseReadStatus', 'UpdateMessageResponseToItem', 'UpdateMessageResponseToItemFaxErrorCode', 'UpdateMessageResponseToItemMessageStatus', 'UpdateMessageResponseType', 'UpdateMessageResponseVmTranscriptionStatus', 'UpdateMessageStoreConfigurationRequest', 'UpdateMessageStoreConfigurationResponse', 'UpdateMessageType', 'UpdateMultipleSwitchesRequest', 'UpdateMultipleSwitchesRequest', 'UpdateMultipleSwitchesRequestRecordsItem', 'UpdateMultipleSwitchesRequestRecordsItemEmergencyAddress', 'UpdateMultipleSwitchesRequestRecordsItemEmergencyLocation', 'UpdateMultipleSwitchesRequestRecordsItemSite', 'UpdateMultipleSwitchesResponse', 'UpdateMultipleSwitchesResponse', 'UpdateMultipleSwitchesResponseTask', 'UpdateMultipleSwitchesResponseTaskStatus', 'UpdateMultipleWirelessPointsRequest', 'UpdateMultipleWirelessPointsRequest', 'UpdateMultipleWirelessPointsRequestRecordsItem', 'UpdateMultipleWirelessPointsRequestRecordsItem', 'UpdateMultipleWirelessPointsRequestRecordsItemEmergencyAddress', 'UpdateMultipleWirelessPointsRequestRecordsItemEmergencyAddress', 'UpdateMultipleWirelessPointsRequestRecordsItemEmergencyLocation', 'UpdateMultipleWirelessPointsRequestRecordsItemSite', 'UpdateMultipleWirelessPointsResponse', 'UpdateMultipleWirelessPointsResponse', 'UpdateMultipleWirelessPointsResponseTask', 'UpdateMultipleWirelessPointsResponseTask', 'UpdateMultipleWirelessPointsResponseTaskStatus', 'UpdateMultipleWirelessPointsResponseTaskStatus', 'UpdateNetworkRequest', 'UpdateNetworkRequest', 'UpdateNetworkRequestEmergencyLocation', 'UpdateNetworkRequestPrivateIpRangesItem', 'UpdateNetworkRequestPrivateIpRangesItemEmergencyAddress', 'UpdateNetworkRequestPublicIpRangesItem', 'UpdateNetworkRequestSite', 'UpdateNotificationSettingsRequest', 'UpdateNotificationSettingsRequestInboundFaxes', 'UpdateNotificationSettingsRequestInboundTexts', 'UpdateNotificationSettingsRequestMissedCalls', 'UpdateNotificationSettingsRequestOutboundFaxes', 'UpdateNotificationSettingsRequestVoicemails', 'UpdateNotificationSettingsResponse', 'UpdateNotificationSettingsResponseEmailRecipientsItem', 'UpdateNotificationSettingsResponseEmailRecipientsItemPermission', 'UpdateNotificationSettingsResponseEmailRecipientsItemStatus', 'UpdateNotificationSettingsResponseInboundFaxes', 'UpdateNotificationSettingsResponseInboundTexts', 'UpdateNotificationSettingsResponseMissedCalls', 'UpdateNotificationSettingsResponseOutboundFaxes', 'UpdateNotificationSettingsResponseVoicemails', 'UpdateSubscriptionRequest', 'UpdateSubscriptionRequestDeliveryMode', 'UpdateSubscriptionRequestDeliveryModeTransportType', 'UpdateSubscriptionResponse', 'UpdateSubscriptionResponseBlacklistedData', 'UpdateSubscriptionResponseDeliveryMode', 'UpdateSubscriptionResponseDeliveryModeTransportType', 'UpdateSubscriptionResponseDisabledFiltersItem', 'UpdateSubscriptionResponseStatus', 'UpdateSubscriptionResponseTransportType', 'UpdateSwitchInfo', 'UpdateSwitchRequest', 'UpdateSwitchRequestEmergencyAddress', 'UpdateSwitchRequestEmergencyLocation', 'UpdateSwitchRequestSite', 'UpdateSwitchResponse', 'UpdateSwitchResponseEmergencyAddress', 'UpdateSwitchResponseEmergencyLocation', 'UpdateSwitchResponseSite', 'UpdateUnifiedPresence', 'UpdateUnifiedPresenceGlip', 'UpdateUnifiedPresenceGlipAvailability', 'UpdateUnifiedPresenceGlipVisibility', 'UpdateUnifiedPresenceRequest', 'UpdateUnifiedPresenceRequestGlip', 'UpdateUnifiedPresenceRequestGlipAvailability', 'UpdateUnifiedPresenceRequestGlipVisibility', 'UpdateUnifiedPresenceRequestTelephony', 'UpdateUnifiedPresenceRequestTelephonyAvailability', 'UpdateUnifiedPresenceResponse', 'UpdateUnifiedPresenceResponseGlip', 'UpdateUnifiedPresenceResponseGlipAvailability', 'UpdateUnifiedPresenceResponseGlipStatus', 'UpdateUnifiedPresenceResponseGlipVisibility', 'UpdateUnifiedPresenceResponseMeeting', 'UpdateUnifiedPresenceResponseMeetingStatus', 'UpdateUnifiedPresenceResponseStatus', 'UpdateUnifiedPresenceResponseTelephony', 'UpdateUnifiedPresenceResponseTelephonyAvailability', 'UpdateUnifiedPresenceResponseTelephonyStatus', 'UpdateUnifiedPresenceResponseTelephonyVisibility', 'UpdateUnifiedPresenceTelephony', 'UpdateUnifiedPresenceTelephonyAvailability', 'UpdateUserBusinessHoursRequest', 'UpdateUserBusinessHoursRequestSchedule', 'UpdateUserBusinessHoursRequestScheduleWeeklyRanges', 'UpdateUserBusinessHoursRequestScheduleWeeklyRangesFridayItem', 'UpdateUserBusinessHoursRequestScheduleWeeklyRangesMondayItem', 'UpdateUserBusinessHoursRequestScheduleWeeklyRangesSaturdayItem', 'UpdateUserBusinessHoursRequestScheduleWeeklyRangesSundayItem', 'UpdateUserBusinessHoursRequestScheduleWeeklyRangesThursdayItem', 'UpdateUserBusinessHoursRequestScheduleWeeklyRangesTuesdayItem', 'UpdateUserBusinessHoursRequestScheduleWeeklyRangesWednesdayItem', 'UpdateUserBusinessHoursResponse', 'UpdateUserBusinessHoursResponseSchedule', 'UpdateUserBusinessHoursResponseScheduleWeeklyRanges', 'UpdateUserBusinessHoursResponseScheduleWeeklyRangesFridayItem', 'UpdateUserBusinessHoursResponseScheduleWeeklyRangesMondayItem', 'UpdateUserBusinessHoursResponseScheduleWeeklyRangesSaturdayItem', 'UpdateUserBusinessHoursResponseScheduleWeeklyRangesSundayItem', 'UpdateUserBusinessHoursResponseScheduleWeeklyRangesThursdayItem', 'UpdateUserBusinessHoursResponseScheduleWeeklyRangesTuesdayItem', 'UpdateUserBusinessHoursResponseScheduleWeeklyRangesWednesdayItem', 'UpdateUserCallQueuesRequest', 'UpdateUserCallQueuesRequestRecordsItem', 'UpdateUserCallQueuesResponse', 'UpdateUserCallQueuesResponseRecordsItem', 'UpdateUserPresenceStatusRequest', 'UpdateUserPresenceStatusRequestActiveCallsItem', 'UpdateUserPresenceStatusRequestActiveCallsItemAdditional', 'UpdateUserPresenceStatusRequestActiveCallsItemAdditionalType', 'UpdateUserPresenceStatusRequestActiveCallsItemDirection', 'UpdateUserPresenceStatusRequestActiveCallsItemPrimary', 'UpdateUserPresenceStatusRequestActiveCallsItemPrimaryType', 'UpdateUserPresenceStatusRequestActiveCallsItemSipData', 'UpdateUserPresenceStatusRequestActiveCallsItemTelephonyStatus', 'UpdateUserPresenceStatusRequestDndStatus', 'UpdateUserPresenceStatusRequestUserStatus', 'UpdateUserPresenceStatusResponse', 'UpdateUserPresenceStatusResponseActiveCallsItem', 'UpdateUserPresenceStatusResponseActiveCallsItemAdditional', 'UpdateUserPresenceStatusResponseActiveCallsItemAdditionalType', 'UpdateUserPresenceStatusResponseActiveCallsItemDirection', 'UpdateUserPresenceStatusResponseActiveCallsItemPrimary', 'UpdateUserPresenceStatusResponseActiveCallsItemPrimaryType', 'UpdateUserPresenceStatusResponseActiveCallsItemSipData', 'UpdateUserPresenceStatusResponseActiveCallsItemTelephonyStatus', 'UpdateUserPresenceStatusResponseDndStatus', 'UpdateUserPresenceStatusResponseExtension', 'UpdateUserPresenceStatusResponseMeetingStatus', 'UpdateUserPresenceStatusResponsePresenceStatus', 'UpdateUserPresenceStatusResponseTelephonyStatus', 'UpdateUserPresenceStatusResponseUserStatus', 'UpdateUserProfileImageRequest', 'UpdateUserVideoConfigurationRequest', 'UpdateUserVideoConfigurationRequestProvider', 'UpdateUserVideoConfigurationResponse', 'UpdateUserVideoConfigurationResponseProvider', 'UpdateWirelessPointRequest', 'UpdateWirelessPointRequestEmergencyAddress', 'UpdateWirelessPointRequestEmergencyLocation', 'UpdateWirelessPointRequestSite', 'UpdateWirelessPointResponse', 'UpdateWirelessPointResponseEmergencyAddress', 'UpdateWirelessPointResponseEmergencyLocation', 'UpdateWirelessPointResponseSite', 'User', 'UserActiveCallsResponse', 'UserAnsweringRuleList', 'UserAnsweringRuleListNavigation', 'UserAnsweringRuleListNavigationFirstPage', 'UserAnsweringRuleListPaging', 'UserAnsweringRuleListRecordsItem', 'UserAnsweringRuleListRecordsItemType', 'UserBusinessHoursUpdateRequest', 'UserBusinessHoursUpdateResponse', 'UserBusinessHoursUpdateResponseSchedule', 'UserCallLogResponse', 'UserCallLogResponseNavigation', 'UserCallLogResponseNavigationFirstPage', 'UserCallLogResponsePaging', 'UserCallLogResponseRecordsItem', 'UserCallLogResponseRecordsItemAction', 'UserCallLogResponseRecordsItemDirection', 'UserCallLogResponseRecordsItemExtension', 'UserCallLogResponseRecordsItemFrom', 'UserCallLogResponseRecordsItemFromDevice', 'UserCallLogResponseRecordsItemLegsItem', 'UserCallLogResponseRecordsItemLegsItemAction', 'UserCallLogResponseRecordsItemLegsItemBilling', 'UserCallLogResponseRecordsItemLegsItemDelegate', 'UserCallLogResponseRecordsItemLegsItemDirection', 'UserCallLogResponseRecordsItemLegsItemLegType', 'UserCallLogResponseRecordsItemLegsItemMessage', 'UserCallLogResponseRecordsItemLegsItemReason', 'UserCallLogResponseRecordsItemLegsItemRecording', 'UserCallLogResponseRecordsItemLegsItemRecordingType', 'UserCallLogResponseRecordsItemLegsItemResult', 'UserCallLogResponseRecordsItemLegsItemTransport', 'UserCallLogResponseRecordsItemLegsItemType', 'UserCallLogResponseRecordsItemReason', 'UserCallLogResponseRecordsItemResult', 'UserCallLogResponseRecordsItemTransport', 'UserCallLogResponseRecordsItemType', 'UserCallQueues', 'UserCallQueuesRecordsItem', 'UserPatch', 'UserPatchSchemasItem', 'UserPatch_OperationsItem', 'UserPatch_OperationsItemOp', 'UserSchemasItem', 'UserSearchResponse', 'UserSearchResponseSchemasItem', 'UserSearchResponse_ResourcesItem', 'UserSearchResponse_ResourcesItemAddressesItem', 'UserSearchResponse_ResourcesItemAddressesItemType', 'UserSearchResponse_ResourcesItemEmailsItem', 'UserSearchResponse_ResourcesItemEmailsItemType', 'UserSearchResponse_ResourcesItemMeta', 'UserSearchResponse_ResourcesItemMetaResourceType', 'UserSearchResponse_ResourcesItemName', 'UserSearchResponse_ResourcesItemPhoneNumbersItem', 'UserSearchResponse_ResourcesItemPhoneNumbersItemType', 'UserSearchResponse_ResourcesItemPhotosItem', 'UserSearchResponse_ResourcesItemPhotosItemType', 'UserSearchResponse_ResourcesItemSchemasItem', 'UserSearchResponse_ResourcesItemUrnIetfParamsScimSchemasExtensionEnterprise_2_0_User', 'UserTemplates', 'UserTemplatesRecordsItem', 'UserTemplatesRecordsItemType', 'UserVideoConfiguration', 'UserVideoConfigurationProvider', 'ValidateMultipleSwitchesRequest', 'ValidateMultipleSwitchesRequest', 'ValidateMultipleSwitchesRequestRecordsItem', 'ValidateMultipleSwitchesRequestRecordsItemEmergencyAddress', 'ValidateMultipleSwitchesRequestRecordsItemEmergencyLocation', 'ValidateMultipleSwitchesRequestRecordsItemSite', 'ValidateMultipleSwitchesResponse', 'ValidateMultipleSwitchesResponse', 'ValidateMultipleSwitchesResponseRecordsItem', 'ValidateMultipleSwitchesResponseRecordsItem', 'ValidateMultipleSwitchesResponseRecordsItemErrorsItem', 'ValidateMultipleSwitchesResponseRecordsItemStatus', 'ValidateMultipleSwitchesResponseRecordsItemStatus', 'ValidateMultipleWirelessPointsRequest', 'ValidateMultipleWirelessPointsRequest', 'ValidateMultipleWirelessPointsRequestRecordsItem', 'ValidateMultipleWirelessPointsRequestRecordsItem', 'ValidateMultipleWirelessPointsRequestRecordsItemEmergencyAddress', 'ValidateMultipleWirelessPointsRequestRecordsItemSite', 'ValidateMultipleWirelessPointsResponse', 'ValidateMultipleWirelessPointsResponse', 'ValidateMultipleWirelessPointsResponseRecordsItem', 'ValidateMultipleWirelessPointsResponseRecordsItem', 'ValidateMultipleWirelessPointsResponseRecordsItemErrorsItem', 'ValidateMultipleWirelessPointsResponseRecordsItemErrorsItem', 'ValidateMultipleWirelessPointsResponseRecordsItemStatus', 'ValidateMultipleWirelessPointsResponseRecordsItemStatus', 'WirelessPointInfo', 'WirelessPointsList', ]
/ringcentral_async_client-1.0.3-py3-none-any.whl/ringcentral_async_client/_code_gen/model/_16.py
0.726426
0.201361
_16.py
pypi
from ._2 import * class ExtensionCreationRequestSetupWizardState(Enum): """ Specifies extension configuration wizard state (web service setup). """ NotStarted = 'NotStarted' Incomplete = 'Incomplete' Completed = 'Completed' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ExtensionCreationRequestSiteOperator(DataClassJsonMixin): """ Site Fax/SMS recipient (operator) reference. Multi-level IVR should be enabled """ id: Optional[str] = None """ Internal identifier of an operator """ uri: Optional[str] = None """ Link to an operator resource """ extension_number: Optional[str] = None """ Extension number (pin) """ name: Optional[str] = None """ Operator extension user full name """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ExtensionCreationRequestSite(DataClassJsonMixin): id: Optional[str] = None """ Internal idetifier of a site extension """ uri: Optional[str] = None """ Link to a site resource """ name: Optional[str] = None """ Extension user first name """ extension_number: Optional[str] = None """ Extension number """ caller_id_name: Optional[str] = None """ Custom name of a caller. Max number of characters is 15 (only alphabetical symbols, numbers and commas are supported) """ email: Optional[str] = None """ Exetnsion user email """ business_address: Optional[dict] = None """ Extension user business address. The default is Company settings """ regional_settings: Optional[dict] = None """ Information about regional settings. The default is Company settings """ operator: Optional[ExtensionCreationRequestSiteOperator] = None """ Site Fax/SMS recipient (operator) reference. Multi-level IVR should be enabled """ code: Optional[str] = None """ Site code value. Returned only if specified """ class ExtensionCreationRequestStatus(Enum): """ Extension current state """ Enabled = 'Enabled' Disabled = 'Disabled' NotActivated = 'NotActivated' Unassigned = 'Unassigned' Frozen = 'Frozen' class ExtensionCreationRequestStatusInfoReason(Enum): """ Type of suspension """ Voluntarily = 'Voluntarily' Involuntarily = 'Involuntarily' SuspendedVoluntarily = 'SuspendedVoluntarily' SuspendedVoluntarily2 = 'SuspendedVoluntarily2' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ExtensionCreationRequestStatusInfo(DataClassJsonMixin): """ Status information (reason, comment). For 'Disabled' status only """ comment: Optional[str] = None """ A free-form user comment, describing the status change reason """ reason: Optional[ExtensionCreationRequestStatusInfoReason] = None """ Type of suspension """ class ExtensionCreationRequestType(Enum): """ Extension type """ User = 'User' VirtualUser = 'VirtualUser' DigitalUser = 'DigitalUser' Department = 'Department' Announcement = 'Announcement' Voicemail = 'Voicemail' SharedLinesGroup = 'SharedLinesGroup' PagingOnly = 'PagingOnly' ParkLocation = 'ParkLocation' Limited = 'Limited' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ExtensionCreationRequest(DataClassJsonMixin): contact: Optional[ExtensionCreationRequestContact] = None """ Contact Information """ extension_number: Optional[str] = None """ Number of extension """ custom_fields: Optional[List[ExtensionCreationRequestCustomFieldsItem]] = None password: Optional[str] = None """ Password for extension. If not specified, the password is auto-generated """ references: Optional[List[ExtensionCreationRequestReferencesItem]] = None """ List of non-RC internal identifiers assigned to an extension """ regional_settings: Optional[ExtensionCreationRequestRegionalSettings] = None """ Extension region data (timezone, home country, language) """ partner_id: Optional[str] = None """ Additional extension identifier, created by partner application and applied on client side """ ivr_pin: Optional[str] = None """ IVR PIN """ setup_wizard_state: Optional[ExtensionCreationRequestSetupWizardState] = 'NotStarted' """ Specifies extension configuration wizard state (web service setup). """ site: Optional[ExtensionCreationRequestSite] = None status: Optional[ExtensionCreationRequestStatus] = None """ Extension current state """ status_info: Optional[ExtensionCreationRequestStatusInfo] = None """ Status information (reason, comment). For 'Disabled' status only """ type: Optional[ExtensionCreationRequestType] = None """ Extension type """ hidden: Optional[bool] = None """ Hides extension from showing in company directory. Supported for extensions of User type only. For unassigned extensions the value is set to 'True' by default. For assigned extensions the value is set to 'False' by default """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SwitchInfoSite(DataClassJsonMixin): """ Site data """ id: Optional[str] = None """ Internal identifier of a site. The company identifier value is 'main-site' """ name: Optional[str] = None """ Name of a site """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SwitchInfoEmergencyAddress(DataClassJsonMixin): """ Emergency address assigned to the switch. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned Generated by Python OpenAPI Parser """ country: Optional[str] = None """ Country name """ country_id: Optional[str] = None """ Internal identifier of a country """ country_iso_code: Optional[str] = None """ ISO code of a country """ country_name: Optional[str] = None """ Full name of a country """ customer_name: Optional[str] = None """ Customer name """ state: Optional[str] = None """ State/Province name. Mandatory for the USA, the UK and Canada """ state_id: Optional[str] = None """ Internal identifier of a state """ state_iso_code: Optional[str] = None """ ISO code of a state """ state_name: Optional[str] = None """ Full name of a state """ city: Optional[str] = None """ City name """ street: Optional[str] = None """ First line address """ street2: Optional[str] = None """ Second line address (apartment, suite, unit, building, floor, etc.) """ zip: Optional[str] = None """ Postal (Zip) code """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SwitchInfoEmergencyLocation(DataClassJsonMixin): """ Emergency response location information """ id: Optional[str] = None """ Internal identifier of an emergency response location """ name: Optional[str] = None """ Emergency response location name """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SwitchInfo(DataClassJsonMixin): uri: Optional[str] = None """ Link to the network switch resource """ id: Optional[str] = None """ Internal identifier of a network switch """ chassis_id: Optional[str] = None """ Unique identifier of a network switch """ name: Optional[str] = None """ Name of a network switch """ site: Optional[SwitchInfoSite] = None """ Site data """ emergency_address: Optional[SwitchInfoEmergencyAddress] = None """ Emergency address assigned to the switch. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ emergency_location_id: Optional[str] = None """ Deprecated. Emergency response location (address) internal identifier. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ emergency_location: Optional[SwitchInfoEmergencyLocation] = None """ Emergency response location information """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class EmergencyLocationInfoRequestAddress(DataClassJsonMixin): country: Optional[str] = None """ Country name """ country_id: Optional[str] = None """ Internal identifier of a country """ country_iso_code: Optional[str] = None """ ISO code of a country """ country_name: Optional[str] = None """ Full name of a country """ state: Optional[str] = None """ State/Province name. Mandatory for the USA, the UK and Canada """ state_id: Optional[str] = None """ Internal identifier of a state """ state_iso_code: Optional[str] = None """ ISO code of a state """ state_name: Optional[str] = None """ Full name of a state """ city: Optional[str] = None """ City name """ street: Optional[str] = None """ First line address """ street2: Optional[str] = None """ Second line address (apartment, suite, unit, building, floor, etc.) """ zip: Optional[str] = None """ Postal (Zip) code """ customer_name: Optional[str] = None """ Customer name """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class EmergencyLocationInfoRequestSite(DataClassJsonMixin): id: Optional[str] = None """ Internal idetifier of a site extension """ name: Optional[str] = None """ Extension user first name """ class EmergencyLocationInfoRequestAddressStatus(Enum): """ Emergency address status """ Valid = 'Valid' Invalid = 'Invalid' class EmergencyLocationInfoRequestUsageStatus(Enum): """ Status of emergency response location usage. """ Active = 'Active' Inactive = 'Inactive' class EmergencyLocationInfoRequestVisibility(Enum): """ Visibility of an emergency response location. If `Private` is set, then location is visible only for restricted number of users, specified in `owners` array Generated by Python OpenAPI Parser """ Private = 'Private' Public = 'Public' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class EmergencyLocationInfoRequestOwnersItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a user - private location owner """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class EmergencyLocationInfoRequest(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of the emergency response location """ address: Optional[EmergencyLocationInfoRequestAddress] = None name: Optional[str] = None """ Emergency response location name """ site: Optional[EmergencyLocationInfoRequestSite] = None address_status: Optional[EmergencyLocationInfoRequestAddressStatus] = None """ Emergency address status """ usage_status: Optional[EmergencyLocationInfoRequestUsageStatus] = None """ Status of emergency response location usage. """ visibility: Optional[EmergencyLocationInfoRequestVisibility] = 'Public' """ Visibility of an emergency response location. If `Private` is set, then location is visible only for restricted number of users, specified in `owners` array """ owners: Optional[List[EmergencyLocationInfoRequestOwnersItem]] = None """ List of private location owners """ class CompanyPhoneNumberInfoPaymentType(Enum): """ Payment type. 'External' is returned for forwarded numbers which are not terminated in the RingCentral phone system Generated by Python OpenAPI Parser """ External = 'External' TollFree = 'TollFree' Local = 'Local' BusinessMobileNumberProvider = 'BusinessMobileNumberProvider' class CompanyPhoneNumberInfoType(Enum): """ Phone number type """ VoiceFax = 'VoiceFax' FaxOnly = 'FaxOnly' VoiceOnly = 'VoiceOnly' class CompanyPhoneNumberInfoUsageType(Enum): """ Usage type of a phone number. Usage type of a phone number. Numbers of 'NumberPool' type wont't be returned for phone number list requests Generated by Python OpenAPI Parser """ MainCompanyNumber = 'MainCompanyNumber' AdditionalCompanyNumber = 'AdditionalCompanyNumber' CompanyNumber = 'CompanyNumber' DirectNumber = 'DirectNumber' CompanyFaxNumber = 'CompanyFaxNumber' ForwardedNumber = 'ForwardedNumber' ForwardedCompanyNumber = 'ForwardedCompanyNumber' ContactCenterNumber = 'ContactCenterNumber' ConferencingNumber = 'ConferencingNumber' MeetingsNumber = 'MeetingsNumber' NumberPool = 'NumberPool' BusinessMobileNumber = 'BusinessMobileNumber' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CompanyPhoneNumberInfoTemporaryNumber(DataClassJsonMixin): """ Temporary phone number, if any. Returned for phone numbers in `Pending` porting status only """ id: Optional[str] = None """ Temporary phone number identifier """ phone_number: Optional[str] = None """ Temporary phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) (with '+' sign) format """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CompanyPhoneNumberInfo(DataClassJsonMixin): uri: Optional[str] = None """ Link to a company phone number resource """ id: Optional[int] = None """ Internal identifier of a phone number """ country: Optional[dict] = None """ Brief information on a phone number country """ extension: Optional[dict] = None """ Information on the extension, to which the phone number is assigned. Returned only for the request of Account phone number list """ label: Optional[str] = None """ Custom user name of a phone number, if any """ location: Optional[str] = None """ Location (City, State). Filled for local US numbers """ payment_type: Optional[CompanyPhoneNumberInfoPaymentType] = None """ Payment type. 'External' is returned for forwarded numbers which are not terminated in the RingCentral phone system """ phone_number: Optional[str] = None """ Phone number """ status: Optional[str] = None """ Status of a phone number. If the value is 'Normal', the phone number is ready to be used. Otherwise it is an external number not yet ported to RingCentral """ type: Optional[CompanyPhoneNumberInfoType] = None """ Phone number type """ usage_type: Optional[CompanyPhoneNumberInfoUsageType] = None """ Usage type of a phone number. Usage type of a phone number. Numbers of 'NumberPool' type wont't be returned for phone number list requests """ temporary_number: Optional[CompanyPhoneNumberInfoTemporaryNumber] = None """ Temporary phone number, if any. Returned for phone numbers in `Pending` porting status only """ contact_center_provider: Optional[dict] = None """ CCRN (Contact Center Routing Number) provider. If not specified then the default value 'InContact/North America' is used, its ID is '1' """ vanity_pattern: Optional[str] = None """ Vanity pattern for this number. Returned only when vanity search option is requested. Vanity pattern corresponds to request parameters nxx plus line or numberPattern """ class ExtensionUpdateRequestStatus(Enum): Disabled = 'Disabled' Enabled = 'Enabled' NotActivated = 'NotActivated' Frozen = 'Frozen' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ExtensionUpdateRequestContact(DataClassJsonMixin): first_name: Optional[str] = None """ For User extension type only. Extension user first name """ last_name: Optional[str] = None """ For User extension type only. Extension user last name """ company: Optional[str] = None """ Extension user company name """ job_title: Optional[str] = None email: Optional[str] = None """ Email of extension user """ business_phone: Optional[str] = None """ Extension user contact phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) format """ mobile_phone: Optional[str] = None """ Extension user mobile (**non** Toll Free) phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) (with '+' sign) format """ email_as_login_name: Optional[bool] = None """ If 'True' then contact email is enabled as login name for this user. Please note that email should be unique in this case. The default value is 'False' """ department: Optional[str] = None """ Extension user department, if any """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ExtensionUpdateRequestRegionalSettingsHomeCountry(DataClassJsonMixin): id: Optional[str] = None """ internal Identifier of a country """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ExtensionUpdateRequestRegionalSettingsTimezone(DataClassJsonMixin): id: Optional[str] = None """ internal Identifier of a timezone """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ExtensionUpdateRequestRegionalSettingsLanguage(DataClassJsonMixin): id: Optional[str] = None """ internal Identifier of a language """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ExtensionUpdateRequestRegionalSettingsGreetingLanguage(DataClassJsonMixin): id: Optional[str] = None """ internal Identifier of a greeting language """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ExtensionUpdateRequestRegionalSettingsFormattingLocale(DataClassJsonMixin): id: Optional[str] = None """ Internal Identifier of a formatting language """ class ExtensionUpdateRequestRegionalSettingsTimeFormat(Enum): """ Time format setting """ OBJECT_12h = '12h' OBJECT_24h = '24h' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ExtensionUpdateRequestRegionalSettings(DataClassJsonMixin): home_country: Optional[ExtensionUpdateRequestRegionalSettingsHomeCountry] = None timezone: Optional[ExtensionUpdateRequestRegionalSettingsTimezone] = None language: Optional[ExtensionUpdateRequestRegionalSettingsLanguage] = None greeting_language: Optional[ExtensionUpdateRequestRegionalSettingsGreetingLanguage] = None formatting_locale: Optional[ExtensionUpdateRequestRegionalSettingsFormattingLocale] = None time_format: Optional[ExtensionUpdateRequestRegionalSettingsTimeFormat] = '12h' """ Time format setting """ class ExtensionUpdateRequestSetupWizardState(Enum): NotStarted = 'NotStarted' Incomplete = 'Incomplete' Completed = 'Completed' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ExtensionUpdateRequestCallQueueInfo(DataClassJsonMixin): """ For Department extension type only. Call queue settings """ sla_goal: Optional[int] = None """ Target percentage of calls that must be answered by agents within the service level time threshold """ sla_threshold_seconds: Optional[int] = None include_abandoned_calls: Optional[bool] = None abandoned_threshold_seconds: Optional[int] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ExtensionUpdateRequestTransitionItem(DataClassJsonMixin): """ For NotActivated extensions only. Welcome email settings """ send_welcome_emails_to_users: Optional[bool] = None """ Specifies if an activation email is automatically sent to new users (Not Activated extensions) or not """ send_welcome_email: Optional[bool] = None """ Supported for account confirmation. Specifies whether welcome email is sent """ class ExtensionUpdateRequestType(Enum): """ Extension type """ User = 'User' Fax_User = 'Fax User' VirtualUser = 'VirtualUser' DigitalUser = 'DigitalUser' Department = 'Department' Announcement = 'Announcement' Voicemail = 'Voicemail' SharedLinesGroup = 'SharedLinesGroup' PagingOnly = 'PagingOnly' IvrMenu = 'IvrMenu' ApplicationExtension = 'ApplicationExtension' ParkLocation = 'ParkLocation' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ExtensionUpdateRequest(DataClassJsonMixin): status: Optional[ExtensionUpdateRequestStatus] = None status_info: Optional[dict] = None reason: Optional[str] = None """ Type of suspension """ comment: Optional[str] = None """ Free Form user comment """ extension_number: Optional[str] = None """ Extension number available """ contact: Optional[ExtensionUpdateRequestContact] = None regional_settings: Optional[ExtensionUpdateRequestRegionalSettings] = None setup_wizard_state: Optional[ExtensionUpdateRequestSetupWizardState] = None partner_id: Optional[str] = None """ Additional extension identifier, created by partner application and applied on client side """ ivr_pin: Optional[str] = None """ IVR PIN """ password: Optional[str] = None """ Password for extension """ call_queue_info: Optional[ExtensionUpdateRequestCallQueueInfo] = None """ For Department extension type only. Call queue settings """ transition: Optional[List[ExtensionUpdateRequestTransitionItem]] = None custom_fields: Optional[list] = None hidden: Optional[bool] = None """ Hides extension from showing in company directory. Supported for extensions of User type only """ site: Optional[dict] = None """ Site data. If multi-site feature is turned on for the account, then internal identifier of a site must be specified. To assign the wireless point to the main site (company) set site ID to `main-site` """ type: Optional[ExtensionUpdateRequestType] = None """ Extension type """ references: Optional[list] = None """ List of non-RC internal identifiers assigned to an extension """ class GetExtensionGrantListResponseRecordsItemExtensionType(Enum): """ Extension type """ User = 'User' Fax_User = 'Fax User' VirtualUser = 'VirtualUser' DigitalUser = 'DigitalUser' Department = 'Department' Announcement = 'Announcement' Voicemail = 'Voicemail' SharedLinesGroup = 'SharedLinesGroup' PagingOnly = 'PagingOnly' IvrMenu = 'IvrMenu' ApplicationExtension = 'ApplicationExtension' ParkLocation = 'ParkLocation' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetExtensionGrantListResponseRecordsItemExtension(DataClassJsonMixin): """ Extension information """ id: Optional[str] = None """ Internal identifier of an extension """ uri: Optional[str] = None """ Canonical URI of an extension """ extension_number: Optional[str] = None """ Extension short number (usually 3 or 4 digits) """ name: Optional[str] = None """ Name of extension """ type: Optional[GetExtensionGrantListResponseRecordsItemExtensionType] = None """ Extension type """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetExtensionGrantListResponseRecordsItem(DataClassJsonMixin): uri: Optional[str] = None """ Canonical URI of a grant """ extension: Optional[GetExtensionGrantListResponseRecordsItemExtension] = None """ Extension information """ call_pickup: Optional[bool] = None """ Specifies if picking up of other extensions' calls is allowed for the extension. If 'Presence' feature is disabled for the given extension, the flag is not returned """ call_monitoring: Optional[bool] = None """ Specifies if monitoring of other extensions' calls is allowed for the extension. If 'CallMonitoring' feature is disabled for the given extension, the flag is not returned """ call_on_behalf_of: Optional[bool] = None """ Specifies whether the current extension is able to make or receive calls on behalf of the user referenced in extension object """ call_delegation: Optional[bool] = None """ Specifies whether the current extension can delegate a call to the user referenced in extension object """ group_paging: Optional[bool] = None """ Specifies whether the current extension is allowed to call Paging Only group referenced to in extension object """ call_queue_setup: Optional[bool] = None """ Specifies whether the current extension is assigned as a Full-Access manager in the call queue referenced in extension object """ call_queue_members_setup: Optional[bool] = None """ Specifies whether the current extension is assigned as a Members-Only manager in the call queue referenced in extension object """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetExtensionGrantListResponse(DataClassJsonMixin): """ Required Properties: - navigation - paging - records Generated by Python OpenAPI Parser """ records: List[GetExtensionGrantListResponseRecordsItem] """ List of extension grants with details """ navigation: dict """ Information on navigation """ paging: dict """ Information on paging """ uri: Optional[str] = None """ Link to the list of extension grants """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateConferencingInfoRequestPhoneNumbersItem(DataClassJsonMixin): phone_number: Optional[str] = None """ Dial-in phone number to connect to a conference """ default: Optional[bool] = None """ 'True' if the number is default for the conference. Default conference number is a domestic number that can be set by user (otherwise it is set by the system). Only one default number per country is allowed """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateConferencingInfoRequest(DataClassJsonMixin): phone_numbers: Optional[List[UpdateConferencingInfoRequestPhoneNumbersItem]] = None """ Multiple dial-in phone numbers to connect to audio conference service, relevant for user's brand. Each number is given with the country and location information, in order to let the user choose the less expensive way to connect to a conference. The first number in the list is the primary conference number, that is default and domestic """ allow_join_before_host: Optional[bool] = None """ Determines if host user allows conference participants to join before the host """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallQueueMembersRecordsItem(DataClassJsonMixin): uri: Optional[str] = None """ Link to a call queue member """ id: Optional[int] = None """ Internal identifier of a call queue member """ extension_number: Optional[str] = None """ Extension number of a call queue member """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallQueueMembers(DataClassJsonMixin): """ Required Properties: - navigation - paging - records - uri Generated by Python OpenAPI Parser """ uri: str """ Link to a call queue members resource """ records: List[CallQueueMembersRecordsItem] """ List of call queue members """ navigation: dict """ Information on navigation """ paging: dict """ Information on paging """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateMultipleWirelessPointsRequestRecordsItemEmergencyAddress(DataClassJsonMixin): """ Emergency address information. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned Generated by Python OpenAPI Parser """ country: Optional[str] = None """ Country name """ country_id: Optional[str] = None """ Internal identifier of a country """ country_iso_code: Optional[str] = None """ ISO code of a country """ country_name: Optional[str] = None """ Full name of a country """ customer_name: Optional[str] = None """ Customer name """ state: Optional[str] = None """ State/Province name. Mandatory for the USA, the UK and Canada """ state_id: Optional[str] = None """ Internal identifier of a state """ state_iso_code: Optional[str] = None """ ISO code of a state """ state_name: Optional[str] = None """ Full name of a state """ city: Optional[str] = None """ City name """ street: Optional[str] = None """ First line address """ street2: Optional[str] = None """ Second line address (apartment, suite, unit, building, floor, etc.) """ zip: Optional[str] = None """ Postal (Zip) code """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateMultipleWirelessPointsRequestRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a wireless point """ bssid: Optional[str] = None """ Unique 48-bit identifier of wireless access point complying with MAC address conventions. Mask: XX:XX:XX:XX:XX:XX, where X can be a symbol in the range of 0-9 or A-F """ name: Optional[str] = None """ Wireless access point name """ site: Optional[dict] = None """ Site data. If multi-site feature is turned on for the account, then internal identifier of a site must be specified. To assign the wireless point to the main site (company) set site ID to `main-site` """ emergency_address: Optional[UpdateMultipleWirelessPointsRequestRecordsItemEmergencyAddress] = None """ Emergency address information. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ emergency_location_id: Optional[str] = None """ Deprecated. Internal identifier of the emergency response location (address). Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ emergency_location: Optional[dict] = None """ Emergency response location information """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateMultipleWirelessPointsRequest(DataClassJsonMixin): records: Optional[List[UpdateMultipleWirelessPointsRequestRecordsItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AccountBusinessAddressResource(DataClassJsonMixin): uri: Optional[str] = None company: Optional[str] = None email: Optional[str] = None main_site_name: Optional[str] = None """ Custom site name """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ModifyAccountBusinessAddressRequestBusinessAddress(DataClassJsonMixin): """ Company business address """ country: Optional[str] = None """ Name of a country """ state: Optional[str] = None """ Name of a state/province """ city: Optional[str] = None """ Name of a city """ street: Optional[str] = None """ Street address """ zip: Optional[str] = None """ Zip code """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ModifyAccountBusinessAddressRequest(DataClassJsonMixin): company: Optional[str] = None """ Company business name """ email: Optional[str] = None """ Company business email address """ business_address: Optional[ModifyAccountBusinessAddressRequestBusinessAddress] = None """ Company business address """ main_site_name: Optional[str] = None """ Custom site name """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class EditPagingGroupRequest(DataClassJsonMixin): added_user_ids: Optional[List[str]] = None """ List of users that will be allowed to page a group specified """ removed_user_ids: Optional[List[str]] = None """ List of users that will be unallowed to page a group specified """ added_device_ids: Optional[List[str]] = None """ List of account devices that will be assigned to a paging group specified """ removed_device_ids: Optional[List[str]] = None """ List of account devices that will be unassigned from a paging group specified """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateNetworkRequestPublicIpRangesItem(DataClassJsonMixin): id: Optional[str] = None start_ip: Optional[str] = None end_ip: Optional[str] = None matched: Optional[bool] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateNetworkRequestPrivateIpRangesItem(DataClassJsonMixin): id: Optional[str] = None start_ip: Optional[str] = None end_ip: Optional[str] = None name: Optional[str] = None """ Network name """ emergency_address: Optional[dict] = None """ Emergency address information. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ emergency_location_id: Optional[str] = None """ Emergency response location (address) internal identifier. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateNetworkRequest(DataClassJsonMixin): name: Optional[str] = None site: Optional[dict] = None public_ip_ranges: Optional[List[CreateNetworkRequestPublicIpRangesItem]] = None private_ip_ranges: Optional[List[CreateNetworkRequestPrivateIpRangesItem]] = None emergency_location: Optional[dict] = None """ Emergency response location information """ class UpdateMultipleWirelessPointsResponseTaskStatus(Enum): """ Status of a task """ Accepted = 'Accepted' Failed = 'Failed' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateMultipleWirelessPointsResponseTask(DataClassJsonMixin): """ Information on the task for multiple wireless points update """ id: Optional[str] = None """ Internal identifier of a task for multiple switches creation """ status: Optional[UpdateMultipleWirelessPointsResponseTaskStatus] = None """ Status of a task """ creation_time: Optional[str] = None """ Task creation time """ last_modified_time: Optional[str] = None """ Time of the task latest modification """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateMultipleWirelessPointsResponse(DataClassJsonMixin): task: Optional[UpdateMultipleWirelessPointsResponseTask] = None """ Information on the task for multiple wireless points update """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ExtensionCreationResponseContact(DataClassJsonMixin): """ Contact detailed information """ first_name: Optional[str] = None """ For User extension type only. Extension user first name """ last_name: Optional[str] = None """ For User extension type only. Extension user last name """ company: Optional[str] = None """ Extension user company name """ job_title: Optional[str] = None email: Optional[str] = None """ Email of extension user """ business_phone: Optional[str] = None """ Extension user contact phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) (with '+' sign) format """ mobile_phone: Optional[str] = None """ Extension user mobile (**non** Toll Free) phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) (with '+' sign) format """ business_address: Optional[dict] = None """ Business address of extension user company """ email_as_login_name: Optional[bool] = 'False' """ If 'True' then contact email is enabled as login name for this user. Please note that email should be unique in this case. """ department: Optional[str] = None """ Extension user department, if any """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ExtensionCreationResponsePermissionsAdmin(DataClassJsonMixin): """ Admin permission """ enabled: Optional[bool] = None """ Specifies if a permission is enabled or not """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ExtensionCreationResponsePermissions(DataClassJsonMixin): """ Extension permissions, corresponding to the Service Web permissions 'Admin' and 'InternationalCalling' Generated by Python OpenAPI Parser """ admin: Optional[ExtensionCreationResponsePermissionsAdmin] = None """ Admin permission """ international_calling: Optional[dict] = None """ International Calling permission """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ExtensionCreationResponseProfileImageScalesItem(DataClassJsonMixin): uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ExtensionCreationResponseProfileImage(DataClassJsonMixin): """ Information on profile image Required Properties: - uri Generated by Python OpenAPI Parser """ uri: str """ Link to a profile image. If an image is not uploaded for an extension, only uri is returned """ etag: Optional[str] = None """ Identifier of an image """ last_modified: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ The datetime when an image was last updated in ISO 8601 format, for example 2016-03-10T18:07:52.534Z """ content_type: Optional[str] = None """ The type of an image """ scales: Optional[List[ExtensionCreationResponseProfileImageScalesItem]] = None """ List of URIs to profile images in different dimensions """ class ExtensionCreationResponseServiceFeaturesItemFeatureName(Enum): """ Feature name """ AccountFederation = 'AccountFederation' Archiver = 'Archiver' AutomaticCallRecordingMute = 'AutomaticCallRecordingMute' AutomaticInboundCallRecording = 'AutomaticInboundCallRecording' AutomaticOutboundCallRecording = 'AutomaticOutboundCallRecording' BlockedMessageForwarding = 'BlockedMessageForwarding' Calendar = 'Calendar' CallerIdControl = 'CallerIdControl' CallForwarding = 'CallForwarding' CallPark = 'CallPark' CallParkLocations = 'CallParkLocations' CallSupervision = 'CallSupervision' CallSwitch = 'CallSwitch' CallQualitySurvey = 'CallQualitySurvey' Conferencing = 'Conferencing' ConferencingNumber = 'ConferencingNumber' ConfigureDelegates = 'ConfigureDelegates' DeveloperPortal = 'DeveloperPortal' DND = 'DND' DynamicConference = 'DynamicConference' EmergencyAddressAutoUpdate = 'EmergencyAddressAutoUpdate' EmergencyCalling = 'EmergencyCalling' EncryptionAtRest = 'EncryptionAtRest' ExternalDirectoryIntegration = 'ExternalDirectoryIntegration' Fax = 'Fax' FaxReceiving = 'FaxReceiving' FreeSoftPhoneLines = 'FreeSoftPhoneLines' HDVoice = 'HDVoice' HipaaCompliance = 'HipaaCompliance' Intercom = 'Intercom' InternationalCalling = 'InternationalCalling' InternationalSMS = 'InternationalSMS' LinkedSoftphoneLines = 'LinkedSoftphoneLines' MMS = 'MMS' MobileVoipEmergencyCalling = 'MobileVoipEmergencyCalling' OnDemandCallRecording = 'OnDemandCallRecording' Pager = 'Pager' PagerReceiving = 'PagerReceiving' Paging = 'Paging' PasswordAuth = 'PasswordAuth' PromoMessage = 'PromoMessage' Reports = 'Reports' Presence = 'Presence' RCTeams = 'RCTeams' RingOut = 'RingOut' SalesForce = 'SalesForce' SharedLines = 'SharedLines' SingleExtensionUI = 'SingleExtensionUI' SiteCodes = 'SiteCodes' SMS = 'SMS' SMSReceiving = 'SMSReceiving' SoftPhoneUpdate = 'SoftPhoneUpdate' TelephonySessions = 'TelephonySessions' UserManagement = 'UserManagement' VideoConferencing = 'VideoConferencing' VoipCalling = 'VoipCalling' VoipCallingOnMobile = 'VoipCallingOnMobile' Voicemail = 'Voicemail' VoicemailToText = 'VoicemailToText' WebPhone = 'WebPhone' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ExtensionCreationResponseServiceFeaturesItem(DataClassJsonMixin): enabled: Optional[bool] = None """ Feature status; shows feature availability for an extension """ feature_name: Optional[ExtensionCreationResponseServiceFeaturesItemFeatureName] = None """ Feature name """ reason: Optional[str] = None """ Reason for limitation of a particular service feature. Returned only if the enabled parameter value is 'False', see Service Feature Limitations and Reasons. When retrieving service features for an extension, the reasons for the limitations, if any, are returned in response """ class ExtensionCreationResponseSetupWizardState(Enum): """ Specifies extension configuration wizard state (web service setup). The default value is 'NotStarted' Generated by Python OpenAPI Parser """ NotStarted = 'NotStarted' Incomplete = 'Incomplete' Completed = 'Completed' class ExtensionCreationResponseStatus(Enum): """ Extension current state. If 'Unassigned' is specified, then extensions without ‘extensionNumber’ are returned. If not specified, then all extensions are returned Generated by Python OpenAPI Parser """ Enabled = 'Enabled' Disabled = 'Disabled' Frozen = 'Frozen' NotActivated = 'NotActivated' Unassigned = 'Unassigned' class ExtensionCreationResponseType(Enum): """ Extension type """ User = 'User' VirtualUser = 'VirtualUser' DigitalUser = 'DigitalUser' Department = 'Department' Announcement = 'Announcement' Voicemail = 'Voicemail' SharedLinesGroup = 'SharedLinesGroup' PagingOnly = 'PagingOnly' ParkLocation = 'ParkLocation' Limited = 'Limited' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ExtensionCreationResponse(DataClassJsonMixin): id: Optional[int] = None """ Internal identifier of an extension """ uri: Optional[str] = None """ Canonical URI of an extension """ contact: Optional[ExtensionCreationResponseContact] = None """ Contact detailed information """ custom_fields: Optional[list] = None extension_number: Optional[str] = None """ Number of department extension """ name: Optional[str] = None """ Extension name. For user extension types the value is a combination of the specified first name and last name """ partner_id: Optional[str] = None """ For Partner Applications Internal identifier of an extension created by partner. The RingCentral supports the mapping of accounts and stores the corresponding account ID/extension ID for each partner ID of a client application. In request URIs partner IDs are accepted instead of regular RingCentral native IDs as path parameters using pid = XXX clause. Though in response URIs contain the corresponding account IDs and extension IDs. In all request and response bodies these values are reflected via partnerId attributes of account and extension """ permissions: Optional[ExtensionCreationResponsePermissions] = None """ Extension permissions, corresponding to the Service Web permissions 'Admin' and 'InternationalCalling' """ profile_image: Optional[ExtensionCreationResponseProfileImage] = None """ Information on profile image """ references: Optional[list] = None """ List of non-RC internal identifiers assigned to an extension """ regional_settings: Optional[dict] = None """ Extension region data (timezone, home country, language) """ service_features: Optional[List[ExtensionCreationResponseServiceFeaturesItem]] = None """ Extension service features returned in response only when the logged-in user requests his/her own extension info, see also Extension Service Features """ setup_wizard_state: Optional[ExtensionCreationResponseSetupWizardState] = None """ Specifies extension configuration wizard state (web service setup). The default value is 'NotStarted' """ site: Optional[dict] = None """ Site data. If multi-site feature is turned on for the account, then internal identifier of a site must be specified. To assign the wireless point to the main site (company) set site ID to `main-site` """ status: Optional[ExtensionCreationResponseStatus] = None """ Extension current state. If 'Unassigned' is specified, then extensions without ‘extensionNumber’ are returned. If not specified, then all extensions are returned """ status_info: Optional[dict] = None """ Status information (reason, comment). Returned for 'Disabled' status only """ type: Optional[ExtensionCreationResponseType] = None """ Extension type """ hidden: Optional[bool] = None """ Hides extension from showing in company directory. Supported for extensions of User type only """ class UserTemplatesRecordsItemType(Enum): UserSettings = 'UserSettings' CallHandling = 'CallHandling' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UserTemplatesRecordsItem(DataClassJsonMixin): uri: Optional[str] = None """ Link to a template """ id: Optional[str] = None """ Internal identifier of a template """ type: Optional[UserTemplatesRecordsItemType] = None name: Optional[str] = None """ Name of a template """ creation_time: Optional[str] = None """ Time of a template creation """ last_modified_time: Optional[str] = None """ Time of the last template modification """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UserTemplates(DataClassJsonMixin): """ Required Properties: - navigation - paging - records Generated by Python OpenAPI Parser """ records: List[UserTemplatesRecordsItem] """ List of user templates """ navigation: dict """ Information on navigation """ paging: dict """ Information on paging """ uri: Optional[str] = None """ Link to user templates resource """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallQueueUpdateDetailsServiceLevelSettings(DataClassJsonMixin): """ Call queue service level settings """ sla_goal: Optional[int] = None """ Target percentage of calls that must be answered by agents within the service level time threshold """ sla_threshold_seconds: Optional[int] = None """ The period of time in seconds that is considered to be an acceptable service level """ include_abandoned_calls: Optional[bool] = None """ Includes abandoned calls (when callers hang up prior to being served by an agent) into service-level calculation """ abandoned_threshold_seconds: Optional[int] = None """ Abandoned calls that are shorter than the defined period of time in seconds will not be included into the calculation of Service Level """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallQueueUpdateDetails(DataClassJsonMixin): service_level_settings: Optional[CallQueueUpdateDetailsServiceLevelSettings] = None """ Call queue service level settings """ editable_member_status: Optional[bool] = None """ Allows members to change their queue status """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class FeatureListRecordsItemParamsItem(DataClassJsonMixin): name: Optional[str] = None """ Parameter name """ value: Optional[str] = None """ Parameter value """ class FeatureListRecordsItemReasonCode(Enum): """ Reason code """ ServicePlanLimitation = 'ServicePlanLimitation' AccountLimitation = 'AccountLimitation' ExtensionTypeLimitation = 'ExtensionTypeLimitation' ExtensionLimitation = 'ExtensionLimitation' InsufficientPermissions = 'InsufficientPermissions' ConfigurationLimitation = 'ConfigurationLimitation' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class FeatureListRecordsItemReason(DataClassJsonMixin): """ Reason of the feature unavailability. Returned only if `available` is set to 'false' """ code: Optional[FeatureListRecordsItemReasonCode] = None """ Reason code """ message: Optional[str] = None """ Reason description """ permission: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class FeatureListRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a feature """ available: Optional[bool] = None """ Specifies if the feature is available for the current user according to services enabled for the account, type, entitlements and permissions of the extension. If the authorized user gets features of the other extension, only features that can be delegated are returned (such as configuration by administrators). """ params: Optional[List[FeatureListRecordsItemParamsItem]] = None reason: Optional[FeatureListRecordsItemReason] = None """ Reason of the feature unavailability. Returned only if `available` is set to 'false' """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class FeatureList(DataClassJsonMixin): records: Optional[List[FeatureListRecordsItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ExtensionCallerIdInfoByDeviceItemDevice(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a device """ uri: Optional[str] = None """ Link to a device resource """ name: Optional[str] = None """ Name of a device """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ExtensionCallerIdInfoByDeviceItemCallerIdPhoneInfo(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a phone number """ uri: Optional[str] = None """ Link to a phone number resource """ phone_number: Optional[str] = None """ Phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) (with '+' sign) format """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ExtensionCallerIdInfoByDeviceItemCallerId(DataClassJsonMixin): type: Optional[str] = None """ If 'PhoneNumber' value is specified, then a certain phone number is shown as a caller ID when using this telephony feature. If 'Blocked' value is specified, then a caller ID is hidden. The value 'CurrentLocation' can be specified for 'RingOut' feature only. The default is 'PhoneNumber' = ['PhoneNumber', 'Blocked', 'CurrentLocation'] """ phone_info: Optional[ExtensionCallerIdInfoByDeviceItemCallerIdPhoneInfo] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ExtensionCallerIdInfoByDeviceItem(DataClassJsonMixin): """ Caller ID settings by device """ device: Optional[ExtensionCallerIdInfoByDeviceItemDevice] = None caller_id: Optional[ExtensionCallerIdInfoByDeviceItemCallerId] = None class ExtensionCallerIdInfoByFeatureItemFeature(Enum): RingOut = 'RingOut' RingMe = 'RingMe' CallFlip = 'CallFlip' FaxNumber = 'FaxNumber' AdditionalSoftphone = 'AdditionalSoftphone' Alternate = 'Alternate' CommonPhone = 'CommonPhone' MobileApp = 'MobileApp' Delegated = 'Delegated' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ExtensionCallerIdInfoByFeatureItemCallerId(DataClassJsonMixin): type: Optional[str] = None """ If 'PhoneNumber' value is specified, then a certain phone number is shown as a caller ID when using this telephony feature. If 'Blocked' value is specified, then a caller ID is hidden. The value 'CurrentLocation' can be specified for 'RingOut' feature only. The default is 'PhoneNumber' = ['PhoneNumber', 'Blocked', 'CurrentLocation'] """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ExtensionCallerIdInfoByFeatureItem(DataClassJsonMixin): """ Caller ID settings by feature """ feature: Optional[ExtensionCallerIdInfoByFeatureItemFeature] = None caller_id: Optional[ExtensionCallerIdInfoByFeatureItemCallerId] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ExtensionCallerIdInfo(DataClassJsonMixin): uri: Optional[str] = None """ Canonical URL of a caller ID resource """ by_device: Optional[List[ExtensionCallerIdInfoByDeviceItem]] = None by_feature: Optional[List[ExtensionCallerIdInfoByFeatureItem]] = None extension_name_for_outbound_calls: Optional[bool] = None """ If 'True', then user first name and last name will be used as caller ID when making outbound calls from extension """ extension_number_for_internal_calls: Optional[bool] = None """ If 'True', then extension number will be used as caller ID when making internal calls """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class WirelessPointInfo(DataClassJsonMixin): uri: Optional[str] = None """ Link to the wireless point resource """ id: Optional[str] = None """ Internal identifier of a wireless point """ bssid: Optional[str] = None """ Unique 48-bit identifier of the wireless access point complying with MAC address conventions """ name: Optional[str] = None """ Wireless access point name """ site: Optional[dict] = None """ Site data (internal identifier and custom name of a site) """ emergency_address: Optional[dict] = None """ Emergency address assigned to the wireless point. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ emergency_location: Optional[dict] = None """ Emergency response location information """ emergency_location_id: Optional[str] = None """ Deprecated. Emergency response location (address) internal identifier. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class PagingOnlyGroupDevicesRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a paging device """ uri: Optional[str] = None """ Link to a paging device resource """ name: Optional[str] = None """ Name of a paging device """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class PagingOnlyGroupDevices(DataClassJsonMixin): uri: Optional[str] = None """ Link to the list of devices assigned to the paging only group """ records: Optional[List[PagingOnlyGroupDevicesRecordsItem]] = None """ List of paging devices assigned to this group """ navigation: Optional[dict] = None """ Information on navigation """ paging: Optional[dict] = None """ Information on paging """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallMonitoringGroupsRecordsItem(DataClassJsonMixin): uri: Optional[str] = None """ Link to a call monitoring group resource """ id: Optional[str] = None """ Internal identifier of a group """ name: Optional[str] = None """ Name of a group """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallMonitoringGroups(DataClassJsonMixin): """ Required Properties: - navigation - paging - records - uri Generated by Python OpenAPI Parser """ uri: str """ Link to a call monitoring groups resource """ records: List[CallMonitoringGroupsRecordsItem] """ List of call monitoring group members """ navigation: dict """ Information on navigation """ paging: dict """ Information on paging """ class CallMonitoringGroupMemberListRecordsItemPermissionsItem(Enum): """ Call monitoring permission; mltiple values are allowed: * `Monitoring` - User can monitor a group * `Monitored` - User can be monitored Generated by Python OpenAPI Parser """ Monitoring = 'Monitoring' Monitored = 'Monitored' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallMonitoringGroupMemberListRecordsItem(DataClassJsonMixin): uri: Optional[str] = None """ Link to a call monitoring group member """ id: Optional[str] = None """ Internal identifier of a call monitoring group member """ extension_number: Optional[str] = None """ Extension number of a call monitoring group member """ permissions: Optional[List[CallMonitoringGroupMemberListRecordsItemPermissionsItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallMonitoringGroupMemberList(DataClassJsonMixin): """ Required Properties: - navigation - paging - records - uri Generated by Python OpenAPI Parser """ uri: str """ Link to a call monitoring group members resource """ records: List[CallMonitoringGroupMemberListRecordsItem] """ List of a call monitoring group members """ navigation: dict """ Information on navigation """ paging: dict """ Information on paging """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateMultipleSwitchesRequestRecordsItem(DataClassJsonMixin): """ Required Properties: - chassis_id Generated by Python OpenAPI Parser """ chassis_id: str """ Unique identifier of a network switch. The supported formats are: XX:XX:XX:XX:XX:XX (symbols 0-9 and A-F) for MAC address and X.X.X.X for IP address (symbols 0-255) """ name: Optional[str] = None """ Name of a network switch """ site: Optional[dict] = None """ Site data """ emergency_address: Optional[dict] = None """ Emergency address assigned to the switch. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ emergency_location_id: Optional[str] = None """ Deprecated. Emergency response location (address) internal identifier. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ emergency_location: Optional[dict] = None """ Emergency response location information """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateMultipleSwitchesRequest(DataClassJsonMixin): records: Optional[List[CreateMultipleSwitchesRequestRecordsItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetServiceInfoResponseBrand(DataClassJsonMixin): """ Information on account brand """ id: Optional[str] = None """ Internal identifier of a brand """ name: Optional[str] = None """ Brand name, for example RingCentral UK , ClearFax """ home_country: Optional[dict] = None """ Home country information """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetServiceInfoResponseContractedCountry(DataClassJsonMixin): """ Information on the contracted country of account """ id: Optional[str] = None """ Identifier of a contracted country """ uri: Optional[str] = None """ Canonical URI of a contracted country """ class GetServiceInfoResponseServicePlanFreemiumProductType(Enum): Freyja = 'Freyja' Phoenix = 'Phoenix' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetServiceInfoResponseServicePlan(DataClassJsonMixin): """ Information on account service plan """ id: Optional[str] = None """ Internal identifier of a service plan """ name: Optional[str] = None """ Name of a service plan """ edition: Optional[str] = None """ Edition of a service plan """ freemium_product_type: Optional[GetServiceInfoResponseServicePlanFreemiumProductType] = None class GetServiceInfoResponseTargetServicePlanFreemiumProductType(Enum): Freyja = 'Freyja' Phoenix = 'Phoenix' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetServiceInfoResponseTargetServicePlan(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a target service plan """ name: Optional[str] = None """ Name of a target service plan """ edition: Optional[str] = None """ Edition of a service plan """ freemium_product_type: Optional[GetServiceInfoResponseTargetServicePlanFreemiumProductType] = None class GetServiceInfoResponseBillingPlanDurationUnit(Enum): """ Duration period """ Month = 'Month' Day = 'Day' class GetServiceInfoResponseBillingPlanType(Enum): """ Billing plan type """ Initial = 'Initial' Regular = 'Regular' Suspended = 'Suspended' Trial = 'Trial' TrialNoCC = 'TrialNoCC' Free = 'Free' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetServiceInfoResponseBillingPlan(DataClassJsonMixin): """ Information on account billing plan """ id: Optional[str] = None """ Internal identifier of a billing plan """ name: Optional[str] = None """ Billing plan name """ duration_unit: Optional[GetServiceInfoResponseBillingPlanDurationUnit] = None """ Duration period """ duration: Optional[int] = None """ Number of duration units """ type: Optional[GetServiceInfoResponseBillingPlanType] = None """ Billing plan type """ included_phone_lines: Optional[int] = None """ Included digital lines count """ class GetServiceInfoResponseServiceFeaturesItemFeatureName(Enum): """ Feature name """ AccountFederation = 'AccountFederation' Archiver = 'Archiver' AutomaticCallRecordingMute = 'AutomaticCallRecordingMute' AutomaticInboundCallRecording = 'AutomaticInboundCallRecording' AutomaticOutboundCallRecording = 'AutomaticOutboundCallRecording' BlockedMessageForwarding = 'BlockedMessageForwarding' Calendar = 'Calendar' CallerIdControl = 'CallerIdControl' CallForwarding = 'CallForwarding' CallPark = 'CallPark' CallParkLocations = 'CallParkLocations' CallSupervision = 'CallSupervision' CallSwitch = 'CallSwitch' CallQualitySurvey = 'CallQualitySurvey' Conferencing = 'Conferencing' ConferencingNumber = 'ConferencingNumber' ConfigureDelegates = 'ConfigureDelegates' DeveloperPortal = 'DeveloperPortal' DND = 'DND' DynamicConference = 'DynamicConference' EmergencyAddressAutoUpdate = 'EmergencyAddressAutoUpdate' EmergencyCalling = 'EmergencyCalling' EncryptionAtRest = 'EncryptionAtRest' ExternalDirectoryIntegration = 'ExternalDirectoryIntegration' Fax = 'Fax' FaxReceiving = 'FaxReceiving' FreeSoftPhoneLines = 'FreeSoftPhoneLines' HDVoice = 'HDVoice' HipaaCompliance = 'HipaaCompliance' Intercom = 'Intercom' InternationalCalling = 'InternationalCalling' InternationalSMS = 'InternationalSMS' LinkedSoftphoneLines = 'LinkedSoftphoneLines' MMS = 'MMS' MobileVoipEmergencyCalling = 'MobileVoipEmergencyCalling' OnDemandCallRecording = 'OnDemandCallRecording' Pager = 'Pager' PagerReceiving = 'PagerReceiving' Paging = 'Paging' PasswordAuth = 'PasswordAuth' PromoMessage = 'PromoMessage' Reports = 'Reports' Presence = 'Presence' RCTeams = 'RCTeams' RingOut = 'RingOut' SalesForce = 'SalesForce' SharedLines = 'SharedLines' SingleExtensionUI = 'SingleExtensionUI' SiteCodes = 'SiteCodes' SMS = 'SMS' SMSReceiving = 'SMSReceiving' SoftPhoneUpdate = 'SoftPhoneUpdate' TelephonySessions = 'TelephonySessions' UserManagement = 'UserManagement' VideoConferencing = 'VideoConferencing' VoipCalling = 'VoipCalling' VoipCallingOnMobile = 'VoipCallingOnMobile' Voicemail = 'Voicemail' VoicemailToText = 'VoicemailToText' WebPhone = 'WebPhone' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetServiceInfoResponseServiceFeaturesItem(DataClassJsonMixin): feature_name: Optional[GetServiceInfoResponseServiceFeaturesItemFeatureName] = None """ Feature name """ enabled: Optional[bool] = None """ Feature status, shows feature availability for the extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetServiceInfoResponseLimits(DataClassJsonMixin): """ Limits which are effective for the account """ free_soft_phone_lines_per_extension: Optional[int] = None """ Max number of free softphone phone lines per user extension """ meeting_size: Optional[int] = None """ Max number of participants in RingCentral meeting hosted by this account's user """ cloud_recording_storage: Optional[int] = None """ Meetings recording cloud storage limitaion in Gb """ max_monitored_extensions_per_user: Optional[int] = None """ Max number of extensions which can be included in the list of users monitored for Presence """ max_extension_number_length: Optional[int] = 5 """ Max length of extension numbers of an account; the supported value is up to 8 symbols, depends on account type """ site_code_length: Optional[int] = None """ Length of a site code """ short_extension_number_length: Optional[int] = None """ Length of a short extension number """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetServiceInfoResponsePackage(DataClassJsonMixin): version: Optional[str] = None id: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetServiceInfoResponse(DataClassJsonMixin): uri: Optional[str] = None """ Canonical URI of the account Service Info resource """ service_plan_name: Optional[str] = None """ Account Service Plan name """ brand: Optional[GetServiceInfoResponseBrand] = None """ Information on account brand """ contracted_country: Optional[GetServiceInfoResponseContractedCountry] = None """ Information on the contracted country of account """ service_plan: Optional[GetServiceInfoResponseServicePlan] = None """ Information on account service plan """ target_service_plan: Optional[GetServiceInfoResponseTargetServicePlan] = None billing_plan: Optional[GetServiceInfoResponseBillingPlan] = None """ Information on account billing plan """ service_features: Optional[List[GetServiceInfoResponseServiceFeaturesItem]] = None """ Service features information, see Service Feature List """ limits: Optional[GetServiceInfoResponseLimits] = None """ Limits which are effective for the account """ package: Optional[GetServiceInfoResponsePackage] = None class UserVideoConfigurationProvider(Enum): """ Video provider of the user """ RCMeetings = 'RCMeetings' RCVideo = 'RCVideo' None_ = 'None' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UserVideoConfiguration(DataClassJsonMixin): provider: Optional[UserVideoConfigurationProvider] = None """ Video provider of the user """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateMultipleWirelessPointsRequestRecordsItem(DataClassJsonMixin): """ Required Properties: - bssid - name - emergency_address Generated by Python OpenAPI Parser """ bssid: str """ Unique 48-bit identifier of wireless access point complying with MAC address conventions. The Mask is XX:XX:XX:XX:XX:XX, where X can be a symbol in the range of 0-9 or A-F """ name: str """ Wireless access point name """ emergency_address: dict """ Emergency address information. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ site: Optional[dict] = None """ Site data. If multi-site feature is turned on for the account, then internal identifier of a site must be specified. To assign the wireless point to the main site (company) set site ID to `main-site` """ emergency_location_id: Optional[str] = None """ Deprecated. Internal identifier of the emergency response location (address). Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ emergency_location: Optional[dict] = None """ Emergency response location information """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateMultipleWirelessPointsRequest(DataClassJsonMixin): records: Optional[List[CreateMultipleWirelessPointsRequestRecordsItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetLocationListResponseRecordsItemState(DataClassJsonMixin): """ Information on the state this location belongs to """ id: Optional[str] = None """ Internal identifier of a state """ uri: Optional[str] = None """ Link to a state resource """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetLocationListResponseRecordsItem(DataClassJsonMixin): uri: Optional[str] = None """ Canonical URI of a location """ area_code: Optional[str] = None """ Area code of the location """ city: Optional[str] = None """ Official name of the city, belonging to the certain state """ npa: Optional[str] = None """ Area code of the location (3-digit usually), according to the NANP number format, that can be summarized as NPA-NXX-xxxx and covers Canada, the United States, parts of the Caribbean Sea, and some Atlantic and Pacific islands. See for details North American Numbering Plan """ nxx: Optional[str] = None """ Central office code of the location, according to the NANP number format, that can be summarized as NPA-NXX-xxxx and covers Canada, the United States, parts of the Caribbean Sea, and some Atlantic and Pacific islands. See for details North American Numbering Plan """ state: Optional[GetLocationListResponseRecordsItemState] = None """ Information on the state this location belongs to """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetLocationListResponse(DataClassJsonMixin): """ Required Properties: - navigation - paging Generated by Python OpenAPI Parser """ navigation: dict """ Information on navigation """ paging: dict """ Information on paging """ uri: Optional[str] = None """ Link to the location list resource """ records: Optional[List[GetLocationListResponseRecordsItem]] = None """ List of locations """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetStateListResponseRecordsItemCountry(DataClassJsonMixin): """ Information on a country the state belongs to """ id: Optional[str] = None """ Internal identifier of a state """ uri: Optional[str] = None """ Canonical URI of a state """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetStateListResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a state """ uri: Optional[str] = None """ Canonical URI of a state """ country: Optional[GetStateListResponseRecordsItemCountry] = None """ Information on a country the state belongs to """ iso_code: Optional[str] = None """ Short code for a state (2-letter usually) """ name: Optional[str] = None """ Official name of a state """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetStateListResponse(DataClassJsonMixin): uri: Optional[str] = None """ Link to the states list resource """ records: Optional[List[GetStateListResponseRecordsItem]] = None """ List of states """ navigation: Optional[dict] = None """ Information on navigation """ paging: Optional[dict] = None """ Information on paging """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallQueueBulkAssignResource(DataClassJsonMixin): added_extension_ids: Optional[List[str]] = None removed_extension_ids: Optional[List[str]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class NetworksListRecordsItemPrivateIpRangesItem(DataClassJsonMixin): id: Optional[str] = None start_ip: Optional[str] = None end_ip: Optional[str] = None name: Optional[str] = None """ Network name """ emergency_address: Optional[dict] = None """ Emergency address information. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ emergency_location_id: Optional[str] = None """ Emergency response location (address) internal identifier. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ matched: Optional[bool] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class NetworksListRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a network """ uri: Optional[str] = None """ Link to a network resource """ name: Optional[str] = None public_ip_ranges: Optional[list] = None private_ip_ranges: Optional[List[NetworksListRecordsItemPrivateIpRangesItem]] = None emergency_location: Optional[dict] = None """ Emergency response location information """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class NetworksList(DataClassJsonMixin): uri: Optional[str] = None """ Link to a networks resource """ records: Optional[List[NetworksListRecordsItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ValidateMultipleWirelessPointsRequestRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a wireless point """ bssid: Optional[str] = None """ Unique 48-bit identifier of the wireless access point complying with MAC address conventions """ name: Optional[str] = None """ Wireless access point name """ site: Optional[dict] = None """ Site data (internal identifier and custom name of a site) """ emergency_address: Optional[dict] = None """ Emergency address assigned to the wireless point. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ emergency_location_id: Optional[str] = None """ Emergency response location (address) internal identifier. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ValidateMultipleWirelessPointsRequest(DataClassJsonMixin): records: Optional[List[ValidateMultipleWirelessPointsRequestRecordsItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetExtensionListResponseRecordsItemAccount(DataClassJsonMixin): """ Account information """ id: Optional[str] = None """ Internal identifier of an account """ uri: Optional[str] = None """ Canonical URI of an account """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetExtensionListResponseRecordsItemDepartmentsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a department extension """ uri: Optional[str] = None """ Canonical URI of a department extension """ extension_number: Optional[str] = None """ Number of a department extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetExtensionListResponseRecordsItemRolesItem(DataClassJsonMixin): uri: Optional[str] = None id: Optional[str] = None """ Internal identifier of a role """ class GetExtensionListResponseRecordsItemSetupWizardState(Enum): """ Specifies extension configuration wizard state (web service setup). """ NotStarted = 'NotStarted' Incomplete = 'Incomplete' Completed = 'Completed' class GetExtensionListResponseRecordsItemStatus(Enum): """ Extension current state. If 'Unassigned' is specified, then extensions without ‘extensionNumber’ are returned. If not specified, then all extensions are returned Generated by Python OpenAPI Parser """ Enabled = 'Enabled' Disabled = 'Disabled' Frozen = 'Frozen' NotActivated = 'NotActivated' Unassigned = 'Unassigned' class GetExtensionListResponseRecordsItemType(Enum): """ Extension type """ User = 'User' FaxUser = 'FaxUser' VirtualUser = 'VirtualUser' DigitalUser = 'DigitalUser' Department = 'Department' Announcement = 'Announcement' Voicemail = 'Voicemail' SharedLinesGroup = 'SharedLinesGroup' PagingOnly = 'PagingOnly' IvrMenu = 'IvrMenu' ApplicationExtension = 'ApplicationExtension' ParkLocation = 'ParkLocation' Bot = 'Bot' Room = 'Room' Limited = 'Limited' Site = 'Site' ProxyAdmin = 'ProxyAdmin' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetExtensionListResponseRecordsItemCallQueueInfo(DataClassJsonMixin): """ For Department extension type only. Call queue settings """ sla_goal: Optional[int] = None """ Target percentage of calls that must be answered by agents within the service level time threshold """ sla_threshold_seconds: Optional[int] = None """ Period of time in seconds that is considered to be an acceptable service level """ include_abandoned_calls: Optional[bool] = None """ If 'True' abandoned calls (hanged up prior to being served) are included into service level calculation """ abandoned_threshold_seconds: Optional[int] = None """ Period of time in seconds specifying abandoned calls duration - calls that are shorter will not be included into the calculation of service level.; zero value means that abandoned calls of any duration will be included into calculation """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetExtensionListResponseRecordsItem(DataClassJsonMixin): id: Optional[int] = None """ Internal identifier of an extension """ uri: Optional[str] = None """ Canonical URI of an extension """ account: Optional[GetExtensionListResponseRecordsItemAccount] = None """ Account information """ contact: Optional[dict] = None """ Contact detailed information """ custom_fields: Optional[list] = None departments: Optional[List[GetExtensionListResponseRecordsItemDepartmentsItem]] = None """ Information on department extension(s), to which the requested extension belongs. Returned only for user extensions, members of department, requested by single extensionId """ extension_number: Optional[str] = None """ Number of department extension """ extension_numbers: Optional[List[str]] = None name: Optional[str] = None """ Extension name. For user extension types the value is a combination of the specified first name and last name """ partner_id: Optional[str] = None """ For Partner Applications Internal identifier of an extension created by partner. The RingCentral supports the mapping of accounts and stores the corresponding account ID/extension ID for each partner ID of a client application. In request URIs partner IDs are accepted instead of regular RingCentral native IDs as path parameters using pid = XXX clause. Though in response URIs contain the corresponding account IDs and extension IDs. In all request and response bodies these values are reflected via partnerId attributes of account and extension """ profile_image: Optional[dict] = None """ Information on profile image """ references: Optional[list] = None """ List of non-RC internal identifiers assigned to an extension """ roles: Optional[List[GetExtensionListResponseRecordsItemRolesItem]] = None regional_settings: Optional[dict] = None """ Extension region data (timezone, home country, language) """ service_features: Optional[list] = None """ Extension service features returned in response only when the logged-in user requests his/her own extension info, see also Extension Service Features """ setup_wizard_state: Optional[GetExtensionListResponseRecordsItemSetupWizardState] = 'NotStarted' """ Specifies extension configuration wizard state (web service setup). """ status: Optional[GetExtensionListResponseRecordsItemStatus] = None """ Extension current state. If 'Unassigned' is specified, then extensions without ‘extensionNumber’ are returned. If not specified, then all extensions are returned """ status_info: Optional[dict] = None """ Status information (reason, comment). Returned for 'Disabled' status only """ type: Optional[GetExtensionListResponseRecordsItemType] = None """ Extension type """ call_queue_info: Optional[GetExtensionListResponseRecordsItemCallQueueInfo] = None """ For Department extension type only. Call queue settings """ hidden: Optional[bool] = None """ Hides extension from showing in company directory. Supported for extensions of User type only """ site: Optional[dict] = None """ Site data. If multi-site feature is turned on for the account, then internal identifier of a site must be specified. To assign the wireless point to the main site (company) set site ID to `main-site` """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetExtensionListResponse(DataClassJsonMixin): """ Required Properties: - records Generated by Python OpenAPI Parser """ records: List[GetExtensionListResponseRecordsItem] """ List of extensions with extension information """ uri: Optional[str] = None """ Link to the extension list resource """ navigation: Optional[dict] = None """ Information on navigation """ paging: Optional[dict] = None """ Information on paging """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallQueues(DataClassJsonMixin): """ Required Properties: - navigation - paging - records - uri Generated by Python OpenAPI Parser """ uri: str """ Link to a call queues resource """ records: list """ List of call queues """ navigation: dict """ Information on navigation """ paging: dict """ Information on paging """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class BulkAssignAutomaticLocationUpdatesUsers(DataClassJsonMixin): enabled_user_ids: Optional[List[str]] = None disabled_user_ids: Optional[List[str]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateSwitchInfo(DataClassJsonMixin): id: Optional[str] = None """ internal identifier of a switch """ chassis_id: Optional[str] = None """ Unique identifier of a network switch. The supported formats are: XX:XX:XX:XX:XX:XX (symbols 0-9 and A-F) for MAC address and X.X.X.X for IP address (symbols 0-255) """ name: Optional[str] = None """ Name of a network switch """ site: Optional[dict] = None """ Site data """ emergency_address: Optional[dict] = None """ Emergency address assigned to the switch. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ emergency_location_id: Optional[str] = None """ Deprecated. Emergency response location (address) internal identifier. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ emergency_location: Optional[dict] = None """ Emergency response location information """ class AutomaticLocationUpdatesTaskInfoStatus(Enum): """ Status of a task """ Accepted = 'Accepted' InProgress = 'InProgress' Completed = 'Completed' Failed = 'Failed' class AutomaticLocationUpdatesTaskInfoType(Enum): """ Type of a task """ WirelessPointsBulkCreate = 'WirelessPointsBulkCreate' WirelessPointsBulkUpdate = 'WirelessPointsBulkUpdate' SwitchesBulkCreate = 'SwitchesBulkCreate' SwitchesBulkUpdate = 'SwitchesBulkUpdate' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AutomaticLocationUpdatesTaskInfoResultRecordsItemErrorsItem(DataClassJsonMixin): error_code: Optional[str] = None message: Optional[str] = None parameter_name: Optional[str] = None description: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AutomaticLocationUpdatesTaskInfoResultRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of the created/updated element - wireless point or network switch """ bssid: Optional[str] = None """ Unique 48-bit identifier of the wireless access point complying with MAC address conventions. Returned only for 'Wireless Points Bulk Create' tasks """ chassis_id: Optional[str] = None """ Unique identifier of a network switch. Returned only for 'Switches Bulk Create' tasks """ status: Optional[str] = None """ Operation status """ errors: Optional[List[AutomaticLocationUpdatesTaskInfoResultRecordsItemErrorsItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AutomaticLocationUpdatesTaskInfoResult(DataClassJsonMixin): """ Task detailed result. Returned for failed and completed tasks """ records: Optional[List[AutomaticLocationUpdatesTaskInfoResultRecordsItem]] = None """ Detailed task results by elements from initial request """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AutomaticLocationUpdatesTaskInfo(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a task """ status: Optional[AutomaticLocationUpdatesTaskInfoStatus] = None """ Status of a task """ creation_time: Optional[str] = None """ Task creation time """ last_modified_time: Optional[str] = None """ Time of the task latest modification """ type: Optional[AutomaticLocationUpdatesTaskInfoType] = None """ Type of a task """ result: Optional[AutomaticLocationUpdatesTaskInfoResult] = None """ Task detailed result. Returned for failed and completed tasks """ class EmergencyLocationListRecordsItemAddressStatus(Enum): """ Emergency address status """ Valid = 'Valid' Invalid = 'Invalid' class EmergencyLocationListRecordsItemUsageStatus(Enum): """ Status of emergency response location usage. """ Active = 'Active' Inactive = 'Inactive' class EmergencyLocationListRecordsItemSyncStatus(Enum): """ Resulting status of emergency address synchronization. Returned if `syncEmergencyAddress` parameter is set to 'True' Generated by Python OpenAPI Parser """ Verified = 'Verified' Updated = 'Updated' Deleted = 'Deleted' ActivationProcess = 'ActivationProcess' Unsupported = 'Unsupported' Failed = 'Failed' class EmergencyLocationListRecordsItemVisibility(Enum): """ Visibility of an emergency response location. If `Private` is set, then location is visible only for restricted number of users, specified in `owners` array Generated by Python OpenAPI Parser """ Private = 'Private' Public = 'Public' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class EmergencyLocationListRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of the emergency response location """ address: Optional[dict] = None name: Optional[str] = None """ Emergency response location name """ site: Optional[dict] = None address_status: Optional[EmergencyLocationListRecordsItemAddressStatus] = None """ Emergency address status """ usage_status: Optional[EmergencyLocationListRecordsItemUsageStatus] = None """ Status of emergency response location usage. """ sync_status: Optional[EmergencyLocationListRecordsItemSyncStatus] = None """ Resulting status of emergency address synchronization. Returned if `syncEmergencyAddress` parameter is set to 'True' """ visibility: Optional[EmergencyLocationListRecordsItemVisibility] = 'Public' """ Visibility of an emergency response location. If `Private` is set, then location is visible only for restricted number of users, specified in `owners` array """ owners: Optional[list] = None """ List of private location owners """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class EmergencyLocationList(DataClassJsonMixin): records: Optional[List[EmergencyLocationListRecordsItem]] = None navigation: Optional[dict] = None """ Information on navigation """ paging: Optional[dict] = None """ Information on paging """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class NotificationSettingsUpdateRequestVoicemails(DataClassJsonMixin): notify_by_email: Optional[bool] = None """ Email notification flag """ notify_by_sms: Optional[bool] = None """ SMS notification flag """ advanced_email_addresses: Optional[List[str]] = None """ List of recipient email addresses for voicemail notifications. Returned if specified, in both modes (advanced/basic). Applied in advanced mode only """ advanced_sms_email_addresses: Optional[List[str]] = None """ List of recipient phone numbers for voicemail notifications. Returned if specified, in both modes (advanced/basic). Applied in advanced mode only """ include_attachment: Optional[bool] = None """ Indicates whether voicemail should be attached to email """ include_transcription: Optional[bool] = None """ Specifies whether to add voicemail transcription or not """ mark_as_read: Optional[bool] = None """ Indicates whether a voicemail should be automatically marked as read """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class NotificationSettingsUpdateRequestInboundFaxes(DataClassJsonMixin): notify_by_email: Optional[bool] = None """ Email notification flag """ notify_by_sms: Optional[bool] = None """ SMS notification flag """ advanced_email_addresses: Optional[List[str]] = None """ List of recipient email addresses for inbound fax notifications. Returned if specified, in both modes (advanced/basic). Applied in advanced mode only """ advanced_sms_email_addresses: Optional[List[str]] = None """ List of recipient phone numbers for inbound fax notifications. Returned if specified, in both modes (advanced/basic). Applied in advanced mode only """ include_attachment: Optional[bool] = None """ Indicates whether fax should be attached to email """ mark_as_read: Optional[bool] = None """ Indicates whether email should be automatically marked as read """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class NotificationSettingsUpdateRequestOutboundFaxes(DataClassJsonMixin): notify_by_email: Optional[bool] = None """ Email notification flag """ notify_by_sms: Optional[bool] = None """ SMS notification flag """ advanced_email_addresses: Optional[List[str]] = None """ List of recipient email addresses for outbound fax notifications. Returned if specified, in both modes (advanced/basic). Applied in advanced mode only """ advanced_sms_email_addresses: Optional[List[str]] = None """ List of recipient phone numbers for outbound fax notifications. Returned if specified, in both modes (advanced/basic). Applied in advanced mode only """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class NotificationSettingsUpdateRequestInboundTexts(DataClassJsonMixin): notify_by_email: Optional[bool] = None """ Email notification flag """ notify_by_sms: Optional[bool] = None """ SMS notification flag """ advanced_email_addresses: Optional[List[str]] = None """ List of recipient email addresses for inbound text message notifications. Returned if specified, in both modes (advanced/basic). Applied in advanced mode only """ advanced_sms_email_addresses: Optional[List[str]] = None """ List of recipient phone numbers for inbound text message notifications. Returned if specified, in both modes (advanced/basic). Applied in advanced mode only """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class NotificationSettingsUpdateRequestMissedCalls(DataClassJsonMixin): notify_by_email: Optional[bool] = None """ Email notification flag """ notify_by_sms: Optional[bool] = None """ SMS notification flag """ advanced_email_addresses: Optional[List[str]] = None """ List of recipient email addresses for missed call notifications. Returned if specified, in both modes (advanced/basic). Applied in advanced mode only """ advanced_sms_email_addresses: Optional[List[str]] = None """ List of recipient phone numbers for missed call notifications. Returned if specified, in both modes (advanced/basic). Applied in advanced mode only """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class NotificationSettingsUpdateRequest(DataClassJsonMixin): email_addresses: Optional[List[str]] = None """ List of notification recipient email addresses """ sms_email_addresses: Optional[List[str]] = None """ List of notification recipient email addresses """ advanced_mode: Optional[bool] = None """ Specifies notifications settings mode. If 'True' then advanced mode is on, it allows using different emails and/or phone numbers for each notification type. If 'False' then basic mode is on. Advanced mode settings are returned in both modes, if specified once, but if basic mode is switched on, they are not applied """ voicemails: Optional[NotificationSettingsUpdateRequestVoicemails] = None inbound_faxes: Optional[NotificationSettingsUpdateRequestInboundFaxes] = None outbound_faxes: Optional[NotificationSettingsUpdateRequestOutboundFaxes] = None inbound_texts: Optional[NotificationSettingsUpdateRequestInboundTexts] = None missed_calls: Optional[NotificationSettingsUpdateRequestMissedCalls] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateCallMonitoringGroupRequest(DataClassJsonMixin): """ Required Properties: - name Generated by Python OpenAPI Parser """ name: str """ Name of a group """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SwitchesList(DataClassJsonMixin): uri: Optional[str] = None """ Link to the switches list resource """ records: Optional[list] = None """ Switches map """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateMultipleSwitchesResponse(DataClassJsonMixin): """ Information on the task for multiple switches creation """ task: Optional[dict] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateMultipleWirelessPointsResponse(DataClassJsonMixin): task: Optional[dict] = None """ Information on the task for multiple wireless points creation """ class NotificationSettingsEmailRecipientsItemStatus(Enum): """ Current state of an extension """ Enabled = 'Enabled' Disable = 'Disable' NotActivated = 'NotActivated' Unassigned = 'Unassigned' class NotificationSettingsEmailRecipientsItemPermission(Enum): """ Call queue manager permission """ FullAccess = 'FullAccess' MembersOnly = 'MembersOnly' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class NotificationSettingsEmailRecipientsItem(DataClassJsonMixin): extension_id: Optional[str] = None """ Internal identifier of an extension """ full_name: Optional[str] = None """ User full name """ extension_number: Optional[str] = None """ User extension number """ status: Optional[NotificationSettingsEmailRecipientsItemStatus] = None """ Current state of an extension """ email_addresses: Optional[List[str]] = None """ List of user email addresses from extension notification settings. By default main email address from contact information is returned """ permission: Optional[NotificationSettingsEmailRecipientsItemPermission] = None """ Call queue manager permission """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class NotificationSettings(DataClassJsonMixin): uri: Optional[str] = None """ Canonical URI of notifications settings resource """ email_recipients: Optional[List[NotificationSettingsEmailRecipientsItem]] = None """ List of extensions specified as email notification recipients. Returned only for call queues where queue managers are assigned as user extensions. """ email_addresses: Optional[List[str]] = None """ List of notification recipient email addresses """ sms_email_addresses: Optional[List[str]] = None """ List of notification recipient email addresses """ advanced_mode: Optional[bool] = None """ Specifies notifications settings mode. If 'True' then advanced mode is on, it allows using different emails and/or phone numbers for each notification type. If 'False' then basic mode is on. Advanced mode settings are returned in both modes, if specified once, but if basic mode is switched on, they are not applied """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateMultipleSwitchesResponse(DataClassJsonMixin): task: Optional[dict] = None """ Information on the task for multiple switches update """ class ValidateMultipleWirelessPointsResponseRecordsItemStatus(Enum): """ Validation result status """ Valid = 'Valid' Invalid = 'Invalid' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ValidateMultipleWirelessPointsResponseRecordsItemErrorsItem(DataClassJsonMixin): error_code: Optional[str] = None """ Error code """ message: Optional[str] = None """ Error message """ parameter_name: Optional[str] = None """ Name of invalid parameter """ feature_name: Optional[str] = None parameter_value: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ValidateMultipleWirelessPointsResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a wireless point """ bssid: Optional[str] = None """ Unique 48-bit identifier of the wireless access point complying with MAC address conventions """ status: Optional[ValidateMultipleWirelessPointsResponseRecordsItemStatus] = None """ Validation result status """ errors: Optional[List[ValidateMultipleWirelessPointsResponseRecordsItemErrorsItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ValidateMultipleWirelessPointsResponse(DataClassJsonMixin): records: Optional[List[ValidateMultipleWirelessPointsResponseRecordsItem]] = None class CallQueueDetailsStatus(Enum): """ Call queue status """ Enabled = 'Enabled' Disabled = 'Disabled' NotActivated = 'NotActivated' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallQueueDetails(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a call queue """ name: Optional[str] = None """ Call queue name """ extension_number: Optional[str] = None """ Call queue extension number """ status: Optional[CallQueueDetailsStatus] = None """ Call queue status """ service_level_settings: Optional[dict] = None """ Call queue service level settings """ editable_member_status: Optional[bool] = None """ Allows members to change their queue status """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class DepartmentMemberList(DataClassJsonMixin): uri: Optional[str] = None """ Link to the list of department members """ records: Optional[list] = None """ List of department members extensions """ navigation: Optional[dict] = None """ Information on navigation """ paging: Optional[dict] = None """ Information on paging """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class WirelessPointsList(DataClassJsonMixin): uri: Optional[str] = None """ Link to the wireless point list resource """ records: Optional[list] = None """ List of wireless points with assigned emergency addresses """ navigation: Optional[dict] = None """ Information on navigation """ paging: Optional[dict] = None """ Information on paging """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateMultipleSwitchesRequest(DataClassJsonMixin): records: Optional[list] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateNetworkRequest(DataClassJsonMixin): name: Optional[str] = None public_ip_ranges: Optional[list] = None private_ip_ranges: Optional[list] = None emergency_location: Optional[dict] = None """ Emergency response location information """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ValidateMultipleSwitchesRequest(DataClassJsonMixin): records: Optional[list] = None class ValidateMultipleSwitchesResponseRecordsItemStatus(Enum): """ Validation result status """ Valid = 'Valid' Invalid = 'Invalid' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ValidateMultipleSwitchesResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a switch """ chassis_id: Optional[str] = None """ Unique identifier of a network switch """ status: Optional[ValidateMultipleSwitchesResponseRecordsItemStatus] = None """ Validation result status """ errors: Optional[list] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ValidateMultipleSwitchesResponse(DataClassJsonMixin): records: Optional[List[ValidateMultipleSwitchesResponseRecordsItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetAccountInfoResponseServiceInfo(DataClassJsonMixin): """ Account service information, including brand, service plan and billing plan """ uri: Optional[str] = None """ Canonical URI of a service info resource """ billing_plan: Optional[dict] = None """ Information on account billing plan """ brand: Optional[dict] = None """ Information on account brand """ service_plan: Optional[dict] = None """ Information on account service plan """ target_service_plan: Optional[dict] = None """ Information on account target service plan """ contracted_country: Optional[dict] = None """ Information on the contracted country of account """ class GetAccountInfoResponseSetupWizardState(Enum): """ Specifies account configuration wizard state (web service setup) """ NotStarted = 'NotStarted' Incomplete = 'Incomplete' Completed = 'Completed' class GetAccountInfoResponseSignupInfoSignupStateItem(Enum): AccountCreated = 'AccountCreated' BillingEntered = 'BillingEntered' CreditCardApproved = 'CreditCardApproved' AccountConfirmed = 'AccountConfirmed' PhoneVerificationRequired = 'PhoneVerificationRequired' PhoneVerificationPassed = 'PhoneVerificationPassed' class GetAccountInfoResponseSignupInfoVerificationReason(Enum): CC_Failed = 'CC_Failed' Phone_Suspicious = 'Phone_Suspicious' CC_Phone_Not_Match = 'CC_Phone_Not_Match' AVS_Not_Available = 'AVS_Not_Available' MaxMind = 'MaxMind' CC_Blacklisted = 'CC_Blacklisted' Email_Blacklisted = 'Email_Blacklisted' Phone_Blacklisted = 'Phone_Blacklisted' Cookie_Blacklisted = 'Cookie_Blacklisted' Device_Blacklisted = 'Device_Blacklisted' IP_Blacklisted = 'IP_Blacklisted' Agent_Instance_Blacklisted = 'Agent_Instance_Blacklisted' Charge_Limit = 'Charge_Limit' Other_Country = 'Other_Country' Unknown = 'Unknown' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetAccountInfoResponseSignupInfo(DataClassJsonMixin): """ Account sign up data """ tos_accepted: Optional[bool] = False signup_state: Optional[List[GetAccountInfoResponseSignupInfoSignupStateItem]] = None verification_reason: Optional[GetAccountInfoResponseSignupInfoVerificationReason] = None marketing_accepted: Optional[bool] = None """ Updates 'Send Marketing Information' flag on web interface """ class GetAccountInfoResponseStatus(Enum): """ Status of the current account """ Initial = 'Initial' Confirmed = 'Confirmed' Unconfirmed = 'Unconfirmed' Disabled = 'Disabled' class GetAccountInfoResponseStatusInfoReason(Enum): """ Type of suspension """ SuspendedVoluntarily = 'SuspendedVoluntarily' SuspendedInvoluntarily = 'SuspendedInvoluntarily' UserResumed = 'UserResumed' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetAccountInfoResponseStatusInfo(DataClassJsonMixin): """ Status information (reason, comment, lifetime). Returned for 'Disabled' status only """ comment: Optional[str] = None """ A free-form user comment, describing the status change reason """ reason: Optional[GetAccountInfoResponseStatusInfoReason] = None """ Type of suspension """ till: Optional[str] = None """ Date until which the account will get deleted. The default value is 30 days since current date """ class GetAccountInfoResponseRegionalSettingsTimeFormat(Enum): """ Time format setting. The default value is '12h' = ['12h', '24h'] """ OBJECT_12h = '12h' OBJECT_24h = '24h' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetAccountInfoResponseRegionalSettingsCurrency(DataClassJsonMixin): """ Currency information """ id: Optional[str] = None """ Internal identifier of a currency """ code: Optional[str] = None """ Official code of a currency """ name: Optional[str] = None """ Official name of a currency """ symbol: Optional[str] = None """ Graphic symbol of a currency """ minor_symbol: Optional[str] = None """ Minor graphic symbol of a currency """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetAccountInfoResponseRegionalSettings(DataClassJsonMixin): """ Account level region data (web service Auto-Receptionist settings) """ home_country: Optional[dict] = None """ Extension country information """ timezone: Optional[dict] = None """ Extension timezone information """ language: Optional[dict] = None """ User interface language data """ greeting_language: Optional[dict] = None """ Information on language used for telephony greetings """ formatting_locale: Optional[dict] = None """ Formatting language preferences for numbers, dates and currencies """ time_format: Optional[GetAccountInfoResponseRegionalSettingsTimeFormat] = None """ Time format setting. The default value is '12h' = ['12h', '24h'] """ currency: Optional[GetAccountInfoResponseRegionalSettingsCurrency] = None """ Currency information """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetAccountInfoResponse(DataClassJsonMixin): id: Optional[int] = None """ Internal identifier of an account """ uri: Optional[str] = None """ Canonical URI of an account """ bsid: Optional[str] = None """ Internal identifier of an account in the billing system """ main_number: Optional[str] = None """ Main phone number of the current account """ operator: Optional[dict] = None """ Operator's extension information. This extension will receive all calls and messages intended for the operator """ partner_id: Optional[str] = None """ Additional account identifier, created by partner application and applied on client side """ service_info: Optional[GetAccountInfoResponseServiceInfo] = None """ Account service information, including brand, service plan and billing plan """ setup_wizard_state: Optional[GetAccountInfoResponseSetupWizardState] = 'NotStarted' """ Specifies account configuration wizard state (web service setup) """ signup_info: Optional[GetAccountInfoResponseSignupInfo] = None """ Account sign up data """ status: Optional[GetAccountInfoResponseStatus] = None """ Status of the current account """ status_info: Optional[GetAccountInfoResponseStatusInfo] = None """ Status information (reason, comment, lifetime). Returned for 'Disabled' status only """ regional_settings: Optional[GetAccountInfoResponseRegionalSettings] = None """ Account level region data (web service Auto-Receptionist settings) """ federated: Optional[bool] = None """ Specifies whether an account is included into any federation of accounts or not """ outbound_call_prefix: Optional[int] = None """ If outbound call prefix is not specified, or set to null (0), then the parameter is not returned; the supported value range is 2-9 """ cfid: Optional[str] = None """ Customer facing identifier. Returned for accounts with the turned off PBX features. Equals to main company number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) (without '+' sign)format """ limits: Optional[dict] = None """ Limits which are effective for the account """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetCountryListResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a country """ uri: Optional[str] = None """ Canonical URI of a country """ calling_code: Optional[str] = None """ Country calling code defined by ITU-T recommendations [E.123](https://www.itu.int/rec/T-REC-E.123-200102-I/en) and [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) """ emergency_calling: Optional[bool] = None """ Emergency calling feature availability/emergency address requirement indicator """ iso_code: Optional[str] = None """ Country code according to the ISO standard, see [ISO 3166](https://www.iso.org/iso-3166-country-codes.html) """ name: Optional[str] = None """ Official name of a country """ number_selling: Optional[bool] = None """ Determines whether phone numbers are available for a country """ login_allowed: Optional[bool] = None """ Specifies whether login with the phone numbers of this country is enabled or not """ signup_allowed: Optional[bool] = None """ Indicates whether signup/billing is allowed for a country """ free_softphone_line: Optional[bool] = None """ Specifies if free phone line for softphone is available for a country or not """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetCountryListResponse(DataClassJsonMixin): """ Required Properties: - navigation - paging - records Generated by Python OpenAPI Parser """ records: List[GetCountryListResponseRecordsItem] """ List of countries with the country data """ navigation: dict """ Information on navigation """ paging: dict """ Information on paging """ uri: Optional[str] = None """ Link to the list of countries supported """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AssignMultipleDevicesAutomaticLocationUpdates(DataClassJsonMixin): enabled_device_ids: Optional[List[str]] = None disabled_device_ids: Optional[List[str]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AccountPhoneNumbers(DataClassJsonMixin): uri: Optional[str] = None """ Link to the list of account phone numbers """ records: Optional[list] = None """ List of account phone numbers """ navigation: Optional[dict] = None """ Information on navigation """ paging: Optional[dict] = None """ Information on paging """ class CallMonitoringBulkAssignAddedExtensionsItemPermissionsItem(Enum): Monitoring = 'Monitoring' Monitored = 'Monitored' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallMonitoringBulkAssignAddedExtensionsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an extension. Only the following extension types are allowed: User, DigitalUser, VirtualUser, FaxUser, Limited """ permissions: Optional[List[CallMonitoringBulkAssignAddedExtensionsItemPermissionsItem]] = None """ Set of call monitoring group permissions granted to the specified extension. In order to remove the specified extension from a call monitoring group use an empty value """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallMonitoringBulkAssign(DataClassJsonMixin): added_extensions: Optional[List[CallMonitoringBulkAssignAddedExtensionsItem]] = None updated_extensions: Optional[list] = None removed_extensions: Optional[list] = None class AutomaticLocationUpdatesUserListRecordsItemType(Enum): """ User extension type """ User = 'User' Limited = 'Limited' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AutomaticLocationUpdatesUserListRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a device """ full_name: Optional[str] = None """ User name """ extension_number: Optional[str] = None feature_enabled: Optional[bool] = None """ Specifies if Automatic Location Updates feature is enabled """ type: Optional[AutomaticLocationUpdatesUserListRecordsItemType] = None """ User extension type """ site: Optional[str] = None """ Site data """ department: Optional[str] = None """ Department name """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AutomaticLocationUpdatesUserList(DataClassJsonMixin): uri: Optional[str] = None """ Link to the users list resource """ records: Optional[List[AutomaticLocationUpdatesUserListRecordsItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class LanguageList(DataClassJsonMixin): uri: Optional[str] = None """ Canonical URI of the language list resource """ records: Optional[list] = None """ Language data """ navigation: Optional[dict] = None """ Information on navigation """ paging: Optional[dict] = None """ Information on paging """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ParsePhoneNumberRequest(DataClassJsonMixin): original_strings: Optional[List[str]] = None """ Phone numbers passed in a string. The maximum value of phone numbers is limited to 64. The maximum number of symbols in each phone number in a string is 64 """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ParsePhoneNumberResponseHomeCountry(DataClassJsonMixin): """ Information on a user home country """ id: Optional[str] = None """ Internal identifier of a country """ uri: Optional[str] = None """ Canonical URI of a country """ calling_code: Optional[str] = None """ Country calling code defined by ITU-T recommendations E.123 and E.164, see Calling Codes """ emergency_calling: Optional[bool] = None """ Emergency calling feature availability/emergency address requirement indicator """ iso_code: Optional[str] = None """ Country code according to the ISO standard, see ISO 3166 """ name: Optional[str] = None """ Official name of a country """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ParsePhoneNumberResponsePhoneNumbersItem(DataClassJsonMixin): area_code: Optional[str] = None """ Area code of location. The portion of the [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) number that identifies a specific geographic region/numbering area of the national numbering plan (NANP); that can be summarized as `NPA-NXX-xxxx` and covers Canada, the United States, parts of the Caribbean Sea, and some Atlantic and Pacific islands. See [North American Numbering Plan] (https://en.wikipedia.org/wiki/North_American_Numbering_Plan) for details """ country: Optional[dict] = None """ Information on a country the phone number belongs to """ dialable: Optional[str] = None """ Dialing format of a phone number """ e164: Optional[str] = None """ Phone number [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) format """ formatted_international: Optional[str] = None """ International format of a phone number """ formatted_national: Optional[str] = None """ Domestic format of a phone number """ original_string: Optional[str] = None """ One of the numbers to be parsed, passed as a string in response """ special: Optional[bool] = None """ 'True' if the number is in a special format (for example N11 code) """ normalized: Optional[str] = None """ Phone number [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) format without plus sign ('+') """ toll_free: Optional[bool] = None """ Specifies if a phone number is toll free or not """ sub_address: Optional[str] = None """ Sub-Address. The portion of the number that identifies a subscriber into the subscriber internal (non-public) network. """ subscriber_number: Optional[str] = None """ Subscriber number. The portion of the [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) number that identifies a subscriber in a network or numbering area. """ dtmf_postfix: Optional[str] = None """ DTMF (Dual Tone Multi-Frequency) postfix """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ParsePhoneNumberResponse(DataClassJsonMixin): """ Required Properties: - home_country - phone_numbers Generated by Python OpenAPI Parser """ home_country: ParsePhoneNumberResponseHomeCountry """ Information on a user home country """ phone_numbers: List[ParsePhoneNumberResponsePhoneNumbersItem] """ Parsed phone numbers data """ uri: Optional[str] = None """ Canonical URI of a resource """ class GetDeviceInfoResponseType(Enum): """ Device type """ BLA = 'BLA' SoftPhone = 'SoftPhone' OtherPhone = 'OtherPhone' HardPhone = 'HardPhone' WebPhone = 'WebPhone' Paging = 'Paging' class GetDeviceInfoResponseStatus(Enum): """ Device status """ Offline = 'Offline' Online = 'Online' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetDeviceInfoResponseModelAddonsItem(DataClassJsonMixin): id: Optional[str] = None name: Optional[str] = None count: Optional[int] = None class GetDeviceInfoResponseModelFeaturesItem(Enum): BLA = 'BLA' CommonPhone = 'CommonPhone' Intercom = 'Intercom' Paging = 'Paging' HELD = 'HELD' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetDeviceInfoResponseModel(DataClassJsonMixin): """ HardPhone model information """ id: Optional[str] = None """ Internal identifier of a HardPhone device model """ name: Optional[str] = None """ Device name """ addons: Optional[List[GetDeviceInfoResponseModelAddonsItem]] = None """ Addons description """ features: Optional[List[GetDeviceInfoResponseModelFeaturesItem]] = None """ Device feature or multiple features supported """ line_count: Optional[int] = None """ Max supported count of phone lines """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetDeviceInfoResponseExtension(DataClassJsonMixin): """ This attribute can be omitted for unassigned devices """ id: Optional[int] = None """ Internal identifier of an extension """ uri: Optional[str] = None """ Canonical URI of an extension """ extension_number: Optional[str] = None """ Number of department extension """ partner_id: Optional[str] = None """ For Partner Applications Internal identifier of an extension created by partner. The RingCentral supports the mapping of accounts and stores the corresponding account ID/extension ID for each partner ID of a client application. In request URIs partner IDs are accepted instead of regular RingCentral native IDs as path parameters using pid = XXX clause. Though in response URIs contain the corresponding account IDs and extension IDs. In all request and response bodies these values are reflected via partnerId attributes of account and extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetDeviceInfoResponseEmergencyAddress(DataClassJsonMixin): customer_name: Optional[str] = None """ Name of a customer """ street: Optional[str] = None """ Street address, line 1 - street address, P.O. box, company name, c/o """ street2: Optional[str] = None """ Street address, line 2 - apartment, suite, unit, building, floor, etc. """ city: Optional[str] = None """ City name """ zip: Optional[str] = None """ Zip code """ state: Optional[str] = None """ State/province name """ state_id: Optional[str] = None """ Internal identifier of a state """ state_iso_code: Optional[str] = None """ ISO code of a state """ state_name: Optional[str] = None """ Full name of a state """ country_id: Optional[str] = None """ Internal identifier of a country """ country_iso_code: Optional[str] = None """ ISO code of a country """ country: Optional[str] = None """ Country name """ country_name: Optional[str] = None """ Full name of a country """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetDeviceInfoResponseEmergencyLocation(DataClassJsonMixin): """ Company emergency response location details """ id: Optional[str] = None """ Internal identifier of the emergency response location """ name: Optional[str] = None """ Location name """ class GetDeviceInfoResponseEmergencyAddressStatus(Enum): """ Emergency address status """ Valid = 'Valid' Invalid = 'Invalid' class GetDeviceInfoResponseEmergencySyncStatus(Enum): """ Resulting status of emergency address synchronization. Returned if `syncEmergencyAddress` parameter is set to 'True' Generated by Python OpenAPI Parser """ Verified = 'Verified' Updated = 'Updated' Deleted = 'Deleted' NotRequired = 'NotRequired' Unsupported = 'Unsupported' Failed = 'Failed' class GetDeviceInfoResponseEmergencyAddressEditableStatus(Enum): """ Ability to register new emergency address for a phone line using devices sharing this line or only main device (line owner) Generated by Python OpenAPI Parser """ MainDevice = 'MainDevice' AnyDevice = 'AnyDevice' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetDeviceInfoResponseEmergency(DataClassJsonMixin): """ Device emergency settings """ address: Optional[GetDeviceInfoResponseEmergencyAddress] = None location: Optional[GetDeviceInfoResponseEmergencyLocation] = None """ Company emergency response location details """ out_of_country: Optional[bool] = None """ Specifies if emergency address is out of country """ address_status: Optional[GetDeviceInfoResponseEmergencyAddressStatus] = None """ Emergency address status """ sync_status: Optional[GetDeviceInfoResponseEmergencySyncStatus] = None """ Resulting status of emergency address synchronization. Returned if `syncEmergencyAddress` parameter is set to 'True' """ address_editable_status: Optional[GetDeviceInfoResponseEmergencyAddressEditableStatus] = None """ Ability to register new emergency address for a phone line using devices sharing this line or only main device (line owner) """ class GetDeviceInfoResponseEmergencyServiceAddressSyncStatus(Enum): """ Resulting status of emergency address synchronization. Returned if `syncEmergencyAddress` parameter is set to 'True' Generated by Python OpenAPI Parser """ Verified = 'Verified' Updated = 'Updated' Deleted = 'Deleted' NotRequired = 'NotRequired' Unsupported = 'Unsupported' Failed = 'Failed' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetDeviceInfoResponseEmergencyServiceAddress(DataClassJsonMixin): """ Address for emergency cases. The same emergency address is assigned to all the numbers of one device Generated by Python OpenAPI Parser """ street: Optional[str] = None street2: Optional[str] = None city: Optional[str] = None zip: Optional[str] = None customer_name: Optional[str] = None state: Optional[str] = None """ State/province name """ state_id: Optional[str] = None """ Internal identifier of a state """ state_iso_code: Optional[str] = None """ ISO code of a state """ state_name: Optional[str] = None """ Full name of a state """ country_id: Optional[str] = None """ Internal identifier of a country """ country_iso_code: Optional[str] = None """ ISO code of a country """ country: Optional[str] = None """ Country name """ country_name: Optional[str] = None """ Full name of a country """ out_of_country: Optional[bool] = None """ Specifies if emergency address is out of country """ sync_status: Optional[GetDeviceInfoResponseEmergencyServiceAddressSyncStatus] = None """ Resulting status of emergency address synchronization. Returned if `syncEmergencyAddress` parameter is set to 'True' """ additional_customer_name: Optional[str] = None """ Name of an additional contact person. Should be specified for countries except the US, Canada, the UK and Australia. """ customer_email: Optional[str] = None """ Email of a primary contact person (receiver). Should be specified for countries except the US, Canada, the UK and Australia. """ additional_customer_email: Optional[str] = None """ Email of an additional contact person. Should be specified for countries except the US, Canada, the UK and Australia. """ customer_phone: Optional[str] = None """ Phone number of a primary contact person (receiver). Should be specified for countries except the US, Canada, the UK and Australia """ additional_customer_phone: Optional[str] = None """ Phone number of an additional contact person. Should be specified for countries except the US, Canada, the UK & Australia. """ tax_id: Optional[str] = None """ Internal identifier of a tax """ class GetDeviceInfoResponsePhoneLinesItemLineType(Enum): """ Type of phone line """ Standalone = 'Standalone' StandaloneFree = 'StandaloneFree' BlaPrimary = 'BlaPrimary' BlaSecondary = 'BlaSecondary' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetDeviceInfoResponsePhoneLinesItemPhoneInfoCountry(DataClassJsonMixin): """ Brief information on a phone number country """ id: Optional[str] = None """ Internal identifier of a home country """ uri: Optional[str] = None """ Canonical URI of a home country """ name: Optional[str] = None """ Official name of a home country """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetDeviceInfoResponsePhoneLinesItemPhoneInfoExtension(DataClassJsonMixin): """ Information on the extension, to which the phone number is assigned. Returned only for the request of Account phone number list Generated by Python OpenAPI Parser """ id: Optional[str] = None """ Internal identifier of an extension """ uri: Optional[str] = None """ Canonical URI of an extension """ extension_number: Optional[str] = None """ Number of department extension """ partner_id: Optional[str] = None """ For Partner Applications Internal identifier of an extension created by partner. The RingCentral supports the mapping of accounts and stores the corresponding account ID/extension ID for each partner ID of a client application. In request URIs partner IDs are accepted instead of regular RingCentral native IDs as path parameters using pid = XXX clause. Though in response URIs contain the corresponding account IDs and extension IDs. In all request and response bodies these values are reflected via partnerId attributes of account and extension """ class GetDeviceInfoResponsePhoneLinesItemPhoneInfoPaymentType(Enum): """ Payment type. 'External' is returned for forwarded numbers which are not terminated in the RingCentral phone system Generated by Python OpenAPI Parser """ External = 'External' TollFree = 'TollFree' Local = 'Local' class GetDeviceInfoResponsePhoneLinesItemPhoneInfoType(Enum): """ Phone number type """ VoiceFax = 'VoiceFax' FaxOnly = 'FaxOnly' VoiceOnly = 'VoiceOnly' class GetDeviceInfoResponsePhoneLinesItemPhoneInfoUsageType(Enum): """ Usage type of the phone number """ MainCompanyNumber = 'MainCompanyNumber' AdditionalCompanyNumber = 'AdditionalCompanyNumber' CompanyNumber = 'CompanyNumber' DirectNumber = 'DirectNumber' CompanyFaxNumber = 'CompanyFaxNumber' ForwardedNumber = 'ForwardedNumber' ForwardedCompanyNumber = 'ForwardedCompanyNumber' ContactCenterNumber = 'ContactCenterNumber' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetDeviceInfoResponsePhoneLinesItemPhoneInfo(DataClassJsonMixin): """ Phone number information """ id: Optional[int] = None """ Internal identifier of a phone number """ country: Optional[GetDeviceInfoResponsePhoneLinesItemPhoneInfoCountry] = None """ Brief information on a phone number country """ extension: Optional[GetDeviceInfoResponsePhoneLinesItemPhoneInfoExtension] = None """ Information on the extension, to which the phone number is assigned. Returned only for the request of Account phone number list """ label: Optional[str] = None """ Custom user name of a phone number, if any """ location: Optional[str] = None """ Location (City, State). Filled for local US numbers """ payment_type: Optional[GetDeviceInfoResponsePhoneLinesItemPhoneInfoPaymentType] = None """ Payment type. 'External' is returned for forwarded numbers which are not terminated in the RingCentral phone system """ phone_number: Optional[str] = None """ Phone number """ status: Optional[str] = None """ Status of a phone number. If the value is 'Normal', the phone number is ready to be used. Otherwise it is an external number not yet ported to RingCentral """ type: Optional[GetDeviceInfoResponsePhoneLinesItemPhoneInfoType] = None """ Phone number type """ usage_type: Optional[GetDeviceInfoResponsePhoneLinesItemPhoneInfoUsageType] = None """ Usage type of the phone number """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetDeviceInfoResponsePhoneLinesItemEmergencyAddress(DataClassJsonMixin): required: Optional[bool] = None """ 'True' if specifying of emergency address is required """ local_only: Optional[bool] = None """ 'True' if only local emergency address can be specified """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetDeviceInfoResponsePhoneLinesItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a phone line """ line_type: Optional[GetDeviceInfoResponsePhoneLinesItemLineType] = None """ Type of phone line """ phone_info: Optional[GetDeviceInfoResponsePhoneLinesItemPhoneInfo] = None """ Phone number information """ emergency_address: Optional[GetDeviceInfoResponsePhoneLinesItemEmergencyAddress] = None class GetDeviceInfoResponseShippingStatus(Enum): """ Shipping status of the order item. It is set to 'Initial' when the order is submitted. Then it is changed to 'Accepted' when a distributor starts processing the order. Finally it is changed to Shipped which means that distributor has shipped the device. Generated by Python OpenAPI Parser """ Initial = 'Initial' Accepted = 'Accepted' Shipped = 'Shipped' WonTShip = "Won't ship" class GetDeviceInfoResponseShippingMethodId(Enum): """ Method identifier. The default value is 1 (Ground) """ OBJECT_1 = '1' OBJECT_2 = '2' OBJECT_3 = '3' class GetDeviceInfoResponseShippingMethodName(Enum): """ Method name, corresponding to the identifier """ Ground = 'Ground' OBJECT_2_Day = '2 Day' Overnight = 'Overnight' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetDeviceInfoResponseShippingMethod(DataClassJsonMixin): """ Shipping method information """ id: Optional[GetDeviceInfoResponseShippingMethodId] = None """ Method identifier. The default value is 1 (Ground) """ name: Optional[GetDeviceInfoResponseShippingMethodName] = None """ Method name, corresponding to the identifier """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetDeviceInfoResponseShippingAddress(DataClassJsonMixin): """ Shipping address for the order. If it coincides with the Emergency Service Address, then can be omitted. By default the same value as the emergencyServiceAddress. Multiple addresses can be specified; in case an order contains several devices, they can be delivered to different addresses Generated by Python OpenAPI Parser """ customer_name: Optional[str] = None """ Name of a primary contact person (receiver) """ additional_customer_name: Optional[str] = None """ Name of an additional contact person. Should be specified for countries except the US, Canada, the UK and Australia. """ customer_email: Optional[str] = None """ Email of a primary contact person (receiver). Should be specified for countries except the US, Canada, the UK and Australia. """ additional_customer_email: Optional[str] = None """ Email of an additional contact person. Should be specified for countries except the US, Canada, the UK and Australia. """ customer_phone: Optional[str] = None """ Phone number of a primary contact person (receiver). Should be specified for countries except the US, Canada, the UK and Australia """ additional_customer_phone: Optional[str] = None """ Phone number of an additional contact person. Should be specified for countries except the US, Canada, the UK & Australia. """ street: Optional[str] = None """ Street address, line 1 - street address, P.O. box, company name, c/o """ street2: Optional[str] = None """ Street address, line 2 - apartment, suite, unit, building, floor, etc. """ city: Optional[str] = None """ City name """ state: Optional[str] = None """ State/province name """ state_id: Optional[str] = None """ Internal identifier of a state """ state_iso_code: Optional[str] = None """ ISO code of a state """ state_name: Optional[str] = None """ Full name of a state """ country_id: Optional[str] = None """ Internal identifier of a country """ country_iso_code: Optional[str] = None """ ISO code of a country """ country: Optional[str] = None """ Country name """ country_name: Optional[str] = None """ Full name of a country """ zip: Optional[str] = None """ Zip code """ tax_id: Optional[str] = None """ National taxpayer identification number. Should be specified for Brazil (CNPJ/CPF number) and Argentina (CUIT number). """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetDeviceInfoResponseShipping(DataClassJsonMixin): """ Shipping information, according to which devices (in case of HardPhone ) or e911 stickers (in case of SoftPhone and OtherPhone ) will be delivered to the customer Generated by Python OpenAPI Parser """ status: Optional[GetDeviceInfoResponseShippingStatus] = None """ Shipping status of the order item. It is set to 'Initial' when the order is submitted. Then it is changed to 'Accepted' when a distributor starts processing the order. Finally it is changed to Shipped which means that distributor has shipped the device. """ carrier: Optional[str] = None """ Shipping carrier name. Appears only if the device status is 'Shipped' """ tracking_number: Optional[str] = None """ Carrier-specific tracking number. Appears only if the device status is 'Shipped' """ method: Optional[GetDeviceInfoResponseShippingMethod] = None """ Shipping method information """ address: Optional[GetDeviceInfoResponseShippingAddress] = None """ Shipping address for the order. If it coincides with the Emergency Service Address, then can be omitted. By default the same value as the emergencyServiceAddress. Multiple addresses can be specified; in case an order contains several devices, they can be delivered to different addresses """ class GetDeviceInfoResponseLinePooling(Enum): """ Pooling type of a deviceHost - device with standalone paid phone line which can be linked to Glip/Softphone instanceGuest - device with a linked phone lineNone - device without a phone line or with specific line (free, BLA, etc.) = ['Host', 'Guest', 'None'] Generated by Python OpenAPI Parser """ Host = 'Host' Guest = 'Guest' None_ = 'None' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetDeviceInfoResponseBillingStatementChargesItem(DataClassJsonMixin): description: Optional[str] = None amount: Optional[float] = None feature: Optional[str] = None free_service_credit: Optional[float] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetDeviceInfoResponseBillingStatementFeesItem(DataClassJsonMixin): description: Optional[str] = None amount: Optional[float] = None free_service_credit: Optional[float] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetDeviceInfoResponseBillingStatement(DataClassJsonMixin): """ Billing information. Returned for device update request if `prestatement` query parameter is set to 'true' Generated by Python OpenAPI Parser """ currency: Optional[str] = None """ Currency code complying with [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217) standard """ charges: Optional[List[GetDeviceInfoResponseBillingStatementChargesItem]] = None fees: Optional[List[GetDeviceInfoResponseBillingStatementFeesItem]] = None total_charged: Optional[float] = None total_charges: Optional[float] = None total_fees: Optional[float] = None subtotal: Optional[float] = None total_free_service_credit: Optional[float] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetDeviceInfoResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a device """ uri: Optional[str] = None """ Canonical URI of a device """ sku: Optional[str] = None """ Device identification number (stock keeping unit) in the format TP-ID [-AT-AC], where TP is device type (HP for RC HardPhone, DV for all other devices including softphone); ID - device model ID; AT -addon type ID; AC - addon count (if any). For example 'HP-56-2-2' """ type: Optional[GetDeviceInfoResponseType] = 'HardPhone' """ Device type """ name: Optional[str] = None """ Device name. Mandatory if ordering SoftPhone or OtherPhone. Optional for HardPhone. If not specified for HardPhone, then device model name is used as device name """ serial: Optional[str] = None """ Serial number for HardPhone (is returned only when the phone is shipped and provisioned); endpoint_id for softphone and mobile applications """ status: Optional[GetDeviceInfoResponseStatus] = None """ Device status """ computer_name: Optional[str] = None """ PC name for softphone """ model: Optional[GetDeviceInfoResponseModel] = None """ HardPhone model information """ extension: Optional[GetDeviceInfoResponseExtension] = None """ This attribute can be omitted for unassigned devices """ emergency: Optional[GetDeviceInfoResponseEmergency] = None """ Device emergency settings """ emergency_service_address: Optional[GetDeviceInfoResponseEmergencyServiceAddress] = None """ Address for emergency cases. The same emergency address is assigned to all the numbers of one device """ phone_lines: Optional[List[GetDeviceInfoResponsePhoneLinesItem]] = None """ Phone lines information """ shipping: Optional[GetDeviceInfoResponseShipping] = None """ Shipping information, according to which devices (in case of HardPhone ) or e911 stickers (in case of SoftPhone and OtherPhone ) will be delivered to the customer """ box_billing_id: Optional[int] = None """ Box billing identifier of a device. Applicable only for HardPhones. It is an alternative way to identify the device to be ordered. EitherT? model structure, or boxBillingId must be specified forT?HardPhone """ use_as_common_phone: Optional[bool] = None """ Supported only for devices assigned to Limited extensions. If true, enables users to log in to this phone as a common phone. """ in_company_net: Optional[bool] = None """ Network location status. 'True' if the device is located in the configured corporate network (On-Net); 'False' for Off-Net location. Parameter is not returned if `EmergencyAddressAutoUpdate` feature is not enabled for the account/user, or if device network location is not determined """ site: Optional[dict] = None """ Site data """ last_location_report_time: Optional[str] = None """ Datetime of receiving last location report in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format including timezone, for example *2016-03-10T18:07:52.534Z """ line_pooling: Optional[GetDeviceInfoResponseLinePooling] = None """ Pooling type of a deviceHost - device with standalone paid phone line which can be linked to Glip/Softphone instanceGuest - device with a linked phone lineNone - device without a phone line or with specific line (free, BLA, etc.) = ['Host', 'Guest', 'None'] """ billing_statement: Optional[GetDeviceInfoResponseBillingStatement] = None """ Billing information. Returned for device update request if `prestatement` query parameter is set to 'true' """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AccountDeviceUpdateEmergencyServiceAddress(DataClassJsonMixin): """ Address for emergency cases. The same emergency address is assigned to all numbers of a single device. If the emergency address is also specified in `emergency` resource, then this value is ignored Generated by Python OpenAPI Parser """ street: Optional[str] = None street2: Optional[str] = None city: Optional[str] = None zip: Optional[str] = None customer_name: Optional[str] = None state: Optional[str] = None """ State/province name """ state_id: Optional[str] = None """ Internal identifier of a state """ country: Optional[str] = None """ Country name """ country_id: Optional[str] = None """ Internal identifier of a country """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AccountDeviceUpdateExtension(DataClassJsonMixin): """ Information on extension that the device is assigned to """ id: Optional[str] = None """ Internal identifier of an extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AccountDeviceUpdatePhoneLinesPhoneLinesItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a phone number """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AccountDeviceUpdatePhoneLines(DataClassJsonMixin): """ Information on phone lines added to a device """ phone_lines: Optional[List[AccountDeviceUpdatePhoneLinesPhoneLinesItem]] = None """ Information on phone lines added to a device """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AccountDeviceUpdate(DataClassJsonMixin): emergency_service_address: Optional[AccountDeviceUpdateEmergencyServiceAddress] = None """ Address for emergency cases. The same emergency address is assigned to all numbers of a single device. If the emergency address is also specified in `emergency` resource, then this value is ignored """ emergency: Optional[dict] = None """ Device emergency settings """ extension: Optional[AccountDeviceUpdateExtension] = None """ Information on extension that the device is assigned to """ phone_lines: Optional[AccountDeviceUpdatePhoneLines] = None """ Information on phone lines added to a device """ use_as_common_phone: Optional[bool] = None """ Supported only for devices assigned to Limited extensions. If true, enables users to log in to this phone as a common phone. """ class GetExtensionDevicesResponseRecordsItemType(Enum): """ Device type """ SoftPhone = 'SoftPhone' OtherPhone = 'OtherPhone' HardPhone = 'HardPhone' Paging = 'Paging' class GetExtensionDevicesResponseRecordsItemStatus(Enum): """ Device status """ Offline = 'Offline' Online = 'Online' class GetExtensionDevicesResponseRecordsItemLinePooling(Enum): """ Pooling type of a deviceHost - device with standalone paid phone line which can be linked to Glip/Softphone instanceGuest - device with a linked phone lineNone - device without a phone line or with specific line (free, BLA, etc.) = ['Host', 'Guest', 'None'] Generated by Python OpenAPI Parser """ Host = 'Host' Guest = 'Guest' None_ = 'None' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetExtensionDevicesResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a device """ uri: Optional[str] = None """ Canonical URI of a device """ sku: Optional[str] = None """ Device identification number (stock keeping unit) in the format TP-ID [-AT-AC], where TP is device type (HP for RC HardPhone, DV for all other devices including softphone); ID - device model ID; AT -addon type ID; AC - addon count (if any). For example 'HP-56-2-2' """ type: Optional[GetExtensionDevicesResponseRecordsItemType] = 'HardPhone' """ Device type """ name: Optional[str] = None """ Device name. Mandatory if ordering SoftPhone or OtherPhone. Optional for HardPhone. If not specified for HardPhone, then device model name is used as device name """ status: Optional[GetExtensionDevicesResponseRecordsItemStatus] = None """ Device status """ serial: Optional[str] = None """ Serial number for HardPhone (is returned only when the phone is shipped and provisioned); endpoint_id for softphone and mobile applications """ computer_name: Optional[str] = None """ PC name for softphone """ model: Optional[dict] = None """ HardPhone model information """ extension: Optional[dict] = None """ This attribute can be omitted for unassigned devices """ emergency_service_address: Optional[dict] = None """ Address for emergency cases. The same emergency address is assigned to all the numbers of one device """ emergency: Optional[dict] = None """ Device emergency settings """ phone_lines: Optional[list] = None """ Phone lines information """ shipping: Optional[dict] = None """ Shipping information, according to which devices (in case of HardPhone ) or e911 stickers (in case of SoftPhone and OtherPhone ) will be delivered to the customer """ box_billing_id: Optional[int] = None """ Box billing identifier of a device. Applicable only for HardPhones. It is an alternative way to identify the device to be ordered. EitherT? model structure, or boxBillingId must be specified forT?HardPhone """ use_as_common_phone: Optional[bool] = None """ Supported only for devices assigned to Limited extensions. If true, enables users to log in to this phone as a common phone. """ line_pooling: Optional[GetExtensionDevicesResponseRecordsItemLinePooling] = None """ Pooling type of a deviceHost - device with standalone paid phone line which can be linked to Glip/Softphone instanceGuest - device with a linked phone lineNone - device without a phone line or with specific line (free, BLA, etc.) = ['Host', 'Guest', 'None'] """ in_company_net: Optional[bool] = None """ Network location status. 'True' if the device is located in the configured corporate network (On-Net); 'False' for Off-Net location. Parameter is not returned if `EmergencyAddressAutoUpdate` feature is not enabled for the account/user, or if device network location is not determined """ site: Optional[dict] = None """ Site data """ last_location_report_time: Optional[str] = None """ Datetime of receiving last location report in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format including timezone, for example *2016-03-10T18:07:52.534Z """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetExtensionDevicesResponseNavigationFirstPage(DataClassJsonMixin): """ Canonical URI for the first page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetExtensionDevicesResponseNavigation(DataClassJsonMixin): """ Information on navigation """ first_page: Optional[GetExtensionDevicesResponseNavigationFirstPage] = None """ Canonical URI for the first page of the list """ next_page: Optional[dict] = None """ Canonical URI for the next page of the list """ previous_page: Optional[dict] = None """ Canonical URI for the previous page of the list """ last_page: Optional[dict] = None """ Canonical URI for the last page of the list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetExtensionDevicesResponsePaging(DataClassJsonMixin): """ Information on paging """ page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) """ per_page: Optional[int] = None """ Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty """ total_pages: Optional[int] = None """ The total number of pages in a dataset. May be omitted for some resources due to performance reasons """ total_elements: Optional[int] = None """ The total number of elements in a dataset. May be omitted for some resource due to performance reasons """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetExtensionDevicesResponse(DataClassJsonMixin): """ Required Properties: - navigation - paging - records Generated by Python OpenAPI Parser """ records: List[GetExtensionDevicesResponseRecordsItem] """ List of extension devices """ navigation: GetExtensionDevicesResponseNavigation """ Information on navigation """ paging: GetExtensionDevicesResponsePaging """ Information on paging """ uri: Optional[str] = None """ Link to the list of extension devices """ class UserPatch_OperationsItemOp(Enum): Add = 'add' Replace = 'replace' Remove = 'remove' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UserPatch_OperationsItem(DataClassJsonMixin): """ Required Properties: - op Generated by Python OpenAPI Parser """ op: UserPatch_OperationsItemOp path: Optional[str] = None value: Optional[str] = None """ corresponding 'value' of that field specified by 'path' """ class UserPatchSchemasItem(Enum): UrnIetfParamsScimApiMessages_2_0_PatchOp = 'urn:ietf:params:scim:api:messages:2.0:PatchOp' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UserPatch(DataClassJsonMixin): """ Required Properties: - operations - schemas Generated by Python OpenAPI Parser """ operations: List[UserPatch_OperationsItem] """ patch operations list """ schemas: List[UserPatchSchemasItem] @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ServiceProviderConfigAuthenticationSchemesItem(DataClassJsonMixin): description: Optional[str] = None documentation_uri: Optional[str] = None name: Optional[str] = None spec_uri: Optional[str] = None primary: Optional[bool] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ServiceProviderConfigBulk(DataClassJsonMixin): max_operations: Optional[int] = None max_payload_size: Optional[int] = None supported: Optional[bool] = False @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ServiceProviderConfigChangePassword(DataClassJsonMixin): supported: Optional[bool] = False @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ServiceProviderConfigFilter(DataClassJsonMixin): max_results: Optional[int] = None supported: Optional[bool] = False class ServiceProviderConfigSchemasItem(Enum): UrnIetfParamsScimSchemasCore_2_0_ServiceProviderConfig = 'urn:ietf:params:scim:schemas:core:2.0:ServiceProviderConfig' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ServiceProviderConfig(DataClassJsonMixin): authentication_schemes: Optional[List[ServiceProviderConfigAuthenticationSchemesItem]] = None bulk: Optional[ServiceProviderConfigBulk] = None change_password: Optional[ServiceProviderConfigChangePassword] = None filter: Optional[ServiceProviderConfigFilter] = None schemas: Optional[List[ServiceProviderConfigSchemasItem]] = None class UserSearchResponse_ResourcesItemAddressesItemType(Enum): Work = 'work' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UserSearchResponse_ResourcesItemAddressesItem(DataClassJsonMixin): """ Required Properties: - type Generated by Python OpenAPI Parser """ type: UserSearchResponse_ResourcesItemAddressesItemType country: Optional[str] = None locality: Optional[str] = None postal_code: Optional[str] = None region: Optional[str] = None street_address: Optional[str] = None class UserSearchResponse_ResourcesItemEmailsItemType(Enum): Work = 'work' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UserSearchResponse_ResourcesItemEmailsItem(DataClassJsonMixin): """ Required Properties: - type - value Generated by Python OpenAPI Parser """ type: UserSearchResponse_ResourcesItemEmailsItemType value: str @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UserSearchResponse_ResourcesItemName(DataClassJsonMixin): """ Required Properties: - family_name - given_name Generated by Python OpenAPI Parser """ family_name: str given_name: str class UserSearchResponse_ResourcesItemPhoneNumbersItemType(Enum): Work = 'work' Mobile = 'mobile' Other = 'other' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UserSearchResponse_ResourcesItemPhoneNumbersItem(DataClassJsonMixin): """ Required Properties: - type - value Generated by Python OpenAPI Parser """ type: UserSearchResponse_ResourcesItemPhoneNumbersItemType value: str class UserSearchResponse_ResourcesItemPhotosItemType(Enum): Photo = 'photo' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UserSearchResponse_ResourcesItemPhotosItem(DataClassJsonMixin): """ Required Properties: - type - value Generated by Python OpenAPI Parser """ type: UserSearchResponse_ResourcesItemPhotosItemType value: str class UserSearchResponse_ResourcesItemSchemasItem(Enum): UrnIetfParamsScimSchemasCore_2_0_User = 'urn:ietf:params:scim:schemas:core:2.0:User' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UserSearchResponse_ResourcesItemUrnIetfParamsScimSchemasExtensionEnterprise_2_0_User(DataClassJsonMixin): department: Optional[str] = None class UserSearchResponse_ResourcesItemMetaResourceType(Enum): User = 'User' Group = 'Group' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UserSearchResponse_ResourcesItemMeta(DataClassJsonMixin): """ resource metadata """ created: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) last_modified: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) location: Optional[str] = None """ resource location URI """ resource_type: Optional[UserSearchResponse_ResourcesItemMetaResourceType] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UserSearchResponse_ResourcesItem(DataClassJsonMixin): """ Required Properties: - emails - name - schemas - user_name Generated by Python OpenAPI Parser """ emails: List[UserSearchResponse_ResourcesItemEmailsItem] name: UserSearchResponse_ResourcesItemName schemas: List[UserSearchResponse_ResourcesItemSchemasItem] user_name: str """ MUST be same as work type email address """ active: Optional[bool] = False """ user status """ addresses: Optional[List[UserSearchResponse_ResourcesItemAddressesItem]] = None external_id: Optional[str] = None """ external unique resource id defined by provisioning client """ id: Optional[str] = None """ unique resource id defined by RingCentral """ phone_numbers: Optional[List[UserSearchResponse_ResourcesItemPhoneNumbersItem]] = None photos: Optional[List[UserSearchResponse_ResourcesItemPhotosItem]] = None urn_ietf_params_scim_schemas_extension_enterprise_2_0_user: Optional[UserSearchResponse_ResourcesItemUrnIetfParamsScimSchemasExtensionEnterprise_2_0_User] = None meta: Optional[UserSearchResponse_ResourcesItemMeta] = None """ resource metadata """ class UserSearchResponseSchemasItem(Enum): UrnIetfParamsScimApiMessages_2_0_ListResponse = 'urn:ietf:params:scim:api:messages:2.0:ListResponse' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UserSearchResponse(DataClassJsonMixin): resources: Optional[List[UserSearchResponse_ResourcesItem]] = None """ user list """ items_per_page: Optional[int] = None schemas: Optional[List[UserSearchResponseSchemasItem]] = None start_index: Optional[int] = None total_results: Optional[int] = None class ScimErrorResponseSchemasItem(Enum): UrnIetfParamsScimApiMessages_2_0_Error = 'urn:ietf:params:scim:api:messages:2.0:Error' class ScimErrorResponseScimType(Enum): """ bad request type when status code is 400 """ Uniqueness = 'uniqueness' TooMany = 'tooMany' Mutability = 'mutability' Sensitive = 'sensitive' InvalidSyntax = 'invalidSyntax' InvalidFilter = 'invalidFilter' InvalidPath = 'invalidPath' InvalidValue = 'invalidValue' InvalidVers = 'invalidVers' NoTarget = 'noTarget'
/ringcentral_async_client-1.0.3-py3-none-any.whl/ringcentral_async_client/_code_gen/model/_3.py
0.809012
0.222679
_3.py
pypi
from ._5 import * @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCompanyActiveCallsResponseRecordsItemLegsItemMessage(DataClassJsonMixin): """ Linked message (Fax/Voicemail) """ id: Optional[str] = None """ Internal identifier of a message """ type: Optional[str] = None """ Type of a message """ uri: Optional[str] = None """ Link to a message resource """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCompanyActiveCallsResponseRecordsItemLegsItem(DataClassJsonMixin): action: Optional[ListCompanyActiveCallsResponseRecordsItemLegsItemAction] = None """ Action description of the call operation """ direction: Optional[ListCompanyActiveCallsResponseRecordsItemLegsItemDirection] = None """ Call direction """ billing: Optional[ListCompanyActiveCallsResponseRecordsItemLegsItemBilling] = None """ Billing information related to the call """ delegate: Optional[ListCompanyActiveCallsResponseRecordsItemLegsItemDelegate] = None """ Information on a delegate extension that actually implemented a call action. For Secretary call log the field is returned if the current extension implemented a call. For Boss call log the field contains information on a Secretary extension which actually implemented a call on behalf of the current extension """ extension_id: Optional[str] = None """ Internal identifier of an extension """ duration: Optional[int] = None """ Call duration in seconds """ extension: Optional[ListCompanyActiveCallsResponseRecordsItemLegsItemExtension] = None """ Information on extension """ leg_type: Optional[ListCompanyActiveCallsResponseRecordsItemLegsItemLegType] = None """ Leg type """ start_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ The call start datetime in (ISO 8601)[https://en.wikipedia.org/wiki/ISO_8601] format including timezone, for example 2016-03-10T18:07:52.534Z """ type: Optional[ListCompanyActiveCallsResponseRecordsItemLegsItemType] = None """ Call type """ result: Optional[ListCompanyActiveCallsResponseRecordsItemLegsItemResult] = None """ Status description of the call operation """ reason: Optional[ListCompanyActiveCallsResponseRecordsItemLegsItemReason] = None """ Reason of a call result: * `Accepted` - The call was connected to and accepted by this number * `Connected` - The call was answered, but there was no response on how to handle the call (for example, a voice mail system answered the call and did not push "1" to accept) * `Line Busy` - The phone number you dialed was busy * `Not Answered` - The phone number you dialed was not answered * `No Answer` - You did not answer the call * `Hang Up` - The caller hung up before the call was answered * `Stopped` - This attempt was stopped because the call was answered by another phone * `Internal Error` - An internal error occurred when making the call. Please try again * `No Credit` - There was not enough Calling Credit on your account to make this call * `Restricted Number` - The number you dialed is restricted by RingCentral * `Wrong Number` - The number you dialed has either been disconnected or is not a valid phone number. Please check the number and try again * `International Disabled` - International calling is not enabled on your account. Contact customer service to activate International Calling * `International Restricted` - The country and/or area you attempted to call has been prohibited by your administrator * `Bad Number` - An error occurred when making the call. Please check the number before trying again * `Info 411 Restricted` - Calling to 411 Information Services is restricted * `Customer 611 Restricted` - 611 customer service is not supported. Please contact customer service at <(888) 555-1212> * `No Digital Line` - This DigitalLine was either not plugged in or did not have an internet connection * `Failed Try Again` - Call failed. Please try again * `Max Call Limit` - The number of simultaneous calls to your account has reached its limit * `Too Many Calls` - The number of simultaneous calls for per DigitalLine associated with Other Phone has reached its limit. Please contact customer service * `Calls Not Accepted` - Your account was not accepting calls at this time * `Number Not Allowed` - The number that was dialed to access your account is not allowed * `Number Blocked` - This number is in your Blocked Numbers list * `Number Disabled` - The phone number and/or area you attempted to call has been prohibited by your administrator * `Resource Error` - An error occurred when making the call. Please try again * `Call Loop` - A call loop occurred due to an incorrect call forwarding configuration. Please check that you are not forwarding calls back to your own account * `Fax Not Received` - An incoming fax could not be received because a proper connection with the sender's fax machine could not be established * `Fax Partially Sent` - The fax was only partially sent. Possible explanations include phone line quality to poor to maintain the connection or the call was dropped * `Fax Not Sent` - An attempt to send the fax was made, but could not connect with the receiving fax machine * `Fax Poor Line` - An attempt to send the fax was made, but the phone line quality was too poor to send the fax * `Fax Prepare Error` - An internal error occurred when preparing the fax. Please try again * `Fax Save Error` - An internal error occurred when saving the fax. Please try again * `Fax Send Error` - An error occurred when sending the fax. Please try again """ reason_description: Optional[str] = None from_: Optional[ListCompanyActiveCallsResponseRecordsItemLegsItemFrom] = field(metadata=config(field_name='from'), default=None) """ Caller information """ to: Optional[ListCompanyActiveCallsResponseRecordsItemLegsItemTo] = None """ Callee information """ transport: Optional[ListCompanyActiveCallsResponseRecordsItemLegsItemTransport] = None """ Call transport """ recording: Optional[ListCompanyActiveCallsResponseRecordsItemLegsItemRecording] = None """ Call recording data. Returned if the call is recorded """ short_recording: Optional[bool] = None """ Indicates that the recording is too short and therefore wouldn't be returned. The flag is not returned if the value is false """ master: Optional[bool] = None """ Returned for 'Detailed' call log. Specifies if the leg is master-leg """ message: Optional[ListCompanyActiveCallsResponseRecordsItemLegsItemMessage] = None """ Linked message (Fax/Voicemail) """ telephony_session_id: Optional[str] = None """ Telephony identifier of a call session """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCompanyActiveCallsResponseRecordsItemBilling(DataClassJsonMixin): """ Billing information related to the call. Returned for 'Detailed' view only """ cost_included: Optional[float] = None """ Cost per minute, paid and already included in your RingCentral Plan. For example International Calls """ cost_purchased: Optional[float] = None """ Cost per minute, paid and not included in your RingCentral Plan """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCompanyActiveCallsResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a cal log record """ uri: Optional[str] = None """ Canonical URI of a call log record """ session_id: Optional[str] = None """ Internal identifier of a call session """ extension: Optional[ListCompanyActiveCallsResponseRecordsItemExtension] = None telephony_session_id: Optional[str] = None """ Telephony identifier of a call session """ transport: Optional[ListCompanyActiveCallsResponseRecordsItemTransport] = None """ Call transport """ from_: Optional[ListCompanyActiveCallsResponseRecordsItemFrom] = field(metadata=config(field_name='from'), default=None) """ Caller information """ to: Optional[ListCompanyActiveCallsResponseRecordsItemTo] = None """ Callee information """ type: Optional[ListCompanyActiveCallsResponseRecordsItemType] = None """ Call type """ direction: Optional[ListCompanyActiveCallsResponseRecordsItemDirection] = None """ Call direction """ message: Optional[ListCompanyActiveCallsResponseRecordsItemMessage] = None """ Linked message (Fax/Voicemail) """ delegate: Optional[ListCompanyActiveCallsResponseRecordsItemDelegate] = None """ Information on a delegate extension that actually implemented a call action. For Secretary call log the field is returned if the current extension implemented a call. For Boss call log the field contains information on a Secretary extension which actually implemented a call on behalf of the current extension """ deleted: Optional[bool] = None """ Indicates whether the record is deleted. Returned for deleted records, for ISync requests """ action: Optional[ListCompanyActiveCallsResponseRecordsItemAction] = None """ Action description of the call operation """ result: Optional[ListCompanyActiveCallsResponseRecordsItemResult] = None """ Status description of the call operation """ reason: Optional[ListCompanyActiveCallsResponseRecordsItemReason] = None reason_description: Optional[str] = None start_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ The call start datetime in (ISO 8601)[https://en.wikipedia.org/wiki/ISO_8601] format including timezone, for example 2016-03-10T18:07:52.534Z """ duration: Optional[int] = None """ Call duration in seconds """ recording: Optional[ListCompanyActiveCallsResponseRecordsItemRecording] = None """ Call recording data. Returned if a call is recorded """ short_recording: Optional[bool] = None """ Indicates that the recording is too short and therefore wouldn't be returned. The flag is not returned if the value is false """ legs: Optional[List[ListCompanyActiveCallsResponseRecordsItemLegsItem]] = None """ For 'Detailed' view only. Leg description """ billing: Optional[ListCompanyActiveCallsResponseRecordsItemBilling] = None """ Billing information related to the call. Returned for 'Detailed' view only """ last_modified_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ For 'Detailed' view only. The datetime when the call log record was modified in (ISO 8601)[https://en.wikipedia.org/wiki/ISO_8601] format including timezone, for example 2016-03-10T18:07:52.534Z """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCompanyActiveCallsResponseNavigationFirstPage(DataClassJsonMixin): """ Canonical URI for the first page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCompanyActiveCallsResponseNavigationNextPage(DataClassJsonMixin): """ Canonical URI for the next page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCompanyActiveCallsResponseNavigationPreviousPage(DataClassJsonMixin): """ Canonical URI for the previous page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCompanyActiveCallsResponseNavigationLastPage(DataClassJsonMixin): """ Canonical URI for the last page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCompanyActiveCallsResponseNavigation(DataClassJsonMixin): """ Information on navigation """ first_page: Optional[ListCompanyActiveCallsResponseNavigationFirstPage] = None """ Canonical URI for the first page of the list """ next_page: Optional[ListCompanyActiveCallsResponseNavigationNextPage] = None """ Canonical URI for the next page of the list """ previous_page: Optional[ListCompanyActiveCallsResponseNavigationPreviousPage] = None """ Canonical URI for the previous page of the list """ last_page: Optional[ListCompanyActiveCallsResponseNavigationLastPage] = None """ Canonical URI for the last page of the list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCompanyActiveCallsResponsePaging(DataClassJsonMixin): """ Information on paging """ page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) """ per_page: Optional[int] = 100 """ Current page size, describes how many items are in each page. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty """ total_pages: Optional[int] = None """ The total number of pages in a dataset. May be omitted for some resources due to performance reasons """ total_elements: Optional[int] = None """ The total number of elements in a dataset. May be omitted for some resource due to performance reasons """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCompanyActiveCallsResponse(DataClassJsonMixin): """ Required Properties: - navigation - paging - records Generated by Python OpenAPI Parser """ records: List[ListCompanyActiveCallsResponseRecordsItem] """ List of call log records """ navigation: ListCompanyActiveCallsResponseNavigation """ Information on navigation """ paging: ListCompanyActiveCallsResponsePaging """ Information on paging """ uri: Optional[str] = None """ Link to the list of company active call records """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadCallRecordingResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a call recording """ content_uri: Optional[str] = None """ Link to a call recording binary content """ content_type: Optional[str] = None """ Call recording file format. Supported format is audio/x-wav """ duration: Optional[int] = None """ Recorded call duration """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSMSMessageRequestFrom(DataClassJsonMixin): """ Message sender information. The `phoneNumber` value should be one the account phone numbers allowed to send text messages Generated by Python OpenAPI Parser """ phone_number: Optional[str] = None """ Phone number in E.164 format """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSMSMessageRequestToItem(DataClassJsonMixin): phone_number: Optional[str] = None """ Phone number in E.164 format """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSMSMessageRequestCountry(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a country """ uri: Optional[str] = None """ Canonical URI of a country """ name: Optional[str] = None """ Official name of a country """ iso_code: Optional[str] = None """ ISO code of a country """ calling_code: Optional[str] = None """ Calling code of a country """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSMSMessageRequest(DataClassJsonMixin): """ Required Properties: - from_ - text - to Generated by Python OpenAPI Parser """ from_: CreateSMSMessageRequestFrom = field(metadata=config(field_name='from')) """ Message sender information. The `phoneNumber` value should be one the account phone numbers allowed to send text messages """ to: List[CreateSMSMessageRequestToItem] """ Message receiver(s) information. The `phoneNumber` value is required """ text: str """ Text of a message. Max length is 1000 symbols (2-byte UTF-16 encoded). If a character is encoded in 4 bytes in UTF-16 it is treated as 2 characters, thus restricting the maximum message length to 500 symbols """ country: Optional[CreateSMSMessageRequestCountry] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSMSMessageRequestFrom(DataClassJsonMixin): """ Message sender information. The `phoneNumber` value should be one the account phone numbers allowed to send text messages Generated by Python OpenAPI Parser """ phone_number: Optional[str] = None """ Phone number in E.164 format """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSMSMessageRequestCountry(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a country """ uri: Optional[str] = None """ Canonical URI of a country """ name: Optional[str] = None """ Official name of a country """ iso_code: Optional[str] = None """ ISO code of a country """ calling_code: Optional[str] = None """ Calling code of a country """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSMSMessageRequest(DataClassJsonMixin): """ Required Properties: - from_ - text - to Generated by Python OpenAPI Parser """ from_: CreateSMSMessageRequestFrom = field(metadata=config(field_name='from')) """ Message sender information. The `phoneNumber` value should be one the account phone numbers allowed to send text messages """ to: List[dict] """ Message receiver(s) information. The `phoneNumber` value is required """ text: str """ Text of a message. Max length is 1000 symbols (2-byte UTF-16 encoded). If a character is encoded in 4 bytes in UTF-16 it is treated as 2 characters, thus restricting the maximum message length to 500 symbols """ country: Optional[CreateSMSMessageRequestCountry] = None class CreateSMSMessageResponseAttachmentsItemType(Enum): """ Type of message attachment """ AudioRecording = 'AudioRecording' AudioTranscription = 'AudioTranscription' Text = 'Text' SourceDocument = 'SourceDocument' RenderedDocument = 'RenderedDocument' MmsAttachment = 'MmsAttachment' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSMSMessageResponseAttachmentsItem(DataClassJsonMixin): id: Optional[int] = None """ Internal identifier of a message attachment """ uri: Optional[str] = None """ Canonical URI of a message attachment """ type: Optional[CreateSMSMessageResponseAttachmentsItemType] = None """ Type of message attachment """ content_type: Optional[str] = None """ MIME type for a given attachment, for instance 'audio/wav' """ vm_duration: Optional[int] = None """ Supported for `Voicemail` only. Duration of a voicemail in seconds """ file_name: Optional[str] = None """ Name of a file attached """ size: Optional[int] = None """ Size of attachment in bytes """ height: Optional[int] = None """ Attachment height in pixels if available """ width: Optional[int] = None """ Attachment width in pixels if available """ class CreateSMSMessageResponseAvailability(Enum): """ Message availability status. Message in 'Deleted' state is still preserved with all its attachments and can be restored. 'Purged' means that all attachments are already deleted and the message itself is about to be physically deleted shortly Generated by Python OpenAPI Parser """ Alive = 'Alive' Deleted = 'Deleted' Purged = 'Purged' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSMSMessageResponseConversation(DataClassJsonMixin): """ SMS and Pager only. Identifier of a conversation the message belongs to """ id: Optional[str] = None """ Internal identifier of a conversation """ uri: Optional[str] = None """ Deprecated. Link to a conversation resource """ class CreateSMSMessageResponseDirection(Enum): """ Message direction. Note that for some message types not all directions are allowed. For example voicemail messages can be only inbound Generated by Python OpenAPI Parser """ Inbound = 'Inbound' Outbound = 'Outbound' class CreateSMSMessageResponseFaxResolution(Enum): """ Fax only. Resolution of a fax message. 'High' for black and white image scanned at 200 dpi, 'Low' for black and white image scanned at 100 dpi Generated by Python OpenAPI Parser """ High = 'High' Low = 'Low' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSMSMessageResponseFrom(DataClassJsonMixin): """ Sender information """ extension_number: Optional[str] = None """ Extension short number (usually 3 or 4 digits). This property is filled when parties communicate by means of short internal numbers, for example when calling to other extension or sending/receiving Company Pager message """ extension_id: Optional[str] = None """ Internal identifier of an extension """ location: Optional[str] = None """ Contains party location (city, state) if one can be determined from phoneNumber. This property is filled only when phoneNumber is not empty and server can calculate location information from it (for example, this information is unavailable for US toll-free numbers) """ name: Optional[str] = None """ Symbolic name associated with a party. If the phone does not belong to the known extension, only the location is returned, the name is not determined then """ phone_number: Optional[str] = None """ Phone number of a party. Usually it is a plain number including country and area code like 18661234567. But sometimes it could be returned from database with some formatting applied, for example (866)123-4567. This property is filled in all cases where parties communicate by means of global phone numbers, for example when calling to direct numbers or sending/receiving SMS """ class CreateSMSMessageResponseMessageStatus(Enum): """ Message status. Different message types may have different allowed status values. For outbound faxes the aggregated message status is returned: If status for at least one recipient is 'Queued', then 'Queued' value is returned If status for at least one recipient is 'SendingFailed', then 'SendingFailed' value is returned In other cases Sent status is returned Generated by Python OpenAPI Parser """ Queued = 'Queued' Sent = 'Sent' Delivered = 'Delivered' DeliveryFailed = 'DeliveryFailed' SendingFailed = 'SendingFailed' Received = 'Received' class CreateSMSMessageResponsePriority(Enum): """ Message priority """ Normal = 'Normal' High = 'High' class CreateSMSMessageResponseReadStatus(Enum): """ Message read status """ Read = 'Read' Unread = 'Unread' class CreateSMSMessageResponseToItemMessageStatus(Enum): """ Status of a message. Returned for outbound fax messages only """ Queued = 'Queued' Sent = 'Sent' Delivered = 'Delivered' DeliveryFailed = 'DeliveryFailed' SendingFailed = 'SendingFailed' Received = 'Received' class CreateSMSMessageResponseToItemFaxErrorCode(Enum): """ Error code returned in case of fax sending failure. Returned if messageStatus value is 'SendingFailed'. Supported for fax messages only Generated by Python OpenAPI Parser """ AllLinesInUse = 'AllLinesInUse' Undefined = 'Undefined' NoFaxSendPermission = 'NoFaxSendPermission' NoInternationalPermission = 'NoInternationalPermission' NoFaxMachine = 'NoFaxMachine' NoAnswer = 'NoAnswer' LineBusy = 'LineBusy' CallerHungUp = 'CallerHungUp' NotEnoughCredits = 'NotEnoughCredits' SentPartially = 'SentPartially' InternationalCallingDisabled = 'InternationalCallingDisabled' DestinationCountryDisabled = 'DestinationCountryDisabled' UnknownCountryCode = 'UnknownCountryCode' NotAccepted = 'NotAccepted' InvalidNumber = 'InvalidNumber' CallDeclined = 'CallDeclined' TooManyCallsPerLine = 'TooManyCallsPerLine' CallFailed = 'CallFailed' RenderingFailed = 'RenderingFailed' TooManyPages = 'TooManyPages' ReturnToDBQueue = 'ReturnToDBQueue' NoCallTime = 'NoCallTime' WrongNumber = 'WrongNumber' ProhibitedNumber = 'ProhibitedNumber' InternalError = 'InternalError' FaxSendingProhibited = 'FaxSendingProhibited' ThePhoneIsBlacklisted = 'ThePhoneIsBlacklisted' UserNotFound = 'UserNotFound' ConvertError = 'ConvertError' DBGeneralError = 'DBGeneralError' SkypeBillingFailed = 'SkypeBillingFailed' AccountSuspended = 'AccountSuspended' ProhibitedDestination = 'ProhibitedDestination' InternationalDisabled = 'InternationalDisabled' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSMSMessageResponseToItem(DataClassJsonMixin): extension_number: Optional[str] = None """ Extension short number (usually 3 or 4 digits). This property is filled when parties communicate by means of short internal numbers, for example when calling to other extension or sending/receiving Company Pager message """ extension_id: Optional[str] = None location: Optional[str] = None """ Contains party location (city, state) if one can be determined from phoneNumber. This property is filled only when phoneNumber is not empty and server can calculate location information from it (for example, this information is unavailable for US toll-free numbers) """ target: Optional[bool] = None """ 'True' specifies that message is sent exactly to this recipient. Returned in to field for group MMS. Useful if one extension has several phone numbers """ message_status: Optional[CreateSMSMessageResponseToItemMessageStatus] = None """ Status of a message. Returned for outbound fax messages only """ fax_error_code: Optional[CreateSMSMessageResponseToItemFaxErrorCode] = None """ Error code returned in case of fax sending failure. Returned if messageStatus value is 'SendingFailed'. Supported for fax messages only """ name: Optional[str] = None """ Symbolic name associated with a party. If the phone does not belong to the known extension, only the location is returned, the name is not determined then """ phone_number: Optional[str] = None """ Phone number of a party. Usually it is a plain number including country and area code like 18661234567. But sometimes it could be returned from database with some formatting applied, for example (866)123-4567. This property is filled in all cases where parties communicate by means of global phone numbers, for example when calling to direct numbers or sending/receiving SMS """ class CreateSMSMessageResponseType(Enum): """ Message type """ Fax = 'Fax' SMS = 'SMS' VoiceMail = 'VoiceMail' Pager = 'Pager' Text = 'Text' class CreateSMSMessageResponseVmTranscriptionStatus(Enum): """ Voicemail only. Status of voicemail to text transcription. If VoicemailToText feature is not activated for account, the 'NotAvailable' value is returned Generated by Python OpenAPI Parser """ NotAvailable = 'NotAvailable' InProgress = 'InProgress' TimedOut = 'TimedOut' Completed = 'Completed' CompletedPartially = 'CompletedPartially' Failed = 'Failed' Unknown = 'Unknown' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSMSMessageResponse(DataClassJsonMixin): id: Optional[int] = None """ Internal identifier of a message """ uri: Optional[str] = None """ Canonical URI of a message """ attachments: Optional[List[CreateSMSMessageResponseAttachmentsItem]] = None """ The list of message attachments """ availability: Optional[CreateSMSMessageResponseAvailability] = None """ Message availability status. Message in 'Deleted' state is still preserved with all its attachments and can be restored. 'Purged' means that all attachments are already deleted and the message itself is about to be physically deleted shortly """ conversation_id: Optional[int] = None """ SMS and Pager only. Identifier of a conversation the message belongs to """ conversation: Optional[CreateSMSMessageResponseConversation] = None """ SMS and Pager only. Identifier of a conversation the message belongs to """ creation_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Message creation datetime in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z """ delivery_error_code: Optional[str] = None """ SMS only. Delivery error code returned by gateway """ direction: Optional[CreateSMSMessageResponseDirection] = None """ Message direction. Note that for some message types not all directions are allowed. For example voicemail messages can be only inbound """ fax_page_count: Optional[int] = None """ Fax only. Page count in a fax message """ fax_resolution: Optional[CreateSMSMessageResponseFaxResolution] = None """ Fax only. Resolution of a fax message. 'High' for black and white image scanned at 200 dpi, 'Low' for black and white image scanned at 100 dpi """ from_: Optional[CreateSMSMessageResponseFrom] = field(metadata=config(field_name='from'), default=None) """ Sender information """ last_modified_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ The datetime when the message was modified on server in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z """ message_status: Optional[CreateSMSMessageResponseMessageStatus] = None """ Message status. Different message types may have different allowed status values. For outbound faxes the aggregated message status is returned: If status for at least one recipient is 'Queued', then 'Queued' value is returned If status for at least one recipient is 'SendingFailed', then 'SendingFailed' value is returned In other cases Sent status is returned """ pg_to_department: Optional[bool] = None """ 'Pager' only. 'True' if at least one of the message recipients is 'Department' extension """ priority: Optional[CreateSMSMessageResponsePriority] = None """ Message priority """ read_status: Optional[CreateSMSMessageResponseReadStatus] = None """ Message read status """ sms_delivery_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ SMS only. The datetime when outbound SMS was delivered to recipient's handset in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z. It is filled only if the carrier sends a delivery receipt to RingCentral """ sms_sending_attempts_count: Optional[int] = None """ SMS only. Number of attempts made to send an outbound SMS to the gateway (if gateway is temporary unavailable) """ subject: Optional[str] = None """ Message subject. For SMS and Pager messages it replicates message text which is also returned as an attachment """ to: Optional[List[CreateSMSMessageResponseToItem]] = None """ Recipient information """ type: Optional[CreateSMSMessageResponseType] = None """ Message type """ vm_transcription_status: Optional[CreateSMSMessageResponseVmTranscriptionStatus] = None """ Voicemail only. Status of voicemail to text transcription. If VoicemailToText feature is not activated for account, the 'NotAvailable' value is returned """ cover_index: Optional[int] = None """ Cover page identifier. For the list of available cover page identifiers please call the Fax Cover Pages method """ cover_page_text: Optional[str] = None """ Cover page text, entered by the fax sender and printed on the cover page. Maximum length is limited to 1024 symbols """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateMMSRequest(DataClassJsonMixin): """ Required Properties: - attachments - from_ - to Generated by Python OpenAPI Parser """ from_: dict = field(metadata=config(field_name='from')) """ Message sender information. The `phoneNumber` value should be one the account phone numbers allowed to send media messages """ to: list """ Message receiver(s) information. The `phoneNumber` value is required """ attachments: List[bytes] """ Media file(s) to upload """ text: Optional[str] = None """ Text of a message. Max length is 1000 symbols (2-byte UTF-16 encoded). If a character is encoded in 4 bytes in UTF-16 it is treated as 2 characters, thus restricting the maximum message length to 500 symbols """ country: Optional[dict] = None class CreateMMSResponseAttachmentsItemType(Enum): """ Type of message attachment """ AudioRecording = 'AudioRecording' AudioTranscription = 'AudioTranscription' Text = 'Text' SourceDocument = 'SourceDocument' RenderedDocument = 'RenderedDocument' MmsAttachment = 'MmsAttachment' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateMMSResponseAttachmentsItem(DataClassJsonMixin): id: Optional[int] = None """ Internal identifier of a message attachment """ uri: Optional[str] = None """ Canonical URI of a message attachment """ type: Optional[CreateMMSResponseAttachmentsItemType] = None """ Type of message attachment """ content_type: Optional[str] = None """ MIME type for a given attachment, for instance 'audio/wav' """ vm_duration: Optional[int] = None """ Supported for `Voicemail` only. Duration of a voicemail in seconds """ file_name: Optional[str] = None """ Name of a file attached """ size: Optional[int] = None """ Size of attachment in bytes """ height: Optional[int] = None """ Attachment height in pixels if available """ width: Optional[int] = None """ Attachment width in pixels if available """ class CreateMMSResponseAvailability(Enum): """ Message availability status. Message in 'Deleted' state is still preserved with all its attachments and can be restored. 'Purged' means that all attachments are already deleted and the message itself is about to be physically deleted shortly Generated by Python OpenAPI Parser """ Alive = 'Alive' Deleted = 'Deleted' Purged = 'Purged' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateMMSResponseConversation(DataClassJsonMixin): """ SMS and Pager only. Identifier of a conversation the message belongs to """ id: Optional[str] = None """ Internal identifier of a conversation """ uri: Optional[str] = None """ Deprecated. Link to a conversation resource """ class CreateMMSResponseDirection(Enum): """ Message direction. Note that for some message types not all directions are allowed. For example voicemail messages can be only inbound Generated by Python OpenAPI Parser """ Inbound = 'Inbound' Outbound = 'Outbound' class CreateMMSResponseFaxResolution(Enum): """ Fax only. Resolution of a fax message. 'High' for black and white image scanned at 200 dpi, 'Low' for black and white image scanned at 100 dpi Generated by Python OpenAPI Parser """ High = 'High' Low = 'Low' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateMMSResponseFrom(DataClassJsonMixin): """ Sender information """ extension_number: Optional[str] = None """ Extension short number (usually 3 or 4 digits). This property is filled when parties communicate by means of short internal numbers, for example when calling to other extension or sending/receiving Company Pager message """ extension_id: Optional[str] = None """ Internal identifier of an extension """ location: Optional[str] = None """ Contains party location (city, state) if one can be determined from phoneNumber. This property is filled only when phoneNumber is not empty and server can calculate location information from it (for example, this information is unavailable for US toll-free numbers) """ name: Optional[str] = None """ Symbolic name associated with a party. If the phone does not belong to the known extension, only the location is returned, the name is not determined then """ phone_number: Optional[str] = None """ Phone number of a party. Usually it is a plain number including country and area code like 18661234567. But sometimes it could be returned from database with some formatting applied, for example (866)123-4567. This property is filled in all cases where parties communicate by means of global phone numbers, for example when calling to direct numbers or sending/receiving SMS """ class CreateMMSResponseMessageStatus(Enum): """ Message status. Different message types may have different allowed status values. For outbound faxes the aggregated message status is returned: If status for at least one recipient is 'Queued', then 'Queued' value is returned If status for at least one recipient is 'SendingFailed', then 'SendingFailed' value is returned In other cases Sent status is returned Generated by Python OpenAPI Parser """ Queued = 'Queued' Sent = 'Sent' Delivered = 'Delivered' DeliveryFailed = 'DeliveryFailed' SendingFailed = 'SendingFailed' Received = 'Received' class CreateMMSResponsePriority(Enum): """ Message priority """ Normal = 'Normal' High = 'High' class CreateMMSResponseReadStatus(Enum): """ Message read status """ Read = 'Read' Unread = 'Unread' class CreateMMSResponseToItemMessageStatus(Enum): """ Status of a message. Returned for outbound fax messages only """ Queued = 'Queued' Sent = 'Sent' Delivered = 'Delivered' DeliveryFailed = 'DeliveryFailed' SendingFailed = 'SendingFailed' Received = 'Received' class CreateMMSResponseToItemFaxErrorCode(Enum): """ Error code returned in case of fax sending failure. Returned if messageStatus value is 'SendingFailed'. Supported for fax messages only Generated by Python OpenAPI Parser """ AllLinesInUse = 'AllLinesInUse' Undefined = 'Undefined' NoFaxSendPermission = 'NoFaxSendPermission' NoInternationalPermission = 'NoInternationalPermission' NoFaxMachine = 'NoFaxMachine' NoAnswer = 'NoAnswer' LineBusy = 'LineBusy' CallerHungUp = 'CallerHungUp' NotEnoughCredits = 'NotEnoughCredits' SentPartially = 'SentPartially' InternationalCallingDisabled = 'InternationalCallingDisabled' DestinationCountryDisabled = 'DestinationCountryDisabled' UnknownCountryCode = 'UnknownCountryCode' NotAccepted = 'NotAccepted' InvalidNumber = 'InvalidNumber' CallDeclined = 'CallDeclined' TooManyCallsPerLine = 'TooManyCallsPerLine' CallFailed = 'CallFailed' RenderingFailed = 'RenderingFailed' TooManyPages = 'TooManyPages' ReturnToDBQueue = 'ReturnToDBQueue' NoCallTime = 'NoCallTime' WrongNumber = 'WrongNumber' ProhibitedNumber = 'ProhibitedNumber' InternalError = 'InternalError' FaxSendingProhibited = 'FaxSendingProhibited' ThePhoneIsBlacklisted = 'ThePhoneIsBlacklisted' UserNotFound = 'UserNotFound' ConvertError = 'ConvertError' DBGeneralError = 'DBGeneralError' SkypeBillingFailed = 'SkypeBillingFailed' AccountSuspended = 'AccountSuspended' ProhibitedDestination = 'ProhibitedDestination' InternationalDisabled = 'InternationalDisabled' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateMMSResponseToItem(DataClassJsonMixin): extension_number: Optional[str] = None """ Extension short number (usually 3 or 4 digits). This property is filled when parties communicate by means of short internal numbers, for example when calling to other extension or sending/receiving Company Pager message """ extension_id: Optional[str] = None location: Optional[str] = None """ Contains party location (city, state) if one can be determined from phoneNumber. This property is filled only when phoneNumber is not empty and server can calculate location information from it (for example, this information is unavailable for US toll-free numbers) """ target: Optional[bool] = None """ 'True' specifies that message is sent exactly to this recipient. Returned in to field for group MMS. Useful if one extension has several phone numbers """ message_status: Optional[CreateMMSResponseToItemMessageStatus] = None """ Status of a message. Returned for outbound fax messages only """ fax_error_code: Optional[CreateMMSResponseToItemFaxErrorCode] = None """ Error code returned in case of fax sending failure. Returned if messageStatus value is 'SendingFailed'. Supported for fax messages only """ name: Optional[str] = None """ Symbolic name associated with a party. If the phone does not belong to the known extension, only the location is returned, the name is not determined then """ phone_number: Optional[str] = None """ Phone number of a party. Usually it is a plain number including country and area code like 18661234567. But sometimes it could be returned from database with some formatting applied, for example (866)123-4567. This property is filled in all cases where parties communicate by means of global phone numbers, for example when calling to direct numbers or sending/receiving SMS """ class CreateMMSResponseType(Enum): """ Message type """ Fax = 'Fax' SMS = 'SMS' VoiceMail = 'VoiceMail' Pager = 'Pager' Text = 'Text' class CreateMMSResponseVmTranscriptionStatus(Enum): """ Voicemail only. Status of voicemail to text transcription. If VoicemailToText feature is not activated for account, the 'NotAvailable' value is returned Generated by Python OpenAPI Parser """ NotAvailable = 'NotAvailable' InProgress = 'InProgress' TimedOut = 'TimedOut' Completed = 'Completed' CompletedPartially = 'CompletedPartially' Failed = 'Failed' Unknown = 'Unknown' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateMMSResponse(DataClassJsonMixin): id: Optional[int] = None """ Internal identifier of a message """ uri: Optional[str] = None """ Canonical URI of a message """ attachments: Optional[List[CreateMMSResponseAttachmentsItem]] = None """ The list of message attachments """ availability: Optional[CreateMMSResponseAvailability] = None """ Message availability status. Message in 'Deleted' state is still preserved with all its attachments and can be restored. 'Purged' means that all attachments are already deleted and the message itself is about to be physically deleted shortly """ conversation_id: Optional[int] = None """ SMS and Pager only. Identifier of a conversation the message belongs to """ conversation: Optional[CreateMMSResponseConversation] = None """ SMS and Pager only. Identifier of a conversation the message belongs to """ creation_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Message creation datetime in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z """ delivery_error_code: Optional[str] = None """ SMS only. Delivery error code returned by gateway """ direction: Optional[CreateMMSResponseDirection] = None """ Message direction. Note that for some message types not all directions are allowed. For example voicemail messages can be only inbound """ fax_page_count: Optional[int] = None """ Fax only. Page count in a fax message """ fax_resolution: Optional[CreateMMSResponseFaxResolution] = None """ Fax only. Resolution of a fax message. 'High' for black and white image scanned at 200 dpi, 'Low' for black and white image scanned at 100 dpi """ from_: Optional[CreateMMSResponseFrom] = field(metadata=config(field_name='from'), default=None) """ Sender information """ last_modified_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ The datetime when the message was modified on server in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z """ message_status: Optional[CreateMMSResponseMessageStatus] = None """ Message status. Different message types may have different allowed status values. For outbound faxes the aggregated message status is returned: If status for at least one recipient is 'Queued', then 'Queued' value is returned If status for at least one recipient is 'SendingFailed', then 'SendingFailed' value is returned In other cases Sent status is returned """ pg_to_department: Optional[bool] = None """ 'Pager' only. 'True' if at least one of the message recipients is 'Department' extension """ priority: Optional[CreateMMSResponsePriority] = None """ Message priority """ read_status: Optional[CreateMMSResponseReadStatus] = None """ Message read status """ sms_delivery_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ SMS only. The datetime when outbound SMS was delivered to recipient's handset in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z. It is filled only if the carrier sends a delivery receipt to RingCentral """ sms_sending_attempts_count: Optional[int] = None """ SMS only. Number of attempts made to send an outbound SMS to the gateway (if gateway is temporary unavailable) """ subject: Optional[str] = None """ Message subject. For SMS and Pager messages it replicates message text which is also returned as an attachment """ to: Optional[List[CreateMMSResponseToItem]] = None """ Recipient information """ type: Optional[CreateMMSResponseType] = None """ Message type """ vm_transcription_status: Optional[CreateMMSResponseVmTranscriptionStatus] = None """ Voicemail only. Status of voicemail to text transcription. If VoicemailToText feature is not activated for account, the 'NotAvailable' value is returned """ cover_index: Optional[int] = None """ Cover page identifier. For the list of available cover page identifiers please call the Fax Cover Pages method """ cover_page_text: Optional[str] = None """ Cover page text, entered by the fax sender and printed on the cover page. Maximum length is limited to 1024 symbols """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateInternalTextMessageRequestFrom(DataClassJsonMixin): """ Sender of a pager message. """ extension_id: Optional[str] = None """ Extension identifier Example: `123456789` """ extension_number: Optional[str] = None """ Extension number Example: `105` """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateInternalTextMessageRequestToItem(DataClassJsonMixin): extension_id: Optional[str] = None """ Extension identifier Example: `123456789` """ extension_number: Optional[str] = None """ Extension number Example: `105` """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateInternalTextMessageRequest(DataClassJsonMixin): """ Required Properties: - text Generated by Python OpenAPI Parser """ text: str """ Text of a pager message. Max length is 1024 symbols (2-byte UTF-16 encoded). If a character is encoded in 4 bytes in UTF-16 it is treated as 2 characters, thus restricting the maximum message length to 512 symbols Example: `hello world` """ from_: Optional[CreateInternalTextMessageRequestFrom] = field(metadata=config(field_name='from'), default=None) """ Sender of a pager message. """ reply_on: Optional[int] = None """ Internal identifier of a message this message replies to """ to: Optional[List[CreateInternalTextMessageRequestToItem]] = None """ Optional if replyOn parameter is specified. Receiver of a pager message. """ class CreateInternalTextMessageResponseAttachmentsItemType(Enum): """ Type of message attachment """ AudioRecording = 'AudioRecording' AudioTranscription = 'AudioTranscription' Text = 'Text' SourceDocument = 'SourceDocument' RenderedDocument = 'RenderedDocument' MmsAttachment = 'MmsAttachment' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateInternalTextMessageResponseAttachmentsItem(DataClassJsonMixin): id: Optional[int] = None """ Internal identifier of a message attachment """ uri: Optional[str] = None """ Canonical URI of a message attachment """ type: Optional[CreateInternalTextMessageResponseAttachmentsItemType] = None """ Type of message attachment """ content_type: Optional[str] = None """ MIME type for a given attachment, for instance 'audio/wav' """ vm_duration: Optional[int] = None """ Supported for `Voicemail` only. Duration of a voicemail in seconds """ file_name: Optional[str] = None """ Name of a file attached """ size: Optional[int] = None """ Size of attachment in bytes """ height: Optional[int] = None """ Attachment height in pixels if available """ width: Optional[int] = None """ Attachment width in pixels if available """ class CreateInternalTextMessageResponseAvailability(Enum): """ Message availability status. Message in 'Deleted' state is still preserved with all its attachments and can be restored. 'Purged' means that all attachments are already deleted and the message itself is about to be physically deleted shortly Generated by Python OpenAPI Parser """ Alive = 'Alive' Deleted = 'Deleted' Purged = 'Purged' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateInternalTextMessageResponseConversation(DataClassJsonMixin): """ SMS and Pager only. Identifier of a conversation the message belongs to """ id: Optional[str] = None """ Internal identifier of a conversation """ uri: Optional[str] = None """ Deprecated. Link to a conversation resource """ class CreateInternalTextMessageResponseDirection(Enum): """ Message direction. Note that for some message types not all directions are allowed. For example voicemail messages can be only inbound Generated by Python OpenAPI Parser """ Inbound = 'Inbound' Outbound = 'Outbound' class CreateInternalTextMessageResponseFaxResolution(Enum): """ Fax only. Resolution of a fax message. 'High' for black and white image scanned at 200 dpi, 'Low' for black and white image scanned at 100 dpi Generated by Python OpenAPI Parser """ High = 'High' Low = 'Low' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateInternalTextMessageResponseFrom(DataClassJsonMixin): """ Sender information """ extension_number: Optional[str] = None """ Extension short number (usually 3 or 4 digits). This property is filled when parties communicate by means of short internal numbers, for example when calling to other extension or sending/receiving Company Pager message """ extension_id: Optional[str] = None """ Internal identifier of an extension """ location: Optional[str] = None """ Contains party location (city, state) if one can be determined from phoneNumber. This property is filled only when phoneNumber is not empty and server can calculate location information from it (for example, this information is unavailable for US toll-free numbers) """ name: Optional[str] = None """ Symbolic name associated with a party. If the phone does not belong to the known extension, only the location is returned, the name is not determined then """ phone_number: Optional[str] = None """ Phone number of a party. Usually it is a plain number including country and area code like 18661234567. But sometimes it could be returned from database with some formatting applied, for example (866)123-4567. This property is filled in all cases where parties communicate by means of global phone numbers, for example when calling to direct numbers or sending/receiving SMS """ class CreateInternalTextMessageResponseMessageStatus(Enum): """ Message status. Different message types may have different allowed status values. For outbound faxes the aggregated message status is returned: If status for at least one recipient is 'Queued', then 'Queued' value is returned If status for at least one recipient is 'SendingFailed', then 'SendingFailed' value is returned In other cases Sent status is returned Generated by Python OpenAPI Parser """ Queued = 'Queued' Sent = 'Sent' Delivered = 'Delivered' DeliveryFailed = 'DeliveryFailed' SendingFailed = 'SendingFailed' Received = 'Received' class CreateInternalTextMessageResponsePriority(Enum): """ Message priority """ Normal = 'Normal' High = 'High' class CreateInternalTextMessageResponseReadStatus(Enum): """ Message read status """ Read = 'Read' Unread = 'Unread' class CreateInternalTextMessageResponseToItemMessageStatus(Enum): """ Status of a message. Returned for outbound fax messages only """ Queued = 'Queued' Sent = 'Sent' Delivered = 'Delivered' DeliveryFailed = 'DeliveryFailed' SendingFailed = 'SendingFailed' Received = 'Received' class CreateInternalTextMessageResponseToItemFaxErrorCode(Enum): """ Error code returned in case of fax sending failure. Returned if messageStatus value is 'SendingFailed'. Supported for fax messages only Generated by Python OpenAPI Parser """ AllLinesInUse = 'AllLinesInUse' Undefined = 'Undefined' NoFaxSendPermission = 'NoFaxSendPermission' NoInternationalPermission = 'NoInternationalPermission' NoFaxMachine = 'NoFaxMachine' NoAnswer = 'NoAnswer' LineBusy = 'LineBusy' CallerHungUp = 'CallerHungUp' NotEnoughCredits = 'NotEnoughCredits' SentPartially = 'SentPartially' InternationalCallingDisabled = 'InternationalCallingDisabled' DestinationCountryDisabled = 'DestinationCountryDisabled' UnknownCountryCode = 'UnknownCountryCode' NotAccepted = 'NotAccepted' InvalidNumber = 'InvalidNumber' CallDeclined = 'CallDeclined' TooManyCallsPerLine = 'TooManyCallsPerLine' CallFailed = 'CallFailed' RenderingFailed = 'RenderingFailed' TooManyPages = 'TooManyPages' ReturnToDBQueue = 'ReturnToDBQueue' NoCallTime = 'NoCallTime' WrongNumber = 'WrongNumber' ProhibitedNumber = 'ProhibitedNumber' InternalError = 'InternalError' FaxSendingProhibited = 'FaxSendingProhibited' ThePhoneIsBlacklisted = 'ThePhoneIsBlacklisted' UserNotFound = 'UserNotFound' ConvertError = 'ConvertError' DBGeneralError = 'DBGeneralError' SkypeBillingFailed = 'SkypeBillingFailed' AccountSuspended = 'AccountSuspended' ProhibitedDestination = 'ProhibitedDestination' InternationalDisabled = 'InternationalDisabled' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateInternalTextMessageResponseToItem(DataClassJsonMixin): extension_number: Optional[str] = None """ Extension short number (usually 3 or 4 digits). This property is filled when parties communicate by means of short internal numbers, for example when calling to other extension or sending/receiving Company Pager message """ extension_id: Optional[str] = None location: Optional[str] = None """ Contains party location (city, state) if one can be determined from phoneNumber. This property is filled only when phoneNumber is not empty and server can calculate location information from it (for example, this information is unavailable for US toll-free numbers) """ target: Optional[bool] = None """ 'True' specifies that message is sent exactly to this recipient. Returned in to field for group MMS. Useful if one extension has several phone numbers """ message_status: Optional[CreateInternalTextMessageResponseToItemMessageStatus] = None """ Status of a message. Returned for outbound fax messages only """ fax_error_code: Optional[CreateInternalTextMessageResponseToItemFaxErrorCode] = None """ Error code returned in case of fax sending failure. Returned if messageStatus value is 'SendingFailed'. Supported for fax messages only """ name: Optional[str] = None """ Symbolic name associated with a party. If the phone does not belong to the known extension, only the location is returned, the name is not determined then """ phone_number: Optional[str] = None """ Phone number of a party. Usually it is a plain number including country and area code like 18661234567. But sometimes it could be returned from database with some formatting applied, for example (866)123-4567. This property is filled in all cases where parties communicate by means of global phone numbers, for example when calling to direct numbers or sending/receiving SMS """ class CreateInternalTextMessageResponseType(Enum): """ Message type """ Fax = 'Fax' SMS = 'SMS' VoiceMail = 'VoiceMail' Pager = 'Pager' Text = 'Text' class CreateInternalTextMessageResponseVmTranscriptionStatus(Enum): """ Voicemail only. Status of voicemail to text transcription. If VoicemailToText feature is not activated for account, the 'NotAvailable' value is returned Generated by Python OpenAPI Parser """ NotAvailable = 'NotAvailable' InProgress = 'InProgress' TimedOut = 'TimedOut' Completed = 'Completed' CompletedPartially = 'CompletedPartially' Failed = 'Failed' Unknown = 'Unknown' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateInternalTextMessageResponse(DataClassJsonMixin): id: Optional[int] = None """ Internal identifier of a message """ uri: Optional[str] = None """ Canonical URI of a message """ attachments: Optional[List[CreateInternalTextMessageResponseAttachmentsItem]] = None """ The list of message attachments """ availability: Optional[CreateInternalTextMessageResponseAvailability] = None """ Message availability status. Message in 'Deleted' state is still preserved with all its attachments and can be restored. 'Purged' means that all attachments are already deleted and the message itself is about to be physically deleted shortly """ conversation_id: Optional[int] = None """ SMS and Pager only. Identifier of a conversation the message belongs to """ conversation: Optional[CreateInternalTextMessageResponseConversation] = None """ SMS and Pager only. Identifier of a conversation the message belongs to """ creation_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Message creation datetime in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z """ delivery_error_code: Optional[str] = None """ SMS only. Delivery error code returned by gateway """ direction: Optional[CreateInternalTextMessageResponseDirection] = None """ Message direction. Note that for some message types not all directions are allowed. For example voicemail messages can be only inbound """ fax_page_count: Optional[int] = None """ Fax only. Page count in a fax message """ fax_resolution: Optional[CreateInternalTextMessageResponseFaxResolution] = None """ Fax only. Resolution of a fax message. 'High' for black and white image scanned at 200 dpi, 'Low' for black and white image scanned at 100 dpi """ from_: Optional[CreateInternalTextMessageResponseFrom] = field(metadata=config(field_name='from'), default=None) """ Sender information """ last_modified_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ The datetime when the message was modified on server in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z """ message_status: Optional[CreateInternalTextMessageResponseMessageStatus] = None """ Message status. Different message types may have different allowed status values. For outbound faxes the aggregated message status is returned: If status for at least one recipient is 'Queued', then 'Queued' value is returned If status for at least one recipient is 'SendingFailed', then 'SendingFailed' value is returned In other cases Sent status is returned """ pg_to_department: Optional[bool] = None """ 'Pager' only. 'True' if at least one of the message recipients is 'Department' extension """ priority: Optional[CreateInternalTextMessageResponsePriority] = None """ Message priority """ read_status: Optional[CreateInternalTextMessageResponseReadStatus] = None """ Message read status """ sms_delivery_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ SMS only. The datetime when outbound SMS was delivered to recipient's handset in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z. It is filled only if the carrier sends a delivery receipt to RingCentral """ sms_sending_attempts_count: Optional[int] = None """ SMS only. Number of attempts made to send an outbound SMS to the gateway (if gateway is temporary unavailable) """ subject: Optional[str] = None """ Message subject. For SMS and Pager messages it replicates message text which is also returned as an attachment """ to: Optional[List[CreateInternalTextMessageResponseToItem]] = None """ Recipient information """ type: Optional[CreateInternalTextMessageResponseType] = None """ Message type """ vm_transcription_status: Optional[CreateInternalTextMessageResponseVmTranscriptionStatus] = None """ Voicemail only. Status of voicemail to text transcription. If VoicemailToText feature is not activated for account, the 'NotAvailable' value is returned """ cover_index: Optional[int] = None """ Cover page identifier. For the list of available cover page identifiers please call the Fax Cover Pages method """ cover_page_text: Optional[str] = None """ Cover page text, entered by the fax sender and printed on the cover page. Maximum length is limited to 1024 symbols """ class CreateFaxMessageRequestFaxResolution(Enum): """ Resolution of Fax """ High = 'High' Low = 'Low' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateFaxMessageRequest(DataClassJsonMixin): """ Required Properties: - attachment - to Generated by Python OpenAPI Parser """ attachment: bytes """ File to upload """ to: List[str] """ To Phone Number """ fax_resolution: Optional[CreateFaxMessageRequestFaxResolution] = None """ Resolution of Fax """ send_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Timestamp to send fax at. If not specified (current or the past), the fax is sent immediately """ iso_code: Optional[str] = None """ ISO Code. e.g UK """ cover_index: Optional[int] = None """ Cover page identifier. For the list of available cover page identifiers please call the method Fax Cover Pages. If not specified, the default cover page which is configured in 'Outbound Fax Settings' is attached """ cover_page_text: Optional[str] = None """ Cover page text, entered by the fax sender and printed on the cover page. Maximum length is limited to 1024 symbols """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateFaxMessageResponseFrom(DataClassJsonMixin): """ Sender information """ phone_number: Optional[str] = None name: Optional[str] = None location: Optional[str] = None class CreateFaxMessageResponseToItemMessageStatus(Enum): Sent = 'Sent' SendingFailed = 'SendingFailed' Queued = 'Queued' class CreateFaxMessageResponseToItemFaxErrorCode(Enum): Undefined = 'Undefined' NoFaxSendPermission = 'NoFaxSendPermission' NoInternationalPermission = 'NoInternationalPermission' NoFaxMachine = 'NoFaxMachine' NoAnswer = 'NoAnswer' LineBusy = 'LineBusy' CallerHungUp = 'CallerHungUp' NotEnoughCredits = 'NotEnoughCredits' SentPartially = 'SentPartially' InternationalCallingDisabled = 'InternationalCallingDisabled' DestinationCountryDisabled = 'DestinationCountryDisabled' UnknownCountryCode = 'UnknownCountryCode' NotAccepted = 'NotAccepted' InvalidNumber = 'InvalidNumber' CallDeclined = 'CallDeclined' TooManyCallsPerLine = 'TooManyCallsPerLine' CallFailed = 'CallFailed' RenderingFailed = 'RenderingFailed' TooManyPages = 'TooManyPages' ReturnToDBQueue = 'ReturnToDBQueue' NoCallTime = 'NoCallTime' WrongNumber = 'WrongNumber' ProhibitedNumber = 'ProhibitedNumber' InternalError = 'InternalError' FaxSendingProhibited = 'FaxSendingProhibited' ThePhoneIsBlacklisted = 'ThePhoneIsBlacklisted' UserNotFound = 'UserNotFound' ConvertError = 'ConvertError' DBGeneralError = 'DBGeneralError' SkypeBillingFailed = 'SkypeBillingFailed' AccountSuspended = 'AccountSuspended' ProhibitedDestination = 'ProhibitedDestination' InternationalDisabled = 'InternationalDisabled' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateFaxMessageResponseToItem(DataClassJsonMixin): phone_number: Optional[str] = None name: Optional[str] = None location: Optional[str] = None message_status: Optional[CreateFaxMessageResponseToItemMessageStatus] = None fax_error_code: Optional[CreateFaxMessageResponseToItemFaxErrorCode] = None class CreateFaxMessageResponseReadStatus(Enum): """ Message read status """ Read = 'Read' Unread = 'Unread' class CreateFaxMessageResponsePriority(Enum): """ Message priority """ Normal = 'Normal' High = 'High' class CreateFaxMessageResponseAttachmentsItemType(Enum): """ Type of message attachment """ AudioRecording = 'AudioRecording' AudioTranscription = 'AudioTranscription' Text = 'Text' SourceDocument = 'SourceDocument' RenderedDocument = 'RenderedDocument' MmsAttachment = 'MmsAttachment' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateFaxMessageResponseAttachmentsItem(DataClassJsonMixin): id: Optional[int] = None """ Internal identifier of a message attachment """ uri: Optional[str] = None """ Canonical URI of a message attachment """ type: Optional[CreateFaxMessageResponseAttachmentsItemType] = None """ Type of message attachment """ content_type: Optional[str] = None """ MIME type for a given attachment, for instance 'audio/wav' """ vm_duration: Optional[int] = None """ Voicemail only Duration of the voicemail in seconds """ filename: Optional[str] = None """ Name of a file attached """ size: Optional[int] = None """ Size of attachment in bytes """ class CreateFaxMessageResponseDirection(Enum): """ Message direction """ Inbound = 'Inbound' Outbound = 'Outbound' class CreateFaxMessageResponseAvailability(Enum): """ Message availability status. Message in 'Deleted' state is still preserved with all its attachments and can be restored. 'Purged' means that all attachments are already deleted and the message itself is about to be physically deleted shortly Generated by Python OpenAPI Parser """ Alive = 'Alive' Deleted = 'Deleted' Purged = 'Purged' class CreateFaxMessageResponseMessageStatus(Enum): """ Message status. 'Queued' - the message is queued for sending; 'Sent' - a message is successfully sent; 'SendingFailed' - a message sending attempt has failed; 'Received' - a message is received (inbound messages have this status by default) Generated by Python OpenAPI Parser """ Queued = 'Queued' Sent = 'Sent' SendingFailed = 'SendingFailed' Received = 'Received' class CreateFaxMessageResponseFaxResolution(Enum): """ Resolution of a fax message. ('High' for black and white image scanned at 200 dpi, 'Low' for black and white image scanned at 100 dpi) Generated by Python OpenAPI Parser """ High = 'High' Low = 'Low' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateFaxMessageResponse(DataClassJsonMixin): id: Optional[int] = None """ Internal identifier of a message """ uri: Optional[str] = None """ Canonical URI of a message """ type: Optional[str] = None """ Message type - 'Fax' """ from_: Optional[CreateFaxMessageResponseFrom] = field(metadata=config(field_name='from'), default=None) """ Sender information """ to: Optional[List[CreateFaxMessageResponseToItem]] = None """ Recipient information """ creation_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Message creation datetime in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z """ read_status: Optional[CreateFaxMessageResponseReadStatus] = None """ Message read status """ priority: Optional[CreateFaxMessageResponsePriority] = None """ Message priority """ attachments: Optional[List[CreateFaxMessageResponseAttachmentsItem]] = None """ The list of message attachments """ direction: Optional[CreateFaxMessageResponseDirection] = None """ Message direction """ availability: Optional[CreateFaxMessageResponseAvailability] = None """ Message availability status. Message in 'Deleted' state is still preserved with all its attachments and can be restored. 'Purged' means that all attachments are already deleted and the message itself is about to be physically deleted shortly """ message_status: Optional[CreateFaxMessageResponseMessageStatus] = None """ Message status. 'Queued' - the message is queued for sending; 'Sent' - a message is successfully sent; 'SendingFailed' - a message sending attempt has failed; 'Received' - a message is received (inbound messages have this status by default) """ fax_resolution: Optional[CreateFaxMessageResponseFaxResolution] = None """ Resolution of a fax message. ('High' for black and white image scanned at 200 dpi, 'Low' for black and white image scanned at 100 dpi) """ fax_page_count: Optional[int] = None """ Page count in a fax message """ last_modified_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Datetime when the message was modified on server in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z """ cover_index: Optional[int] = None """ Cover page identifier. For the list of available cover page identifiers please call the Fax Cover Pages method """ cover_page_text: Optional[str] = None """ Cover page text, entered by the fax sender and printed on the cover page. Maximum length is limited to 1024 symbols """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListFaxCoverPagesResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a fax cover page. The possible value range is 0-13 (for language setting en-US) and 0, 15-28 (for all other languages) """ name: Optional[str] = None """ Name of a fax cover page pattern """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListFaxCoverPagesResponseNavigationFirstPage(DataClassJsonMixin): """ Canonical URI for the first page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListFaxCoverPagesResponseNavigationNextPage(DataClassJsonMixin): """ Canonical URI for the next page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListFaxCoverPagesResponseNavigationPreviousPage(DataClassJsonMixin): """ Canonical URI for the previous page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListFaxCoverPagesResponseNavigationLastPage(DataClassJsonMixin): """ Canonical URI for the last page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListFaxCoverPagesResponseNavigation(DataClassJsonMixin): """ Information on navigation """ first_page: Optional[ListFaxCoverPagesResponseNavigationFirstPage] = None """ Canonical URI for the first page of the list """ next_page: Optional[ListFaxCoverPagesResponseNavigationNextPage] = None """ Canonical URI for the next page of the list """ previous_page: Optional[ListFaxCoverPagesResponseNavigationPreviousPage] = None """ Canonical URI for the previous page of the list """ last_page: Optional[ListFaxCoverPagesResponseNavigationLastPage] = None """ Canonical URI for the last page of the list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListFaxCoverPagesResponsePaging(DataClassJsonMixin): """ Information on paging """ page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) """ per_page: Optional[int] = None """ Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty """ total_pages: Optional[int] = None """ The total number of pages in a dataset. May be omitted for some resources due to performance reasons """ total_elements: Optional[int] = None """ The total number of elements in a dataset. May be omitted for some resource due to performance reasons """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListFaxCoverPagesResponse(DataClassJsonMixin): uri: Optional[str] = None records: Optional[List[ListFaxCoverPagesResponseRecordsItem]] = None navigation: Optional[ListFaxCoverPagesResponseNavigation] = None """ Information on navigation """ paging: Optional[ListFaxCoverPagesResponsePaging] = None """ Information on paging """ class ListMessagesAvailabilityItem(Enum): Alive = 'Alive' Deleted = 'Deleted' Purged = 'Purged' class ListMessagesDirectionItem(Enum): Inbound = 'Inbound' Outbound = 'Outbound' class ListMessagesMessageTypeItem(Enum): Fax = 'Fax' SMS = 'SMS' VoiceMail = 'VoiceMail' Pager = 'Pager' Text = 'Text' class ListMessagesReadStatusItem(Enum): Read = 'Read' Unread = 'Unread' class ListMessagesResponseRecordsItemAttachmentsItemType(Enum): """ Type of message attachment """ AudioRecording = 'AudioRecording' AudioTranscription = 'AudioTranscription' Text = 'Text' SourceDocument = 'SourceDocument' RenderedDocument = 'RenderedDocument' MmsAttachment = 'MmsAttachment' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListMessagesResponseRecordsItemAttachmentsItem(DataClassJsonMixin): id: Optional[int] = None """ Internal identifier of a message attachment """ uri: Optional[str] = None """ Canonical URI of a message attachment """ type: Optional[ListMessagesResponseRecordsItemAttachmentsItemType] = None """ Type of message attachment """ content_type: Optional[str] = None """ MIME type for a given attachment, for instance 'audio/wav' """ vm_duration: Optional[int] = None """ Supported for `Voicemail` only. Duration of a voicemail in seconds """ file_name: Optional[str] = None """ Name of a file attached """ size: Optional[int] = None """ Size of attachment in bytes """ height: Optional[int] = None """ Attachment height in pixels if available """ width: Optional[int] = None """ Attachment width in pixels if available """ class ListMessagesResponseRecordsItemAvailability(Enum): """ Message availability status. Message in 'Deleted' state is still preserved with all its attachments and can be restored. 'Purged' means that all attachments are already deleted and the message itself is about to be physically deleted shortly Generated by Python OpenAPI Parser """ Alive = 'Alive' Deleted = 'Deleted' Purged = 'Purged' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListMessagesResponseRecordsItemConversation(DataClassJsonMixin): """ SMS and Pager only. Identifier of a conversation the message belongs to """ id: Optional[str] = None """ Internal identifier of a conversation """ uri: Optional[str] = None """ Deprecated. Link to a conversation resource """ class ListMessagesResponseRecordsItemDirection(Enum): """ Message direction. Note that for some message types not all directions are allowed. For example voicemail messages can be only inbound Generated by Python OpenAPI Parser """ Inbound = 'Inbound' Outbound = 'Outbound' class ListMessagesResponseRecordsItemFaxResolution(Enum): """ Fax only. Resolution of a fax message. 'High' for black and white image scanned at 200 dpi, 'Low' for black and white image scanned at 100 dpi Generated by Python OpenAPI Parser """ High = 'High' Low = 'Low' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListMessagesResponseRecordsItemFrom(DataClassJsonMixin): """ Sender information """ extension_number: Optional[str] = None """ Extension short number (usually 3 or 4 digits). This property is filled when parties communicate by means of short internal numbers, for example when calling to other extension or sending/receiving Company Pager message """ extension_id: Optional[str] = None """ Internal identifier of an extension """ location: Optional[str] = None """ Contains party location (city, state) if one can be determined from phoneNumber. This property is filled only when phoneNumber is not empty and server can calculate location information from it (for example, this information is unavailable for US toll-free numbers) """ name: Optional[str] = None """ Symbolic name associated with a party. If the phone does not belong to the known extension, only the location is returned, the name is not determined then """ phone_number: Optional[str] = None """ Phone number of a party. Usually it is a plain number including country and area code like 18661234567. But sometimes it could be returned from database with some formatting applied, for example (866)123-4567. This property is filled in all cases where parties communicate by means of global phone numbers, for example when calling to direct numbers or sending/receiving SMS """ class ListMessagesResponseRecordsItemMessageStatus(Enum): """ Message status. Different message types may have different allowed status values. For outbound faxes the aggregated message status is returned: If status for at least one recipient is 'Queued', then 'Queued' value is returned If status for at least one recipient is 'SendingFailed', then 'SendingFailed' value is returned In other cases Sent status is returned Generated by Python OpenAPI Parser """ Queued = 'Queued' Sent = 'Sent' Delivered = 'Delivered' DeliveryFailed = 'DeliveryFailed' SendingFailed = 'SendingFailed' Received = 'Received' class ListMessagesResponseRecordsItemPriority(Enum): """ Message priority """ Normal = 'Normal' High = 'High' class ListMessagesResponseRecordsItemReadStatus(Enum): """ Message read status """ Read = 'Read' Unread = 'Unread' class ListMessagesResponseRecordsItemToItemMessageStatus(Enum): """ Status of a message. Returned for outbound fax messages only """ Queued = 'Queued' Sent = 'Sent' Delivered = 'Delivered' DeliveryFailed = 'DeliveryFailed' SendingFailed = 'SendingFailed' Received = 'Received' class ListMessagesResponseRecordsItemToItemFaxErrorCode(Enum): """ Error code returned in case of fax sending failure. Returned if messageStatus value is 'SendingFailed'. Supported for fax messages only Generated by Python OpenAPI Parser """ AllLinesInUse = 'AllLinesInUse' Undefined = 'Undefined' NoFaxSendPermission = 'NoFaxSendPermission' NoInternationalPermission = 'NoInternationalPermission' NoFaxMachine = 'NoFaxMachine' NoAnswer = 'NoAnswer' LineBusy = 'LineBusy' CallerHungUp = 'CallerHungUp' NotEnoughCredits = 'NotEnoughCredits' SentPartially = 'SentPartially' InternationalCallingDisabled = 'InternationalCallingDisabled' DestinationCountryDisabled = 'DestinationCountryDisabled' UnknownCountryCode = 'UnknownCountryCode' NotAccepted = 'NotAccepted' InvalidNumber = 'InvalidNumber' CallDeclined = 'CallDeclined' TooManyCallsPerLine = 'TooManyCallsPerLine' CallFailed = 'CallFailed' RenderingFailed = 'RenderingFailed' TooManyPages = 'TooManyPages' ReturnToDBQueue = 'ReturnToDBQueue' NoCallTime = 'NoCallTime' WrongNumber = 'WrongNumber' ProhibitedNumber = 'ProhibitedNumber' InternalError = 'InternalError' FaxSendingProhibited = 'FaxSendingProhibited' ThePhoneIsBlacklisted = 'ThePhoneIsBlacklisted' UserNotFound = 'UserNotFound' ConvertError = 'ConvertError' DBGeneralError = 'DBGeneralError' SkypeBillingFailed = 'SkypeBillingFailed' AccountSuspended = 'AccountSuspended' ProhibitedDestination = 'ProhibitedDestination' InternationalDisabled = 'InternationalDisabled' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListMessagesResponseRecordsItemToItem(DataClassJsonMixin): extension_number: Optional[str] = None """ Extension short number (usually 3 or 4 digits). This property is filled when parties communicate by means of short internal numbers, for example when calling to other extension or sending/receiving Company Pager message """ extension_id: Optional[str] = None location: Optional[str] = None """ Contains party location (city, state) if one can be determined from phoneNumber. This property is filled only when phoneNumber is not empty and server can calculate location information from it (for example, this information is unavailable for US toll-free numbers) """ target: Optional[bool] = None """ 'True' specifies that message is sent exactly to this recipient. Returned in to field for group MMS. Useful if one extension has several phone numbers """ message_status: Optional[ListMessagesResponseRecordsItemToItemMessageStatus] = None """ Status of a message. Returned for outbound fax messages only """ fax_error_code: Optional[ListMessagesResponseRecordsItemToItemFaxErrorCode] = None """ Error code returned in case of fax sending failure. Returned if messageStatus value is 'SendingFailed'. Supported for fax messages only """ name: Optional[str] = None """ Symbolic name associated with a party. If the phone does not belong to the known extension, only the location is returned, the name is not determined then """ phone_number: Optional[str] = None """ Phone number of a party. Usually it is a plain number including country and area code like 18661234567. But sometimes it could be returned from database with some formatting applied, for example (866)123-4567. This property is filled in all cases where parties communicate by means of global phone numbers, for example when calling to direct numbers or sending/receiving SMS """ class ListMessagesResponseRecordsItemType(Enum): """ Message type """ Fax = 'Fax' SMS = 'SMS' VoiceMail = 'VoiceMail' Pager = 'Pager' Text = 'Text' class ListMessagesResponseRecordsItemVmTranscriptionStatus(Enum): """ Voicemail only. Status of voicemail to text transcription. If VoicemailToText feature is not activated for account, the 'NotAvailable' value is returned Generated by Python OpenAPI Parser """ NotAvailable = 'NotAvailable' InProgress = 'InProgress' TimedOut = 'TimedOut' Completed = 'Completed' CompletedPartially = 'CompletedPartially' Failed = 'Failed' Unknown = 'Unknown' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListMessagesResponseRecordsItem(DataClassJsonMixin): id: Optional[int] = None """ Internal identifier of a message """ uri: Optional[str] = None """ Canonical URI of a message """ attachments: Optional[List[ListMessagesResponseRecordsItemAttachmentsItem]] = None """ The list of message attachments """ availability: Optional[ListMessagesResponseRecordsItemAvailability] = None """ Message availability status. Message in 'Deleted' state is still preserved with all its attachments and can be restored. 'Purged' means that all attachments are already deleted and the message itself is about to be physically deleted shortly """ conversation_id: Optional[int] = None """ SMS and Pager only. Identifier of a conversation the message belongs to """ conversation: Optional[ListMessagesResponseRecordsItemConversation] = None """ SMS and Pager only. Identifier of a conversation the message belongs to """ creation_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Message creation datetime in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z """ delivery_error_code: Optional[str] = None """ SMS only. Delivery error code returned by gateway """ direction: Optional[ListMessagesResponseRecordsItemDirection] = None """ Message direction. Note that for some message types not all directions are allowed. For example voicemail messages can be only inbound """ fax_page_count: Optional[int] = None """ Fax only. Page count in a fax message """ fax_resolution: Optional[ListMessagesResponseRecordsItemFaxResolution] = None """ Fax only. Resolution of a fax message. 'High' for black and white image scanned at 200 dpi, 'Low' for black and white image scanned at 100 dpi """ from_: Optional[ListMessagesResponseRecordsItemFrom] = field(metadata=config(field_name='from'), default=None) """ Sender information """ last_modified_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ The datetime when the message was modified on server in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z """ message_status: Optional[ListMessagesResponseRecordsItemMessageStatus] = None """ Message status. Different message types may have different allowed status values. For outbound faxes the aggregated message status is returned: If status for at least one recipient is 'Queued', then 'Queued' value is returned If status for at least one recipient is 'SendingFailed', then 'SendingFailed' value is returned In other cases Sent status is returned """ pg_to_department: Optional[bool] = None """ 'Pager' only. 'True' if at least one of the message recipients is 'Department' extension """ priority: Optional[ListMessagesResponseRecordsItemPriority] = None """ Message priority """ read_status: Optional[ListMessagesResponseRecordsItemReadStatus] = None """ Message read status """ sms_delivery_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ SMS only. The datetime when outbound SMS was delivered to recipient's handset in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z. It is filled only if the carrier sends a delivery receipt to RingCentral """ sms_sending_attempts_count: Optional[int] = None """ SMS only. Number of attempts made to send an outbound SMS to the gateway (if gateway is temporary unavailable) """ subject: Optional[str] = None """ Message subject. For SMS and Pager messages it replicates message text which is also returned as an attachment """ to: Optional[List[ListMessagesResponseRecordsItemToItem]] = None """ Recipient information """ type: Optional[ListMessagesResponseRecordsItemType] = None """ Message type """ vm_transcription_status: Optional[ListMessagesResponseRecordsItemVmTranscriptionStatus] = None """ Voicemail only. Status of voicemail to text transcription. If VoicemailToText feature is not activated for account, the 'NotAvailable' value is returned """ cover_index: Optional[int] = None """ Cover page identifier. For the list of available cover page identifiers please call the Fax Cover Pages method """ cover_page_text: Optional[str] = None """ Cover page text, entered by the fax sender and printed on the cover page. Maximum length is limited to 1024 symbols """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListMessagesResponseNavigationFirstPage(DataClassJsonMixin): """ Canonical URI for the first page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListMessagesResponseNavigationNextPage(DataClassJsonMixin): """ Canonical URI for the next page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListMessagesResponseNavigationPreviousPage(DataClassJsonMixin): """ Canonical URI for the previous page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListMessagesResponseNavigationLastPage(DataClassJsonMixin): """ Canonical URI for the last page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListMessagesResponseNavigation(DataClassJsonMixin): """ Information on navigation """ first_page: Optional[ListMessagesResponseNavigationFirstPage] = None """ Canonical URI for the first page of the list """ next_page: Optional[ListMessagesResponseNavigationNextPage] = None """ Canonical URI for the next page of the list """ previous_page: Optional[ListMessagesResponseNavigationPreviousPage] = None """ Canonical URI for the previous page of the list """ last_page: Optional[ListMessagesResponseNavigationLastPage] = None """ Canonical URI for the last page of the list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListMessagesResponsePaging(DataClassJsonMixin): """ Information on paging """ page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) """ per_page: Optional[int] = None """ Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty """ total_pages: Optional[int] = None """ The total number of pages in a dataset. May be omitted for some resources due to performance reasons """ total_elements: Optional[int] = None """ The total number of elements in a dataset. May be omitted for some resource due to performance reasons """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListMessagesResponse(DataClassJsonMixin): """ Required Properties: - navigation - paging - records Generated by Python OpenAPI Parser """ records: List[ListMessagesResponseRecordsItem] """ List of records with message information """ navigation: ListMessagesResponseNavigation """ Information on navigation """ paging: ListMessagesResponsePaging """ Information on paging """ uri: Optional[str] = None """ Link to the list of user messages """ class DeleteMessageByFilterType(Enum): Fax = 'Fax' SMS = 'SMS' VoiceMail = 'VoiceMail' Pager = 'Pager' Text = 'Text' All = 'All' class ReadMessageResponseAttachmentsItemType(Enum): """ Type of message attachment """ AudioRecording = 'AudioRecording' AudioTranscription = 'AudioTranscription' Text = 'Text' SourceDocument = 'SourceDocument' RenderedDocument = 'RenderedDocument' MmsAttachment = 'MmsAttachment' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadMessageResponseAttachmentsItem(DataClassJsonMixin): id: Optional[int] = None """ Internal identifier of a message attachment """ uri: Optional[str] = None """ Canonical URI of a message attachment """ type: Optional[ReadMessageResponseAttachmentsItemType] = None """ Type of message attachment """ content_type: Optional[str] = None """ MIME type for a given attachment, for instance 'audio/wav' """ vm_duration: Optional[int] = None """ Supported for `Voicemail` only. Duration of a voicemail in seconds """ file_name: Optional[str] = None """ Name of a file attached """ size: Optional[int] = None """ Size of attachment in bytes """ height: Optional[int] = None """ Attachment height in pixels if available """ width: Optional[int] = None """ Attachment width in pixels if available """ class ReadMessageResponseAvailability(Enum): """ Message availability status. Message in 'Deleted' state is still preserved with all its attachments and can be restored. 'Purged' means that all attachments are already deleted and the message itself is about to be physically deleted shortly Generated by Python OpenAPI Parser """ Alive = 'Alive' Deleted = 'Deleted' Purged = 'Purged' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadMessageResponseConversation(DataClassJsonMixin): """ SMS and Pager only. Identifier of a conversation the message belongs to """ id: Optional[str] = None """ Internal identifier of a conversation """ uri: Optional[str] = None """ Deprecated. Link to a conversation resource """ class ReadMessageResponseDirection(Enum): """ Message direction. Note that for some message types not all directions are allowed. For example voicemail messages can be only inbound Generated by Python OpenAPI Parser """ Inbound = 'Inbound' Outbound = 'Outbound' class ReadMessageResponseFaxResolution(Enum): """ Fax only. Resolution of a fax message. 'High' for black and white image scanned at 200 dpi, 'Low' for black and white image scanned at 100 dpi Generated by Python OpenAPI Parser """ High = 'High' Low = 'Low' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadMessageResponseFrom(DataClassJsonMixin): """ Sender information """ extension_number: Optional[str] = None """ Extension short number (usually 3 or 4 digits). This property is filled when parties communicate by means of short internal numbers, for example when calling to other extension or sending/receiving Company Pager message """ extension_id: Optional[str] = None """ Internal identifier of an extension """ location: Optional[str] = None """ Contains party location (city, state) if one can be determined from phoneNumber. This property is filled only when phoneNumber is not empty and server can calculate location information from it (for example, this information is unavailable for US toll-free numbers) """ name: Optional[str] = None """ Symbolic name associated with a party. If the phone does not belong to the known extension, only the location is returned, the name is not determined then """ phone_number: Optional[str] = None """ Phone number of a party. Usually it is a plain number including country and area code like 18661234567. But sometimes it could be returned from database with some formatting applied, for example (866)123-4567. This property is filled in all cases where parties communicate by means of global phone numbers, for example when calling to direct numbers or sending/receiving SMS """ class ReadMessageResponseMessageStatus(Enum): """ Message status. Different message types may have different allowed status values. For outbound faxes the aggregated message status is returned: If status for at least one recipient is 'Queued', then 'Queued' value is returned If status for at least one recipient is 'SendingFailed', then 'SendingFailed' value is returned In other cases Sent status is returned Generated by Python OpenAPI Parser """ Queued = 'Queued' Sent = 'Sent' Delivered = 'Delivered' DeliveryFailed = 'DeliveryFailed' SendingFailed = 'SendingFailed' Received = 'Received' class ReadMessageResponsePriority(Enum): """ Message priority """ Normal = 'Normal' High = 'High' class ReadMessageResponseReadStatus(Enum): """ Message read status """ Read = 'Read' Unread = 'Unread' class ReadMessageResponseToItemMessageStatus(Enum): """ Status of a message. Returned for outbound fax messages only """ Queued = 'Queued' Sent = 'Sent' Delivered = 'Delivered' DeliveryFailed = 'DeliveryFailed' SendingFailed = 'SendingFailed' Received = 'Received' class ReadMessageResponseToItemFaxErrorCode(Enum): """ Error code returned in case of fax sending failure. Returned if messageStatus value is 'SendingFailed'. Supported for fax messages only Generated by Python OpenAPI Parser """ AllLinesInUse = 'AllLinesInUse' Undefined = 'Undefined' NoFaxSendPermission = 'NoFaxSendPermission' NoInternationalPermission = 'NoInternationalPermission' NoFaxMachine = 'NoFaxMachine' NoAnswer = 'NoAnswer' LineBusy = 'LineBusy' CallerHungUp = 'CallerHungUp' NotEnoughCredits = 'NotEnoughCredits' SentPartially = 'SentPartially' InternationalCallingDisabled = 'InternationalCallingDisabled' DestinationCountryDisabled = 'DestinationCountryDisabled' UnknownCountryCode = 'UnknownCountryCode' NotAccepted = 'NotAccepted' InvalidNumber = 'InvalidNumber' CallDeclined = 'CallDeclined' TooManyCallsPerLine = 'TooManyCallsPerLine' CallFailed = 'CallFailed' RenderingFailed = 'RenderingFailed' TooManyPages = 'TooManyPages' ReturnToDBQueue = 'ReturnToDBQueue' NoCallTime = 'NoCallTime' WrongNumber = 'WrongNumber' ProhibitedNumber = 'ProhibitedNumber' InternalError = 'InternalError' FaxSendingProhibited = 'FaxSendingProhibited' ThePhoneIsBlacklisted = 'ThePhoneIsBlacklisted' UserNotFound = 'UserNotFound' ConvertError = 'ConvertError' DBGeneralError = 'DBGeneralError' SkypeBillingFailed = 'SkypeBillingFailed' AccountSuspended = 'AccountSuspended' ProhibitedDestination = 'ProhibitedDestination' InternationalDisabled = 'InternationalDisabled' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadMessageResponseToItem(DataClassJsonMixin): extension_number: Optional[str] = None """ Extension short number (usually 3 or 4 digits). This property is filled when parties communicate by means of short internal numbers, for example when calling to other extension or sending/receiving Company Pager message """ extension_id: Optional[str] = None location: Optional[str] = None """ Contains party location (city, state) if one can be determined from phoneNumber. This property is filled only when phoneNumber is not empty and server can calculate location information from it (for example, this information is unavailable for US toll-free numbers) """ target: Optional[bool] = None """ 'True' specifies that message is sent exactly to this recipient. Returned in to field for group MMS. Useful if one extension has several phone numbers """ message_status: Optional[ReadMessageResponseToItemMessageStatus] = None """ Status of a message. Returned for outbound fax messages only """ fax_error_code: Optional[ReadMessageResponseToItemFaxErrorCode] = None """ Error code returned in case of fax sending failure. Returned if messageStatus value is 'SendingFailed'. Supported for fax messages only """ name: Optional[str] = None """ Symbolic name associated with a party. If the phone does not belong to the known extension, only the location is returned, the name is not determined then """ phone_number: Optional[str] = None """ Phone number of a party. Usually it is a plain number including country and area code like 18661234567. But sometimes it could be returned from database with some formatting applied, for example (866)123-4567. This property is filled in all cases where parties communicate by means of global phone numbers, for example when calling to direct numbers or sending/receiving SMS """ class ReadMessageResponseType(Enum): """ Message type """ Fax = 'Fax' SMS = 'SMS' VoiceMail = 'VoiceMail' Pager = 'Pager' Text = 'Text' class ReadMessageResponseVmTranscriptionStatus(Enum): """ Voicemail only. Status of voicemail to text transcription. If VoicemailToText feature is not activated for account, the 'NotAvailable' value is returned Generated by Python OpenAPI Parser """ NotAvailable = 'NotAvailable' InProgress = 'InProgress' TimedOut = 'TimedOut' Completed = 'Completed' CompletedPartially = 'CompletedPartially' Failed = 'Failed' Unknown = 'Unknown' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadMessageResponse(DataClassJsonMixin): id: Optional[int] = None """ Internal identifier of a message """ uri: Optional[str] = None """ Canonical URI of a message """ attachments: Optional[List[ReadMessageResponseAttachmentsItem]] = None """ The list of message attachments """ availability: Optional[ReadMessageResponseAvailability] = None """ Message availability status. Message in 'Deleted' state is still preserved with all its attachments and can be restored. 'Purged' means that all attachments are already deleted and the message itself is about to be physically deleted shortly """ conversation_id: Optional[int] = None """ SMS and Pager only. Identifier of a conversation the message belongs to """ conversation: Optional[ReadMessageResponseConversation] = None """ SMS and Pager only. Identifier of a conversation the message belongs to """ creation_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Message creation datetime in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z """ delivery_error_code: Optional[str] = None """ SMS only. Delivery error code returned by gateway """ direction: Optional[ReadMessageResponseDirection] = None """ Message direction. Note that for some message types not all directions are allowed. For example voicemail messages can be only inbound """ fax_page_count: Optional[int] = None """ Fax only. Page count in a fax message """ fax_resolution: Optional[ReadMessageResponseFaxResolution] = None """ Fax only. Resolution of a fax message. 'High' for black and white image scanned at 200 dpi, 'Low' for black and white image scanned at 100 dpi """ from_: Optional[ReadMessageResponseFrom] = field(metadata=config(field_name='from'), default=None) """ Sender information """ last_modified_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ The datetime when the message was modified on server in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z """ message_status: Optional[ReadMessageResponseMessageStatus] = None """ Message status. Different message types may have different allowed status values. For outbound faxes the aggregated message status is returned: If status for at least one recipient is 'Queued', then 'Queued' value is returned If status for at least one recipient is 'SendingFailed', then 'SendingFailed' value is returned In other cases Sent status is returned """ pg_to_department: Optional[bool] = None """ 'Pager' only. 'True' if at least one of the message recipients is 'Department' extension """ priority: Optional[ReadMessageResponsePriority] = None """ Message priority """ read_status: Optional[ReadMessageResponseReadStatus] = None """ Message read status """ sms_delivery_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ SMS only. The datetime when outbound SMS was delivered to recipient's handset in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z. It is filled only if the carrier sends a delivery receipt to RingCentral """ sms_sending_attempts_count: Optional[int] = None """ SMS only. Number of attempts made to send an outbound SMS to the gateway (if gateway is temporary unavailable) """ subject: Optional[str] = None """ Message subject. For SMS and Pager messages it replicates message text which is also returned as an attachment """ to: Optional[List[ReadMessageResponseToItem]] = None """ Recipient information """ type: Optional[ReadMessageResponseType] = None """ Message type """ vm_transcription_status: Optional[ReadMessageResponseVmTranscriptionStatus] = None """ Voicemail only. Status of voicemail to text transcription. If VoicemailToText feature is not activated for account, the 'NotAvailable' value is returned """ cover_index: Optional[int] = None """ Cover page identifier. For the list of available cover page identifiers please call the Fax Cover Pages method """ cover_page_text: Optional[str] = None """ Cover page text, entered by the fax sender and printed on the cover page. Maximum length is limited to 1024 symbols """ class ReadMessageResponseBodyAttachmentsItemType(Enum): """ Type of message attachment """ AudioRecording = 'AudioRecording' AudioTranscription = 'AudioTranscription' Text = 'Text' SourceDocument = 'SourceDocument' RenderedDocument = 'RenderedDocument' MmsAttachment = 'MmsAttachment' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadMessageResponseBodyAttachmentsItem(DataClassJsonMixin): id: Optional[int] = None """ Internal identifier of a message attachment """ uri: Optional[str] = None """ Canonical URI of a message attachment """ type: Optional[ReadMessageResponseBodyAttachmentsItemType] = None """ Type of message attachment """ content_type: Optional[str] = None """ MIME type for a given attachment, for instance 'audio/wav' """ vm_duration: Optional[int] = None """ Supported for `Voicemail` only. Duration of a voicemail in seconds """ file_name: Optional[str] = None """ Name of a file attached """ size: Optional[int] = None """ Size of attachment in bytes """ height: Optional[int] = None """ Attachment height in pixels if available """ width: Optional[int] = None """ Attachment width in pixels if available """ class ReadMessageResponseBodyAvailability(Enum): """ Message availability status. Message in 'Deleted' state is still preserved with all its attachments and can be restored. 'Purged' means that all attachments are already deleted and the message itself is about to be physically deleted shortly Generated by Python OpenAPI Parser """ Alive = 'Alive' Deleted = 'Deleted' Purged = 'Purged' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadMessageResponseBodyConversation(DataClassJsonMixin): """ SMS and Pager only. Identifier of a conversation the message belongs to """ id: Optional[str] = None """ Internal identifier of a conversation """ uri: Optional[str] = None """ Deprecated. Link to a conversation resource """ class ReadMessageResponseBodyDirection(Enum): """ Message direction. Note that for some message types not all directions are allowed. For example voicemail messages can be only inbound Generated by Python OpenAPI Parser """ Inbound = 'Inbound' Outbound = 'Outbound' class ReadMessageResponseBodyFaxResolution(Enum): """ Fax only. Resolution of a fax message. 'High' for black and white image scanned at 200 dpi, 'Low' for black and white image scanned at 100 dpi Generated by Python OpenAPI Parser """ High = 'High' Low = 'Low' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadMessageResponseBodyFrom(DataClassJsonMixin): """ Sender information """ extension_number: Optional[str] = None extension_id: Optional[str] = None name: Optional[str] = None class ReadMessageResponseBodyMessageStatus(Enum): """ Message status. Different message types may have different allowed status values.For outbound faxes the aggregated message status is returned: If status for at least one recipient is 'Queued', then 'Queued' value is returned If status for at least one recipient is 'SendingFailed', then 'SendingFailed' value is returned In other cases Sent status is returned Generated by Python OpenAPI Parser """ Queued = 'Queued' Sent = 'Sent' Delivered = 'Delivered' DeliveryFailed = 'DeliveryFailed' SendingFailed = 'SendingFailed' Received = 'Received' class ReadMessageResponseBodyPriority(Enum): """ Message priority """ Normal = 'Normal' High = 'High' class ReadMessageResponseBodyReadStatus(Enum): """ Message read status """ Read = 'Read' Unread = 'Unread' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadMessageResponseBodyToItem(DataClassJsonMixin): extension_number: Optional[str] = None extension_id: Optional[str] = None name: Optional[str] = None class ReadMessageResponseBodyType(Enum): """ Message type """ Fax = 'Fax' SMS = 'SMS' VoiceMail = 'VoiceMail' Pager = 'Pager' Text = 'Text' class ReadMessageResponseBodyVmTranscriptionStatus(Enum): """ Voicemail only. Status of voicemail to text transcription. If VoicemailToText feature is not activated for account, the 'NotAvailable' value is returned Generated by Python OpenAPI Parser """ NotAvailable = 'NotAvailable' InProgress = 'InProgress' TimedOut = 'TimedOut' Completed = 'Completed' CompletedPartially = 'CompletedPartially' Failed = 'Failed' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadMessageResponseBody(DataClassJsonMixin): uri: Optional[str] = None """ Canonical URI of a message """ id: Optional[str] = None """ Internal identifier of a message """ attachments: Optional[List[ReadMessageResponseBodyAttachmentsItem]] = None """ The list of message attachments """ availability: Optional[ReadMessageResponseBodyAvailability] = None """ Message availability status. Message in 'Deleted' state is still preserved with all its attachments and can be restored. 'Purged' means that all attachments are already deleted and the message itself is about to be physically deleted shortly """ conversation_id: Optional[int] = None """ SMS and Pager only. Identifier of a conversation the message belongs to """ conversation: Optional[ReadMessageResponseBodyConversation] = None """ SMS and Pager only. Identifier of a conversation the message belongs to """ creation_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Message creation datetime in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z """ delivery_error_code: Optional[str] = None """ SMS only. Delivery error code returned by gateway """ direction: Optional[ReadMessageResponseBodyDirection] = None """ Message direction. Note that for some message types not all directions are allowed. For example voicemail messages can be only inbound """ fax_page_count: Optional[int] = None """ Fax only. Page count in a fax message """ fax_resolution: Optional[ReadMessageResponseBodyFaxResolution] = None """ Fax only. Resolution of a fax message. 'High' for black and white image scanned at 200 dpi, 'Low' for black and white image scanned at 100 dpi """ from_: Optional[ReadMessageResponseBodyFrom] = field(metadata=config(field_name='from'), default=None) """ Sender information """ last_modified_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ The datetime when the message was modified on server in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z """ message_status: Optional[ReadMessageResponseBodyMessageStatus] = None """ Message status. Different message types may have different allowed status values.For outbound faxes the aggregated message status is returned: If status for at least one recipient is 'Queued', then 'Queued' value is returned If status for at least one recipient is 'SendingFailed', then 'SendingFailed' value is returned In other cases Sent status is returned """ pg_to_department: Optional[bool] = None """ 'Pager' only. 'True' if at least one of the message recipients is 'Department' extension """ priority: Optional[ReadMessageResponseBodyPriority] = None """ Message priority """ read_status: Optional[ReadMessageResponseBodyReadStatus] = None """ Message read status """ sms_delivery_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ SMS only. The datetime when outbound SMS was delivered to recipient's handset in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z. It is filled only if the carrier sends a delivery receipt to RingCentral """ sms_sending_attempts_count: Optional[int] = None """ SMS only. Number of attempts made to send an outbound SMS to the gateway (if gateway is temporary unavailable) """ subject: Optional[str] = None """ Message subject. For SMS and Pager messages it replicates message text which is also returned as an attachment """ to: Optional[List[ReadMessageResponseBodyToItem]] = None """ Recipient information """ type: Optional[ReadMessageResponseBodyType] = None """ Message type """ vm_transcription_status: Optional[ReadMessageResponseBodyVmTranscriptionStatus] = None """ Voicemail only. Status of voicemail to text transcription. If VoicemailToText feature is not activated for account, the 'NotAvailable' value is returned """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadMessageResponse(DataClassJsonMixin): resource_id: Optional[str] = None """ Internal identifier of a resource """ status: Optional[int] = None """ Status code of resource retrieval """ body: Optional[ReadMessageResponseBody] = None class UpdateMessageType(Enum): Fax = 'Fax' SMS = 'SMS' VoiceMail = 'VoiceMail' Pager = 'Pager' Text = 'Text' All = 'All' class UpdateMessageRequestReadStatus(Enum): """ Read status of a message to be changed. Multiple values are accepted """ Read = 'Read' Unread = 'Unread' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateMessageRequest(DataClassJsonMixin): read_status: Optional[UpdateMessageRequestReadStatus] = None """ Read status of a message to be changed. Multiple values are accepted """ class UpdateMessageResponseAttachmentsItemType(Enum): """ Type of message attachment """ AudioRecording = 'AudioRecording' AudioTranscription = 'AudioTranscription' Text = 'Text' SourceDocument = 'SourceDocument' RenderedDocument = 'RenderedDocument' MmsAttachment = 'MmsAttachment' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateMessageResponseAttachmentsItem(DataClassJsonMixin): id: Optional[int] = None """ Internal identifier of a message attachment """ uri: Optional[str] = None """ Canonical URI of a message attachment """ type: Optional[UpdateMessageResponseAttachmentsItemType] = None """ Type of message attachment """ content_type: Optional[str] = None """ MIME type for a given attachment, for instance 'audio/wav' """ vm_duration: Optional[int] = None """ Supported for `Voicemail` only. Duration of a voicemail in seconds """ file_name: Optional[str] = None """ Name of a file attached """ size: Optional[int] = None """ Size of attachment in bytes """ height: Optional[int] = None """ Attachment height in pixels if available """ width: Optional[int] = None """ Attachment width in pixels if available """ class UpdateMessageResponseAvailability(Enum): """ Message availability status. Message in 'Deleted' state is still preserved with all its attachments and can be restored. 'Purged' means that all attachments are already deleted and the message itself is about to be physically deleted shortly Generated by Python OpenAPI Parser """ Alive = 'Alive' Deleted = 'Deleted' Purged = 'Purged' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateMessageResponseConversation(DataClassJsonMixin): """ SMS and Pager only. Identifier of a conversation the message belongs to """ id: Optional[str] = None """ Internal identifier of a conversation """ uri: Optional[str] = None """ Deprecated. Link to a conversation resource """ class UpdateMessageResponseDirection(Enum): """ Message direction. Note that for some message types not all directions are allowed. For example voicemail messages can be only inbound Generated by Python OpenAPI Parser """ Inbound = 'Inbound' Outbound = 'Outbound' class UpdateMessageResponseFaxResolution(Enum): """ Fax only. Resolution of a fax message. 'High' for black and white image scanned at 200 dpi, 'Low' for black and white image scanned at 100 dpi Generated by Python OpenAPI Parser """ High = 'High' Low = 'Low' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateMessageResponseFrom(DataClassJsonMixin): """ Sender information """ extension_number: Optional[str] = None """ Extension short number (usually 3 or 4 digits). This property is filled when parties communicate by means of short internal numbers, for example when calling to other extension or sending/receiving Company Pager message """ extension_id: Optional[str] = None """ Internal identifier of an extension """ location: Optional[str] = None """ Contains party location (city, state) if one can be determined from phoneNumber. This property is filled only when phoneNumber is not empty and server can calculate location information from it (for example, this information is unavailable for US toll-free numbers) """ name: Optional[str] = None """ Symbolic name associated with a party. If the phone does not belong to the known extension, only the location is returned, the name is not determined then """ phone_number: Optional[str] = None """ Phone number of a party. Usually it is a plain number including country and area code like 18661234567. But sometimes it could be returned from database with some formatting applied, for example (866)123-4567. This property is filled in all cases where parties communicate by means of global phone numbers, for example when calling to direct numbers or sending/receiving SMS """ class UpdateMessageResponseMessageStatus(Enum): """ Message status. Different message types may have different allowed status values. For outbound faxes the aggregated message status is returned: If status for at least one recipient is 'Queued', then 'Queued' value is returned If status for at least one recipient is 'SendingFailed', then 'SendingFailed' value is returned In other cases Sent status is returned Generated by Python OpenAPI Parser """ Queued = 'Queued' Sent = 'Sent' Delivered = 'Delivered' DeliveryFailed = 'DeliveryFailed' SendingFailed = 'SendingFailed' Received = 'Received' class UpdateMessageResponsePriority(Enum): """ Message priority """ Normal = 'Normal' High = 'High' class UpdateMessageResponseReadStatus(Enum): """ Message read status """ Read = 'Read' Unread = 'Unread' class UpdateMessageResponseToItemMessageStatus(Enum): """ Status of a message. Returned for outbound fax messages only """ Queued = 'Queued' Sent = 'Sent' Delivered = 'Delivered' DeliveryFailed = 'DeliveryFailed' SendingFailed = 'SendingFailed' Received = 'Received' class UpdateMessageResponseToItemFaxErrorCode(Enum): """ Error code returned in case of fax sending failure. Returned if messageStatus value is 'SendingFailed'. Supported for fax messages only Generated by Python OpenAPI Parser """ AllLinesInUse = 'AllLinesInUse' Undefined = 'Undefined' NoFaxSendPermission = 'NoFaxSendPermission' NoInternationalPermission = 'NoInternationalPermission' NoFaxMachine = 'NoFaxMachine' NoAnswer = 'NoAnswer' LineBusy = 'LineBusy' CallerHungUp = 'CallerHungUp' NotEnoughCredits = 'NotEnoughCredits' SentPartially = 'SentPartially' InternationalCallingDisabled = 'InternationalCallingDisabled' DestinationCountryDisabled = 'DestinationCountryDisabled' UnknownCountryCode = 'UnknownCountryCode' NotAccepted = 'NotAccepted' InvalidNumber = 'InvalidNumber' CallDeclined = 'CallDeclined' TooManyCallsPerLine = 'TooManyCallsPerLine' CallFailed = 'CallFailed' RenderingFailed = 'RenderingFailed' TooManyPages = 'TooManyPages' ReturnToDBQueue = 'ReturnToDBQueue' NoCallTime = 'NoCallTime' WrongNumber = 'WrongNumber' ProhibitedNumber = 'ProhibitedNumber' InternalError = 'InternalError' FaxSendingProhibited = 'FaxSendingProhibited' ThePhoneIsBlacklisted = 'ThePhoneIsBlacklisted' UserNotFound = 'UserNotFound' ConvertError = 'ConvertError' DBGeneralError = 'DBGeneralError' SkypeBillingFailed = 'SkypeBillingFailed' AccountSuspended = 'AccountSuspended' ProhibitedDestination = 'ProhibitedDestination' InternationalDisabled = 'InternationalDisabled' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateMessageResponseToItem(DataClassJsonMixin): extension_number: Optional[str] = None """ Extension short number (usually 3 or 4 digits). This property is filled when parties communicate by means of short internal numbers, for example when calling to other extension or sending/receiving Company Pager message """ extension_id: Optional[str] = None location: Optional[str] = None """ Contains party location (city, state) if one can be determined from phoneNumber. This property is filled only when phoneNumber is not empty and server can calculate location information from it (for example, this information is unavailable for US toll-free numbers) """ target: Optional[bool] = None """ 'True' specifies that message is sent exactly to this recipient. Returned in to field for group MMS. Useful if one extension has several phone numbers """ message_status: Optional[UpdateMessageResponseToItemMessageStatus] = None """ Status of a message. Returned for outbound fax messages only """ fax_error_code: Optional[UpdateMessageResponseToItemFaxErrorCode] = None """ Error code returned in case of fax sending failure. Returned if messageStatus value is 'SendingFailed'. Supported for fax messages only """ name: Optional[str] = None """ Symbolic name associated with a party. If the phone does not belong to the known extension, only the location is returned, the name is not determined then """ phone_number: Optional[str] = None """ Phone number of a party. Usually it is a plain number including country and area code like 18661234567. But sometimes it could be returned from database with some formatting applied, for example (866)123-4567. This property is filled in all cases where parties communicate by means of global phone numbers, for example when calling to direct numbers or sending/receiving SMS """ class UpdateMessageResponseType(Enum): """ Message type """ Fax = 'Fax' SMS = 'SMS' VoiceMail = 'VoiceMail' Pager = 'Pager' Text = 'Text' class UpdateMessageResponseVmTranscriptionStatus(Enum): """ Voicemail only. Status of voicemail to text transcription. If VoicemailToText feature is not activated for account, the 'NotAvailable' value is returned Generated by Python OpenAPI Parser """ NotAvailable = 'NotAvailable' InProgress = 'InProgress' TimedOut = 'TimedOut' Completed = 'Completed' CompletedPartially = 'CompletedPartially' Failed = 'Failed' Unknown = 'Unknown' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateMessageResponse(DataClassJsonMixin): id: Optional[int] = None """ Internal identifier of a message """ uri: Optional[str] = None """ Canonical URI of a message """ attachments: Optional[List[UpdateMessageResponseAttachmentsItem]] = None """ The list of message attachments """ availability: Optional[UpdateMessageResponseAvailability] = None """ Message availability status. Message in 'Deleted' state is still preserved with all its attachments and can be restored. 'Purged' means that all attachments are already deleted and the message itself is about to be physically deleted shortly """ conversation_id: Optional[int] = None """ SMS and Pager only. Identifier of a conversation the message belongs to """ conversation: Optional[UpdateMessageResponseConversation] = None """ SMS and Pager only. Identifier of a conversation the message belongs to """ creation_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Message creation datetime in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z """ delivery_error_code: Optional[str] = None """ SMS only. Delivery error code returned by gateway """ direction: Optional[UpdateMessageResponseDirection] = None """ Message direction. Note that for some message types not all directions are allowed. For example voicemail messages can be only inbound """ fax_page_count: Optional[int] = None """ Fax only. Page count in a fax message """ fax_resolution: Optional[UpdateMessageResponseFaxResolution] = None """ Fax only. Resolution of a fax message. 'High' for black and white image scanned at 200 dpi, 'Low' for black and white image scanned at 100 dpi """ from_: Optional[UpdateMessageResponseFrom] = field(metadata=config(field_name='from'), default=None) """ Sender information """ last_modified_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ The datetime when the message was modified on server in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z """ message_status: Optional[UpdateMessageResponseMessageStatus] = None """ Message status. Different message types may have different allowed status values. For outbound faxes the aggregated message status is returned: If status for at least one recipient is 'Queued', then 'Queued' value is returned If status for at least one recipient is 'SendingFailed', then 'SendingFailed' value is returned In other cases Sent status is returned """ pg_to_department: Optional[bool] = None """ 'Pager' only. 'True' if at least one of the message recipients is 'Department' extension """ priority: Optional[UpdateMessageResponsePriority] = None """ Message priority """ read_status: Optional[UpdateMessageResponseReadStatus] = None """ Message read status """ sms_delivery_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ SMS only. The datetime when outbound SMS was delivered to recipient's handset in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z. It is filled only if the carrier sends a delivery receipt to RingCentral """ sms_sending_attempts_count: Optional[int] = None """ SMS only. Number of attempts made to send an outbound SMS to the gateway (if gateway is temporary unavailable) """ subject: Optional[str] = None """ Message subject. For SMS and Pager messages it replicates message text which is also returned as an attachment """ to: Optional[List[UpdateMessageResponseToItem]] = None """ Recipient information """ type: Optional[UpdateMessageResponseType] = None """ Message type """ vm_transcription_status: Optional[UpdateMessageResponseVmTranscriptionStatus] = None """ Voicemail only. Status of voicemail to text transcription. If VoicemailToText feature is not activated for account, the 'NotAvailable' value is returned """ cover_index: Optional[int] = None """ Cover page identifier. For the list of available cover page identifiers please call the Fax Cover Pages method """ cover_page_text: Optional[str] = None """ Cover page text, entered by the fax sender and printed on the cover page. Maximum length is limited to 1024 symbols """ class UpdateMessageResponseBodyAttachmentsItemType(Enum): """ Type of message attachment """ AudioRecording = 'AudioRecording' AudioTranscription = 'AudioTranscription' Text = 'Text' SourceDocument = 'SourceDocument' RenderedDocument = 'RenderedDocument' MmsAttachment = 'MmsAttachment' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateMessageResponseBodyAttachmentsItem(DataClassJsonMixin): id: Optional[int] = None """ Internal identifier of a message attachment """ uri: Optional[str] = None """ Canonical URI of a message attachment """ type: Optional[UpdateMessageResponseBodyAttachmentsItemType] = None """ Type of message attachment """ content_type: Optional[str] = None """ MIME type for a given attachment, for instance 'audio/wav' """ vm_duration: Optional[int] = None """ Supported for `Voicemail` only. Duration of a voicemail in seconds """ file_name: Optional[str] = None """ Name of a file attached """ size: Optional[int] = None """ Size of attachment in bytes """ height: Optional[int] = None """ Attachment height in pixels if available """ width: Optional[int] = None """ Attachment width in pixels if available """ class UpdateMessageResponseBodyAvailability(Enum): """ Message availability status. Message in 'Deleted' state is still preserved with all its attachments and can be restored. 'Purged' means that all attachments are already deleted and the message itself is about to be physically deleted shortly Generated by Python OpenAPI Parser """ Alive = 'Alive' Deleted = 'Deleted' Purged = 'Purged' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateMessageResponseBodyConversation(DataClassJsonMixin): """ SMS and Pager only. Identifier of a conversation the message belongs to """ id: Optional[str] = None """ Internal identifier of a conversation """ uri: Optional[str] = None """ Deprecated. Link to a conversation resource """ class UpdateMessageResponseBodyDirection(Enum): """ Message direction. Note that for some message types not all directions are allowed. For example voicemail messages can be only inbound Generated by Python OpenAPI Parser """ Inbound = 'Inbound' Outbound = 'Outbound' class UpdateMessageResponseBodyFaxResolution(Enum): """ Fax only. Resolution of a fax message. 'High' for black and white image scanned at 200 dpi, 'Low' for black and white image scanned at 100 dpi Generated by Python OpenAPI Parser """ High = 'High' Low = 'Low' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateMessageResponseBodyFrom(DataClassJsonMixin): """ Sender information """ extension_number: Optional[str] = None extension_id: Optional[str] = None name: Optional[str] = None class UpdateMessageResponseBodyMessageStatus(Enum): """ Message status. Different message types may have different allowed status values.For outbound faxes the aggregated message status is returned: If status for at least one recipient is 'Queued', then 'Queued' value is returned If status for at least one recipient is 'SendingFailed', then 'SendingFailed' value is returned In other cases Sent status is returned Generated by Python OpenAPI Parser """ Queued = 'Queued' Sent = 'Sent' Delivered = 'Delivered' DeliveryFailed = 'DeliveryFailed' SendingFailed = 'SendingFailed' Received = 'Received' class UpdateMessageResponseBodyPriority(Enum): """ Message priority """ Normal = 'Normal' High = 'High' class UpdateMessageResponseBodyReadStatus(Enum): """ Message read status """ Read = 'Read' Unread = 'Unread' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateMessageResponseBodyToItem(DataClassJsonMixin): extension_number: Optional[str] = None extension_id: Optional[str] = None name: Optional[str] = None class UpdateMessageResponseBodyType(Enum): """ Message type """ Fax = 'Fax' SMS = 'SMS' VoiceMail = 'VoiceMail' Pager = 'Pager' Text = 'Text' class UpdateMessageResponseBodyVmTranscriptionStatus(Enum): """ Voicemail only. Status of voicemail to text transcription. If VoicemailToText feature is not activated for account, the 'NotAvailable' value is returned Generated by Python OpenAPI Parser """ NotAvailable = 'NotAvailable' InProgress = 'InProgress' TimedOut = 'TimedOut' Completed = 'Completed' CompletedPartially = 'CompletedPartially' Failed = 'Failed' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateMessageResponseBody(DataClassJsonMixin): uri: Optional[str] = None """ Canonical URI of a message """ id: Optional[str] = None """ Internal identifier of a message """ attachments: Optional[List[UpdateMessageResponseBodyAttachmentsItem]] = None """ The list of message attachments """ availability: Optional[UpdateMessageResponseBodyAvailability] = None """ Message availability status. Message in 'Deleted' state is still preserved with all its attachments and can be restored. 'Purged' means that all attachments are already deleted and the message itself is about to be physically deleted shortly """ conversation_id: Optional[int] = None """ SMS and Pager only. Identifier of a conversation the message belongs to """ conversation: Optional[UpdateMessageResponseBodyConversation] = None """ SMS and Pager only. Identifier of a conversation the message belongs to """ creation_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Message creation datetime in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z """ delivery_error_code: Optional[str] = None """ SMS only. Delivery error code returned by gateway """ direction: Optional[UpdateMessageResponseBodyDirection] = None """ Message direction. Note that for some message types not all directions are allowed. For example voicemail messages can be only inbound """ fax_page_count: Optional[int] = None """ Fax only. Page count in a fax message """ fax_resolution: Optional[UpdateMessageResponseBodyFaxResolution] = None """ Fax only. Resolution of a fax message. 'High' for black and white image scanned at 200 dpi, 'Low' for black and white image scanned at 100 dpi """ from_: Optional[UpdateMessageResponseBodyFrom] = field(metadata=config(field_name='from'), default=None) """ Sender information """ last_modified_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ The datetime when the message was modified on server in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z """ message_status: Optional[UpdateMessageResponseBodyMessageStatus] = None """ Message status. Different message types may have different allowed status values.For outbound faxes the aggregated message status is returned: If status for at least one recipient is 'Queued', then 'Queued' value is returned If status for at least one recipient is 'SendingFailed', then 'SendingFailed' value is returned In other cases Sent status is returned """ pg_to_department: Optional[bool] = None """ 'Pager' only. 'True' if at least one of the message recipients is 'Department' extension """ priority: Optional[UpdateMessageResponseBodyPriority] = None """ Message priority """ read_status: Optional[UpdateMessageResponseBodyReadStatus] = None """ Message read status """ sms_delivery_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ SMS only. The datetime when outbound SMS was delivered to recipient's handset in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z. It is filled only if the carrier sends a delivery receipt to RingCentral """ sms_sending_attempts_count: Optional[int] = None """ SMS only. Number of attempts made to send an outbound SMS to the gateway (if gateway is temporary unavailable) """ subject: Optional[str] = None """ Message subject. For SMS and Pager messages it replicates message text which is also returned as an attachment """ to: Optional[List[UpdateMessageResponseBodyToItem]] = None """ Recipient information """ type: Optional[UpdateMessageResponseBodyType] = None """ Message type """ vm_transcription_status: Optional[UpdateMessageResponseBodyVmTranscriptionStatus] = None """ Voicemail only. Status of voicemail to text transcription. If VoicemailToText feature is not activated for account, the 'NotAvailable' value is returned """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateMessageResponse(DataClassJsonMixin): resource_id: Optional[str] = None """ Internal identifier of a resource """ status: Optional[int] = None """ Status code of resource retrieval """ body: Optional[UpdateMessageResponseBody] = None class ReadMessageContentContentDisposition(Enum): Inline = 'Inline' Attachment = 'Attachment' class SyncMessagesDirectionItem(Enum): Inbound = 'Inbound' Outbound = 'Outbound' class SyncMessagesMessageTypeItem(Enum): Fax = 'Fax' SMS = 'SMS' VoiceMail = 'VoiceMail' Pager = 'Pager' Text = 'Text' class SyncMessagesSyncTypeItem(Enum): FSync = 'FSync' ISync = 'ISync' class SyncMessagesResponseRecordsItemAttachmentsItemType(Enum): """ Type of message attachment """ AudioRecording = 'AudioRecording' AudioTranscription = 'AudioTranscription' Text = 'Text' SourceDocument = 'SourceDocument' RenderedDocument = 'RenderedDocument' MmsAttachment = 'MmsAttachment' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SyncMessagesResponseRecordsItemAttachmentsItem(DataClassJsonMixin): id: Optional[int] = None """ Internal identifier of a message attachment """ uri: Optional[str] = None """ Canonical URI of a message attachment """ type: Optional[SyncMessagesResponseRecordsItemAttachmentsItemType] = None """ Type of message attachment """ content_type: Optional[str] = None """ MIME type for a given attachment, for instance 'audio/wav' """ vm_duration: Optional[int] = None """ Supported for `Voicemail` only. Duration of a voicemail in seconds """ file_name: Optional[str] = None """ Name of a file attached """ size: Optional[int] = None """ Size of attachment in bytes """ height: Optional[int] = None """ Attachment height in pixels if available """ width: Optional[int] = None """ Attachment width in pixels if available """ class SyncMessagesResponseRecordsItemAvailability(Enum): """ Message availability status. Message in 'Deleted' state is still preserved with all its attachments and can be restored. 'Purged' means that all attachments are already deleted and the message itself is about to be physically deleted shortly Generated by Python OpenAPI Parser """ Alive = 'Alive' Deleted = 'Deleted' Purged = 'Purged' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SyncMessagesResponseRecordsItemConversation(DataClassJsonMixin): """ SMS and Pager only. Identifier of a conversation the message belongs to """ id: Optional[str] = None """ Internal identifier of a conversation """ uri: Optional[str] = None """ Deprecated. Link to a conversation resource """ class SyncMessagesResponseRecordsItemDirection(Enum): """ Message direction. Note that for some message types not all directions are allowed. For example voicemail messages can be only inbound Generated by Python OpenAPI Parser """ Inbound = 'Inbound' Outbound = 'Outbound' class SyncMessagesResponseRecordsItemFaxResolution(Enum): """ Fax only. Resolution of a fax message. 'High' for black and white image scanned at 200 dpi, 'Low' for black and white image scanned at 100 dpi Generated by Python OpenAPI Parser """ High = 'High' Low = 'Low' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SyncMessagesResponseRecordsItemFrom(DataClassJsonMixin): """ Sender information """ extension_number: Optional[str] = None """ Extension short number (usually 3 or 4 digits). This property is filled when parties communicate by means of short internal numbers, for example when calling to other extension or sending/receiving Company Pager message """ extension_id: Optional[str] = None """ Internal identifier of an extension """ location: Optional[str] = None """ Contains party location (city, state) if one can be determined from phoneNumber. This property is filled only when phoneNumber is not empty and server can calculate location information from it (for example, this information is unavailable for US toll-free numbers) """ name: Optional[str] = None """ Symbolic name associated with a party. If the phone does not belong to the known extension, only the location is returned, the name is not determined then """ phone_number: Optional[str] = None """ Phone number of a party. Usually it is a plain number including country and area code like 18661234567. But sometimes it could be returned from database with some formatting applied, for example (866)123-4567. This property is filled in all cases where parties communicate by means of global phone numbers, for example when calling to direct numbers or sending/receiving SMS """ class SyncMessagesResponseRecordsItemMessageStatus(Enum): """ Message status. Different message types may have different allowed status values. For outbound faxes the aggregated message status is returned: If status for at least one recipient is 'Queued', then 'Queued' value is returned If status for at least one recipient is 'SendingFailed', then 'SendingFailed' value is returned In other cases Sent status is returned Generated by Python OpenAPI Parser """ Queued = 'Queued' Sent = 'Sent' Delivered = 'Delivered' DeliveryFailed = 'DeliveryFailed' SendingFailed = 'SendingFailed' Received = 'Received' class SyncMessagesResponseRecordsItemPriority(Enum): """ Message priority """ Normal = 'Normal' High = 'High' class SyncMessagesResponseRecordsItemReadStatus(Enum): """ Message read status """ Read = 'Read' Unread = 'Unread' class SyncMessagesResponseRecordsItemToItemMessageStatus(Enum): """ Status of a message. Returned for outbound fax messages only """ Queued = 'Queued' Sent = 'Sent' Delivered = 'Delivered' DeliveryFailed = 'DeliveryFailed' SendingFailed = 'SendingFailed' Received = 'Received' class SyncMessagesResponseRecordsItemToItemFaxErrorCode(Enum): """ Error code returned in case of fax sending failure. Returned if messageStatus value is 'SendingFailed'. Supported for fax messages only Generated by Python OpenAPI Parser """ AllLinesInUse = 'AllLinesInUse' Undefined = 'Undefined' NoFaxSendPermission = 'NoFaxSendPermission' NoInternationalPermission = 'NoInternationalPermission' NoFaxMachine = 'NoFaxMachine' NoAnswer = 'NoAnswer' LineBusy = 'LineBusy' CallerHungUp = 'CallerHungUp' NotEnoughCredits = 'NotEnoughCredits' SentPartially = 'SentPartially' InternationalCallingDisabled = 'InternationalCallingDisabled' DestinationCountryDisabled = 'DestinationCountryDisabled' UnknownCountryCode = 'UnknownCountryCode' NotAccepted = 'NotAccepted' InvalidNumber = 'InvalidNumber' CallDeclined = 'CallDeclined' TooManyCallsPerLine = 'TooManyCallsPerLine' CallFailed = 'CallFailed' RenderingFailed = 'RenderingFailed' TooManyPages = 'TooManyPages' ReturnToDBQueue = 'ReturnToDBQueue' NoCallTime = 'NoCallTime' WrongNumber = 'WrongNumber' ProhibitedNumber = 'ProhibitedNumber' InternalError = 'InternalError' FaxSendingProhibited = 'FaxSendingProhibited' ThePhoneIsBlacklisted = 'ThePhoneIsBlacklisted' UserNotFound = 'UserNotFound' ConvertError = 'ConvertError' DBGeneralError = 'DBGeneralError' SkypeBillingFailed = 'SkypeBillingFailed' AccountSuspended = 'AccountSuspended' ProhibitedDestination = 'ProhibitedDestination' InternationalDisabled = 'InternationalDisabled' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SyncMessagesResponseRecordsItemToItem(DataClassJsonMixin): extension_number: Optional[str] = None """ Extension short number (usually 3 or 4 digits). This property is filled when parties communicate by means of short internal numbers, for example when calling to other extension or sending/receiving Company Pager message """ extension_id: Optional[str] = None location: Optional[str] = None """ Contains party location (city, state) if one can be determined from phoneNumber. This property is filled only when phoneNumber is not empty and server can calculate location information from it (for example, this information is unavailable for US toll-free numbers) """ target: Optional[bool] = None """ 'True' specifies that message is sent exactly to this recipient. Returned in to field for group MMS. Useful if one extension has several phone numbers """ message_status: Optional[SyncMessagesResponseRecordsItemToItemMessageStatus] = None """ Status of a message. Returned for outbound fax messages only """ fax_error_code: Optional[SyncMessagesResponseRecordsItemToItemFaxErrorCode] = None """ Error code returned in case of fax sending failure. Returned if messageStatus value is 'SendingFailed'. Supported for fax messages only """ name: Optional[str] = None """ Symbolic name associated with a party. If the phone does not belong to the known extension, only the location is returned, the name is not determined then """ phone_number: Optional[str] = None """ Phone number of a party. Usually it is a plain number including country and area code like 18661234567. But sometimes it could be returned from database with some formatting applied, for example (866)123-4567. This property is filled in all cases where parties communicate by means of global phone numbers, for example when calling to direct numbers or sending/receiving SMS """ class SyncMessagesResponseRecordsItemType(Enum): """ Message type """ Fax = 'Fax' SMS = 'SMS' VoiceMail = 'VoiceMail' Pager = 'Pager' Text = 'Text' class SyncMessagesResponseRecordsItemVmTranscriptionStatus(Enum): """ Voicemail only. Status of voicemail to text transcription. If VoicemailToText feature is not activated for account, the 'NotAvailable' value is returned Generated by Python OpenAPI Parser """ NotAvailable = 'NotAvailable' InProgress = 'InProgress' TimedOut = 'TimedOut' Completed = 'Completed' CompletedPartially = 'CompletedPartially' Failed = 'Failed' Unknown = 'Unknown' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SyncMessagesResponseRecordsItem(DataClassJsonMixin): id: Optional[int] = None """ Internal identifier of a message """ uri: Optional[str] = None """ Canonical URI of a message """ attachments: Optional[List[SyncMessagesResponseRecordsItemAttachmentsItem]] = None """ The list of message attachments """ availability: Optional[SyncMessagesResponseRecordsItemAvailability] = None """ Message availability status. Message in 'Deleted' state is still preserved with all its attachments and can be restored. 'Purged' means that all attachments are already deleted and the message itself is about to be physically deleted shortly """ conversation_id: Optional[int] = None """ SMS and Pager only. Identifier of a conversation the message belongs to """ conversation: Optional[SyncMessagesResponseRecordsItemConversation] = None """ SMS and Pager only. Identifier of a conversation the message belongs to """ creation_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Message creation datetime in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z """ delivery_error_code: Optional[str] = None """ SMS only. Delivery error code returned by gateway """ direction: Optional[SyncMessagesResponseRecordsItemDirection] = None """ Message direction. Note that for some message types not all directions are allowed. For example voicemail messages can be only inbound """ fax_page_count: Optional[int] = None """ Fax only. Page count in a fax message """ fax_resolution: Optional[SyncMessagesResponseRecordsItemFaxResolution] = None """ Fax only. Resolution of a fax message. 'High' for black and white image scanned at 200 dpi, 'Low' for black and white image scanned at 100 dpi """ from_: Optional[SyncMessagesResponseRecordsItemFrom] = field(metadata=config(field_name='from'), default=None) """ Sender information """ last_modified_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ The datetime when the message was modified on server in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z """ message_status: Optional[SyncMessagesResponseRecordsItemMessageStatus] = None """ Message status. Different message types may have different allowed status values. For outbound faxes the aggregated message status is returned: If status for at least one recipient is 'Queued', then 'Queued' value is returned If status for at least one recipient is 'SendingFailed', then 'SendingFailed' value is returned In other cases Sent status is returned """ pg_to_department: Optional[bool] = None """ 'Pager' only. 'True' if at least one of the message recipients is 'Department' extension """ priority: Optional[SyncMessagesResponseRecordsItemPriority] = None """ Message priority """ read_status: Optional[SyncMessagesResponseRecordsItemReadStatus] = None """ Message read status """ sms_delivery_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ SMS only. The datetime when outbound SMS was delivered to recipient's handset in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z. It is filled only if the carrier sends a delivery receipt to RingCentral """ sms_sending_attempts_count: Optional[int] = None """ SMS only. Number of attempts made to send an outbound SMS to the gateway (if gateway is temporary unavailable) """ subject: Optional[str] = None """ Message subject. For SMS and Pager messages it replicates message text which is also returned as an attachment """ to: Optional[List[SyncMessagesResponseRecordsItemToItem]] = None """ Recipient information """ type: Optional[SyncMessagesResponseRecordsItemType] = None """ Message type """ vm_transcription_status: Optional[SyncMessagesResponseRecordsItemVmTranscriptionStatus] = None """ Voicemail only. Status of voicemail to text transcription. If VoicemailToText feature is not activated for account, the 'NotAvailable' value is returned """ cover_index: Optional[int] = None """ Cover page identifier. For the list of available cover page identifiers please call the Fax Cover Pages method """ cover_page_text: Optional[str] = None """ Cover page text, entered by the fax sender and printed on the cover page. Maximum length is limited to 1024 symbols """ class SyncMessagesResponseSyncInfoSyncType(Enum): """ Type of synchronization """ FSync = 'FSync' ISync = 'ISync' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SyncMessagesResponseSyncInfo(DataClassJsonMixin): """ Sync type, token and time """ sync_type: Optional[SyncMessagesResponseSyncInfoSyncType] = None """ Type of synchronization """ sync_token: Optional[str] = None """ Synchronization token """ sync_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Last synchronization datetime in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z """ older_records_exist: Optional[bool] = False @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SyncMessagesResponse(DataClassJsonMixin): """ Required Properties: - records - sync_info Generated by Python OpenAPI Parser """ records: List[SyncMessagesResponseRecordsItem] """ List of message records with synchronization information """ sync_info: SyncMessagesResponseSyncInfo """ Sync type, token and time """ uri: Optional[str] = None """ Link to the message sync resource """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadMessageStoreConfigurationResponse(DataClassJsonMixin): retention_period: Optional[int] = None """ Retention policy setting, specifying how long to keep messages; the supported value range is 7-90 days """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateMessageStoreConfigurationRequest(DataClassJsonMixin): retention_period: Optional[int] = None """ Retention policy setting, specifying how long to keep messages; the supported value range is 7-90 days """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateMessageStoreConfigurationResponse(DataClassJsonMixin): retention_period: Optional[int] = None """ Retention policy setting, specifying how long to keep messages; the supported value range is 7-90 days """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateRingOutCallRequestFrom(DataClassJsonMixin): """ Phone number of the caller. This number corresponds to the 1st leg of the RingOut call. This number can be one of user's configured forwarding numbers or arbitrary number Generated by Python OpenAPI Parser """ phone_number: Optional[str] = None """ Phone number in E.164 format """ forwarding_number_id: Optional[str] = None """ Internal identifier of a forwarding number; returned in response as an 'id' field value. Can be specified instead of the phoneNumber attribute """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateRingOutCallRequestTo(DataClassJsonMixin): """ Phone number of the called party. This number corresponds to the 2nd leg of a RingOut call """ phone_number: Optional[str] = None """ Phone number in E.164 format """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateRingOutCallRequestCallerId(DataClassJsonMixin): """ The number which will be displayed to the called party """ phone_number: Optional[str] = None """ Phone number in E.164 format """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateRingOutCallRequestCountry(DataClassJsonMixin): """ Optional. Dialing plan country data. If not specified, then extension home country is applied by default Generated by Python OpenAPI Parser """ id: Optional[str] = None """ Dialing plan country identifier """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateRingOutCallRequest(DataClassJsonMixin): """ Required Properties: - from_ - to Generated by Python OpenAPI Parser """ from_: CreateRingOutCallRequestFrom = field(metadata=config(field_name='from')) """ Phone number of the caller. This number corresponds to the 1st leg of the RingOut call. This number can be one of user's configured forwarding numbers or arbitrary number """ to: CreateRingOutCallRequestTo """ Phone number of the called party. This number corresponds to the 2nd leg of a RingOut call """ caller_id: Optional[CreateRingOutCallRequestCallerId] = None """ The number which will be displayed to the called party """ play_prompt: Optional[bool] = None """ The audio prompt that the calling party hears when the call is connected """ country: Optional[CreateRingOutCallRequestCountry] = None """ Optional. Dialing plan country data. If not specified, then extension home country is applied by default """ class CreateRingOutCallResponseStatusCallStatus(Enum): """ Status of a call """ Invalid = 'Invalid' Success = 'Success' InProgress = 'InProgress' Busy = 'Busy' NoAnswer = 'NoAnswer' Rejected = 'Rejected' GenericError = 'GenericError' Finished = 'Finished' InternationalDisabled = 'InternationalDisabled' DestinationBlocked = 'DestinationBlocked' NotEnoughFunds = 'NotEnoughFunds' NoSuchUser = 'NoSuchUser' class CreateRingOutCallResponseStatusCallerStatus(Enum): """ Status of a calling party """ Invalid = 'Invalid' Success = 'Success' InProgress = 'InProgress' Busy = 'Busy' NoAnswer = 'NoAnswer' Rejected = 'Rejected' GenericError = 'GenericError' Finished = 'Finished' InternationalDisabled = 'InternationalDisabled' DestinationBlocked = 'DestinationBlocked' NotEnoughFunds = 'NotEnoughFunds' NoSuchUser = 'NoSuchUser' class CreateRingOutCallResponseStatusCalleeStatus(Enum): """ Status of a called party """ Invalid = 'Invalid' Success = 'Success' InProgress = 'InProgress' Busy = 'Busy' NoAnswer = 'NoAnswer' Rejected = 'Rejected' GenericError = 'GenericError' Finished = 'Finished' InternationalDisabled = 'InternationalDisabled' DestinationBlocked = 'DestinationBlocked' NotEnoughFunds = 'NotEnoughFunds' NoSuchUser = 'NoSuchUser' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateRingOutCallResponseStatus(DataClassJsonMixin): """ RingOut status information """ call_status: Optional[CreateRingOutCallResponseStatusCallStatus] = None """ Status of a call """ caller_status: Optional[CreateRingOutCallResponseStatusCallerStatus] = None """ Status of a calling party """ callee_status: Optional[CreateRingOutCallResponseStatusCalleeStatus] = None """ Status of a called party """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateRingOutCallResponse(DataClassJsonMixin): id: Optional[int] = None """ Internal identifier of a RingOut call """ uri: Optional[str] = None status: Optional[CreateRingOutCallResponseStatus] = None """ RingOut status information """ class ReadRingOutCallStatusResponseStatusCallStatus(Enum): """ Status of a call """ Invalid = 'Invalid' Success = 'Success' InProgress = 'InProgress' Busy = 'Busy' NoAnswer = 'NoAnswer' Rejected = 'Rejected' GenericError = 'GenericError' Finished = 'Finished' InternationalDisabled = 'InternationalDisabled' DestinationBlocked = 'DestinationBlocked' NotEnoughFunds = 'NotEnoughFunds' NoSuchUser = 'NoSuchUser' class ReadRingOutCallStatusResponseStatusCallerStatus(Enum): """ Status of a calling party """ Invalid = 'Invalid' Success = 'Success' InProgress = 'InProgress' Busy = 'Busy' NoAnswer = 'NoAnswer' Rejected = 'Rejected' GenericError = 'GenericError' Finished = 'Finished' InternationalDisabled = 'InternationalDisabled' DestinationBlocked = 'DestinationBlocked' NotEnoughFunds = 'NotEnoughFunds' NoSuchUser = 'NoSuchUser' class ReadRingOutCallStatusResponseStatusCalleeStatus(Enum): """ Status of a called party """ Invalid = 'Invalid' Success = 'Success' InProgress = 'InProgress' Busy = 'Busy' NoAnswer = 'NoAnswer' Rejected = 'Rejected' GenericError = 'GenericError' Finished = 'Finished' InternationalDisabled = 'InternationalDisabled' DestinationBlocked = 'DestinationBlocked' NotEnoughFunds = 'NotEnoughFunds' NoSuchUser = 'NoSuchUser' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadRingOutCallStatusResponseStatus(DataClassJsonMixin): """ RingOut status information """ call_status: Optional[ReadRingOutCallStatusResponseStatusCallStatus] = None """ Status of a call """ caller_status: Optional[ReadRingOutCallStatusResponseStatusCallerStatus] = None """ Status of a calling party """ callee_status: Optional[ReadRingOutCallStatusResponseStatusCalleeStatus] = None """ Status of a called party """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadRingOutCallStatusResponse(DataClassJsonMixin): id: Optional[int] = None """ Internal identifier of a RingOut call """ uri: Optional[str] = None status: Optional[ReadRingOutCallStatusResponseStatus] = None """ RingOut status information """ class CreateRingOutCallDeprecatedResponseStatusCallStatus(Enum): """ Status of a call """ Invalid = 'Invalid' Success = 'Success' InProgress = 'InProgress' Busy = 'Busy' NoAnswer = 'NoAnswer' Rejected = 'Rejected' GenericError = 'GenericError' Finished = 'Finished' InternationalDisabled = 'InternationalDisabled' DestinationBlocked = 'DestinationBlocked' NotEnoughFunds = 'NotEnoughFunds' NoSuchUser = 'NoSuchUser' class CreateRingOutCallDeprecatedResponseStatusCallerStatus(Enum): """ Status of a calling party """ Invalid = 'Invalid' Success = 'Success' InProgress = 'InProgress' Busy = 'Busy' NoAnswer = 'NoAnswer' Rejected = 'Rejected' GenericError = 'GenericError' Finished = 'Finished' InternationalDisabled = 'InternationalDisabled' DestinationBlocked = 'DestinationBlocked' NotEnoughFunds = 'NotEnoughFunds' NoSuchUser = 'NoSuchUser' class CreateRingOutCallDeprecatedResponseStatusCalleeStatus(Enum): """ Status of a called party """ Invalid = 'Invalid' Success = 'Success' InProgress = 'InProgress' Busy = 'Busy' NoAnswer = 'NoAnswer' Rejected = 'Rejected' GenericError = 'GenericError' Finished = 'Finished' InternationalDisabled = 'InternationalDisabled' DestinationBlocked = 'DestinationBlocked' NotEnoughFunds = 'NotEnoughFunds' NoSuchUser = 'NoSuchUser' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateRingOutCallDeprecatedResponseStatus(DataClassJsonMixin): """ RingOut status information """ call_status: Optional[CreateRingOutCallDeprecatedResponseStatusCallStatus] = None """ Status of a call """ caller_status: Optional[CreateRingOutCallDeprecatedResponseStatusCallerStatus] = None """ Status of a calling party """ callee_status: Optional[CreateRingOutCallDeprecatedResponseStatusCalleeStatus] = None """ Status of a called party """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateRingOutCallDeprecatedResponse(DataClassJsonMixin): id: Optional[int] = None """ Internal identifier of a RingOut call """ uri: Optional[str] = None status: Optional[CreateRingOutCallDeprecatedResponseStatus] = None """ RingOut status information """ class ReadRingOutCallStatusDeprecatedResponseStatusCallStatus(Enum): """ Status of a call """ Invalid = 'Invalid' Success = 'Success' InProgress = 'InProgress' Busy = 'Busy' NoAnswer = 'NoAnswer' Rejected = 'Rejected' GenericError = 'GenericError' Finished = 'Finished' InternationalDisabled = 'InternationalDisabled' DestinationBlocked = 'DestinationBlocked' NotEnoughFunds = 'NotEnoughFunds' NoSuchUser = 'NoSuchUser' class ReadRingOutCallStatusDeprecatedResponseStatusCallerStatus(Enum): """ Status of a calling party """ Invalid = 'Invalid' Success = 'Success' InProgress = 'InProgress' Busy = 'Busy' NoAnswer = 'NoAnswer' Rejected = 'Rejected' GenericError = 'GenericError' Finished = 'Finished' InternationalDisabled = 'InternationalDisabled' DestinationBlocked = 'DestinationBlocked' NotEnoughFunds = 'NotEnoughFunds' NoSuchUser = 'NoSuchUser' class ReadRingOutCallStatusDeprecatedResponseStatusCalleeStatus(Enum): """ Status of a called party """ Invalid = 'Invalid' Success = 'Success' InProgress = 'InProgress' Busy = 'Busy' NoAnswer = 'NoAnswer' Rejected = 'Rejected' GenericError = 'GenericError' Finished = 'Finished' InternationalDisabled = 'InternationalDisabled' DestinationBlocked = 'DestinationBlocked' NotEnoughFunds = 'NotEnoughFunds' NoSuchUser = 'NoSuchUser' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadRingOutCallStatusDeprecatedResponseStatus(DataClassJsonMixin): """ RingOut status information """ call_status: Optional[ReadRingOutCallStatusDeprecatedResponseStatusCallStatus] = None """ Status of a call """ caller_status: Optional[ReadRingOutCallStatusDeprecatedResponseStatusCallerStatus] = None """ Status of a calling party """ callee_status: Optional[ReadRingOutCallStatusDeprecatedResponseStatusCalleeStatus] = None """ Status of a called party """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadRingOutCallStatusDeprecatedResponse(DataClassJsonMixin): id: Optional[int] = None """ Internal identifier of a RingOut call """ uri: Optional[str] = None status: Optional[ReadRingOutCallStatusDeprecatedResponseStatus] = None """ RingOut status information """
/ringcentral_async_client-1.0.3-py3-none-any.whl/ringcentral_async_client/_code_gen/model/_6.py
0.76782
0.240786
_6.py
pypi
from ._3 import * @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ScimErrorResponse(DataClassJsonMixin): detail: Optional[str] = None """ detail error message """ schemas: Optional[List[ScimErrorResponseSchemasItem]] = None scim_type: Optional[ScimErrorResponseScimType] = None """ bad request type when status code is 400 """ status: Optional[str] = None """ same as HTTP status code, e.g. 400, 401, etc. """ class CreateUserSchemasItem(Enum): UrnIetfParamsScimSchemasCore_2_0_User = 'urn:ietf:params:scim:schemas:core:2.0:User' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateUser(DataClassJsonMixin): """ Required Properties: - emails - name - schemas - user_name Generated by Python OpenAPI Parser """ emails: list schemas: List[CreateUserSchemasItem] user_name: str """ MUST be same as work type email address """ active: Optional[bool] = False """ User status """ addresses: Optional[list] = None external_id: Optional[str] = None """ external unique resource id defined by provisioning client """ phone_numbers: Optional[list] = None photos: Optional[list] = None class SearchRequestSchemasItem(Enum): UrnIetfParamsScimApiMessages_2_0_SearchRequest = 'urn:ietf:params:scim:api:messages:2.0:SearchRequest' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SearchRequest(DataClassJsonMixin): count: Optional[int] = None """ page size """ filter: Optional[str] = None """ only support 'userName' or 'email' filter expressions for now """ schemas: Optional[List[SearchRequestSchemasItem]] = None start_index: Optional[int] = None """ start index (1-based) """ class UserSchemasItem(Enum): UrnIetfParamsScimSchemasCore_2_0_User = 'urn:ietf:params:scim:schemas:core:2.0:User' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class User(DataClassJsonMixin): """ Required Properties: - emails - name - schemas - user_name Generated by Python OpenAPI Parser """ emails: list schemas: List[UserSchemasItem] user_name: str """ MUST be same as work type email address """ active: Optional[bool] = False """ user status """ addresses: Optional[list] = None external_id: Optional[str] = None """ external unique resource id defined by provisioning client """ id: Optional[str] = None """ unique resource id defined by RingCentral """ phone_numbers: Optional[list] = None photos: Optional[list] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SuperviseCallSessionFrom(DataClassJsonMixin): """ Information about a call party that monitors a call """ phone_number: Optional[str] = None """ Phone number of a party """ name: Optional[str] = None """ Displayed name of a party """ device_id: Optional[str] = None """ Internal identifier of a device """ extension_id: Optional[str] = None """ Internal identifier of an extension """ class SuperviseCallSessionDirection(Enum): """ Direction of a call """ Outbound = 'Outbound' Inbound = 'Inbound' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SuperviseCallSessionOwner(DataClassJsonMixin): """ Data on a call owner """ account_id: Optional[str] = None """ Internal identifier of an account that monitors a call """ extension_id: Optional[str] = None """ Internal identifier of an extension that monitors a call """ class SuperviseCallSessionStatusCode(Enum): """ Status code of a call """ Setup = 'Setup' Proceeding = 'Proceeding' Answered = 'Answered' Disconnected = 'Disconnected' Gone = 'Gone' Parked = 'Parked' Hold = 'Hold' VoiceMail = 'VoiceMail' FaxReceive = 'FaxReceive' VoiceMailScreening = 'VoiceMailScreening' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SuperviseCallSessionStatusPeerId(DataClassJsonMixin): """ Peer session / party data.'Gone'state only """ session_id: Optional[str] = None telephony_session_id: Optional[str] = None party_id: Optional[str] = None class SuperviseCallSessionStatusReason(Enum): """ Reason of call termination. For 'Disconnected' code only """ Pickup = 'Pickup' Supervising = 'Supervising' TakeOver = 'TakeOver' Timeout = 'Timeout' BlindTransfer = 'BlindTransfer' RccTransfer = 'RccTransfer' AttendedTransfer = 'AttendedTransfer' CallerInputRedirect = 'CallerInputRedirect' CallFlip = 'CallFlip' ParkLocation = 'ParkLocation' DtmfTransfer = 'DtmfTransfer' AgentAnswered = 'AgentAnswered' AgentDropped = 'AgentDropped' Rejected = 'Rejected' Cancelled = 'Cancelled' InternalError = 'InternalError' NoAnswer = 'NoAnswer' TargetBusy = 'TargetBusy' InvalidNumber = 'InvalidNumber' InternationalDisabled = 'InternationalDisabled' DestinationBlocked = 'DestinationBlocked' NotEnoughFunds = 'NotEnoughFunds' NoSuchUser = 'NoSuchUser' CallPark = 'CallPark' CallRedirected = 'CallRedirected' CallReplied = 'CallReplied' CallSwitch = 'CallSwitch' CallFinished = 'CallFinished' CallDropped = 'CallDropped' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SuperviseCallSessionStatus(DataClassJsonMixin): code: Optional[SuperviseCallSessionStatusCode] = None """ Status code of a call """ peer_id: Optional[SuperviseCallSessionStatusPeerId] = None """ Peer session / party data.'Gone'state only """ reason: Optional[SuperviseCallSessionStatusReason] = None """ Reason of call termination. For 'Disconnected' code only """ description: Optional[str] = None """ Optional message """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SuperviseCallSession(DataClassJsonMixin): from_: Optional[SuperviseCallSessionFrom] = field(metadata=config(field_name='from'), default=None) """ Information about a call party that monitors a call """ to: Optional[dict] = None """ Information about a call party that is monitored """ direction: Optional[SuperviseCallSessionDirection] = None """ Direction of a call """ id: Optional[str] = None """ Internal identifier of a party that monitors a call """ account_id: Optional[str] = None """ Internal identifier of an account that monitors a call """ extension_id: Optional[str] = None """ Internal identifier of an extension that monitors a call """ muted: Optional[bool] = None """ Specifies if a call participant is muted or not. **Note:** If a call is also controlled via Hard phone or RingCentral App (not only through the API by calling call control methods) then it cannot be fully muted/unmuted via API only, in this case the action should be duplicated via Hard phone/RC App interfaces """ owner: Optional[SuperviseCallSessionOwner] = None """ Data on a call owner """ stand_alone: Optional[bool] = None """ If 'True' then the party is not connected to a session voice conference, 'False' means the party is connected to other parties in a session """ status: Optional[SuperviseCallSessionStatus] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class PartyUpdateRequestParty(DataClassJsonMixin): """ Party update data """ muted: Optional[bool] = None """ Specifies if a call participant is muted or not. **Note:** If a call is also controlled via Hard phone or RingCentral App (not only through the API by calling call control methods) then it cannot be fully muted/unmuted via API only, in this case the action should be duplicated via Hard phone/RC App interfaces """ stand_alone: Optional[bool] = None """ If 'True' then the party is not connected to a session voice conference, 'False' means the party is connected to other parties in a session """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class PartyUpdateRequest(DataClassJsonMixin): party: Optional[PartyUpdateRequestParty] = None """ Party update data """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallRecordingUpdate(DataClassJsonMixin): active: Optional[bool] = None """ Recording status """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallRecording(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a call recording """ active: Optional[bool] = None """ Call recording status """ class PartySuperviseRequestMode(Enum): """ Supervising mode Example: `Listen` Generated by Python OpenAPI Parser """ Listen = 'Listen' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class PartySuperviseRequest(DataClassJsonMixin): """ Required Properties: - mode - supervisor_device_id - agent_extension_id Generated by Python OpenAPI Parser """ mode: PartySuperviseRequestMode """ Supervising mode Example: `Listen` """ supervisor_device_id: str """ Internal identifier of a supervisor's device Example: `191888004` """ agent_extension_id: str """ Mailbox ID of a user that will be monitored Example: `400378008008` """ class CallSessionSessionOriginType(Enum): """ Session origin type """ Call = 'Call' RingOut = 'RingOut' RingMe = 'RingMe' Conference = 'Conference' GreetingsRecording = 'GreetingsRecording' VerificationCall = 'VerificationCall' Zoom = 'Zoom' CallOut = 'CallOut' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallSessionSessionOrigin(DataClassJsonMixin): """ Initial data of a call session """ type: Optional[CallSessionSessionOriginType] = None """ Session origin type """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallSessionSessionPartiesItemPark(DataClassJsonMixin): """ Call park information """ id: Optional[str] = None """ Call park identifier """ class CallSessionSessionPartiesItemDirection(Enum): """ Direction of a call """ Inbound = 'Inbound' Outbound = 'Outbound' class CallSessionSessionPartiesItemConferenceRole(Enum): """ A party's role in the conference scenarios. For calls of 'Conference' type only """ Host = 'Host' Participant = 'Participant' class CallSessionSessionPartiesItemRingOutRole(Enum): """ A party's role in 'Ring Me'/'RingOut' scenarios. For calls of 'Ringout' type only """ Initiator = 'Initiator' Target = 'Target' class CallSessionSessionPartiesItemRingMeRole(Enum): """ A party's role in 'Ring Me'/'RingOut' scenarios. For calls of 'Ringme' type only """ Initiator = 'Initiator' Target = 'Target' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallSessionSessionPartiesItemRecordingsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a Recording resource """ active: Optional[bool] = None """ True if the recording is active. False if the recording is paused. """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallSessionSessionPartiesItem(DataClassJsonMixin): """ Information on a party of a call session """ id: Optional[str] = None """ Internal identifier of a party """ status: Optional[dict] = None """ Status data of a call session """ muted: Optional[bool] = None """ Specifies if a call participant is muted or not. **Note:** If a call is also controlled via Hard phone or RingCentral App (not only through the API by calling call control methods) then it cannot be fully muted/unmuted via API only, in this case the action should be duplicated via Hard phone/RC App interfaces """ stand_alone: Optional[bool] = None """ If 'True' then the party is not connected to a session voice conference, 'False' means the party is connected to other parties in a session """ park: Optional[CallSessionSessionPartiesItemPark] = None """ Call park information """ from_: Optional[dict] = field(metadata=config(field_name='from'), default=None) """ Data on a calling party """ to: Optional[dict] = None """ Data on a called party """ owner: Optional[dict] = None """ Data on a call owner """ direction: Optional[CallSessionSessionPartiesItemDirection] = None """ Direction of a call """ conference_role: Optional[CallSessionSessionPartiesItemConferenceRole] = None """ A party's role in the conference scenarios. For calls of 'Conference' type only """ ring_out_role: Optional[CallSessionSessionPartiesItemRingOutRole] = None """ A party's role in 'Ring Me'/'RingOut' scenarios. For calls of 'Ringout' type only """ ring_me_role: Optional[CallSessionSessionPartiesItemRingMeRole] = None """ A party's role in 'Ring Me'/'RingOut' scenarios. For calls of 'Ringme' type only """ recordings: Optional[List[CallSessionSessionPartiesItemRecordingsItem]] = None """ Active recordings list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallSessionSession(DataClassJsonMixin): """ Call session information """ id: Optional[str] = None """ Internal identifier of a call session """ origin: Optional[CallSessionSessionOrigin] = None """ Initial data of a call session """ voice_call_token: Optional[str] = None """ For calls of 'Conference' type only """ parties: Optional[List[CallSessionSessionPartiesItem]] = None creation_time: Optional[str] = None """ Date and time of the latest session update represented in Unix time format """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallSession(DataClassJsonMixin): session: Optional[CallSessionSession] = None """ Call session information """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class MakeCallOutRequestFrom(DataClassJsonMixin): """ Instance id of the caller. It corresponds to the 1st leg of the CallOut call. """ device_id: Optional[str] = None """ Internal identifier of a device Example: `59474004` """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class MakeCallOutRequestTo(DataClassJsonMixin): """ Phone number of the called party. This number corresponds to the 2nd leg of a CallOut call """ phone_number: Optional[str] = None """ Phone number in E.164 format Example: `+16502223366` """ extension_number: Optional[str] = None """ Extension number Example: `103` """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class MakeCallOutRequest(DataClassJsonMixin): """ Required Properties: - from_ - to Generated by Python OpenAPI Parser """ from_: MakeCallOutRequestFrom = field(metadata=config(field_name='from')) """ Instance id of the caller. It corresponds to the 1st leg of the CallOut call. """ to: MakeCallOutRequestTo """ Phone number of the called party. This number corresponds to the 2nd leg of a CallOut call """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class TransferTarget(DataClassJsonMixin): phone_number: Optional[str] = None """ Phone number """ voicemail: Optional[str] = None """ Voicemail owner extension identifier """ park_orbit: Optional[str] = None """ Park orbit identifier """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AnswerTarget(DataClassJsonMixin): device_id: Optional[str] = None """ Device identifier that is used to answer the incoming call. Example: `400018633008` """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ForwardTarget(DataClassJsonMixin): phone_number: Optional[str] = None """ Phone number """ voicemail: Optional[str] = None """ Voicemail owner extension identifier """ class ReplyPartyDirection(Enum): """ Direction of a call """ Inbound = 'Inbound' Outbound = 'Outbound' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReplyParty(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a party """ status: Optional[dict] = None """ Status data of a call session """ muted: Optional[bool] = None """ Specifies if a call participant is muted or not. **Note:** If a call is also controlled via Hard phone or RingCentral App (not only through the API by calling call control methods) then it cannot be fully muted/unmuted via API only, in this case the action should be duplicated via Hard phone/RC App interfaces """ stand_alone: Optional[bool] = None """ If 'True' then the party is not connected to a session voice conference, 'False' means the party is connected to other parties in a session """ park: Optional[dict] = None """ Call park information """ from_: Optional[dict] = field(metadata=config(field_name='from'), default=None) """ Data on a calling party """ to: Optional[dict] = None """ Data on a called party """ owner: Optional[dict] = None """ Data on a call owner """ direction: Optional[ReplyPartyDirection] = None """ Direction of a call """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallPartyFlip(DataClassJsonMixin): call_flip_id: Optional[str] = None """ Call flip id """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class IgnoreRequestBody(DataClassJsonMixin): """ Required Properties: - device_id Generated by Python OpenAPI Parser """ device_id: str """ Internal device identifier Example: `400020454008` """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class BridgeTargetRequest(DataClassJsonMixin): """ Required Properties: - telephony_session_id - party_id Generated by Python OpenAPI Parser """ telephony_session_id: str """ Internal identifier of a call session to be connected to (bridged) """ party_id: str """ Internal identifier of a call party to be connected to (bridged) """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class PickupTarget(DataClassJsonMixin): """ Required Properties: - device_id Generated by Python OpenAPI Parser """ device_id: str """ Device identifier that is used to pick up the parked call. Example: `400018633008` """ class CallPartyReplyReplyWithPatternPattern(Enum): """ Predefined reply pattern name. Example: `OnMyWay` Generated by Python OpenAPI Parser """ WillCallYouBack = 'WillCallYouBack' CallMeBack = 'CallMeBack' OnMyWay = 'OnMyWay' OnTheOtherLine = 'OnTheOtherLine' WillCallYouBackLater = 'WillCallYouBackLater' CallMeBackLater = 'CallMeBackLater' InAMeeting = 'InAMeeting' OnTheOtherLineNoCall = 'OnTheOtherLineNoCall' class CallPartyReplyReplyWithPatternTimeUnit(Enum): """ Time unit name. Example: `Minute` Generated by Python OpenAPI Parser """ Minute = 'Minute' Hour = 'Hour' Day = 'Day' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallPartyReplyReplyWithPattern(DataClassJsonMixin): pattern: Optional[CallPartyReplyReplyWithPatternPattern] = None """ Predefined reply pattern name. Example: `OnMyWay` """ time: Optional[int] = None """ Number of time units. Applicable only to WillCallYouBack, CallMeBack patterns. Example: `5` """ time_unit: Optional[CallPartyReplyReplyWithPatternTimeUnit] = None """ Time unit name. Example: `Minute` """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallPartyReply(DataClassJsonMixin): reply_with_text: Optional[str] = None """ Text to reply """ reply_with_pattern: Optional[CallPartyReplyReplyWithPattern] = None class SuperviseCallSessionRequestMode(Enum): """ Supervising mode Example: `Listen` Generated by Python OpenAPI Parser """ Listen = 'Listen' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SuperviseCallSessionRequest(DataClassJsonMixin): """ Required Properties: - mode - supervisor_device_id Generated by Python OpenAPI Parser """ mode: SuperviseCallSessionRequestMode """ Supervising mode Example: `Listen` """ supervisor_device_id: str """ Internal identifier of a supervisor's device which will be used for call session monitoring Example: `191888004` """ agent_extension_number: Optional[str] = None """ Extension number of the user that will be monitored Example: `105` """ agent_extension_id: Optional[str] = None """ Extension identifier of the user that will be monitored Example: `400378008008` """ class PartySuperviseResponseDirection(Enum): """ Direction of a call """ Outbound = 'Outbound' Inbound = 'Inbound' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class PartySuperviseResponse(DataClassJsonMixin): from_: Optional[dict] = field(metadata=config(field_name='from'), default=None) """ Information about a call party that monitors a call """ to: Optional[dict] = None """ Information about a call party that is monitored """ direction: Optional[PartySuperviseResponseDirection] = None """ Direction of a call """ id: Optional[str] = None """ Internal identifier of a party that monitors a call """ account_id: Optional[str] = None """ Internal identifier of an account that monitors a call """ extension_id: Optional[str] = None """ Internal identifier of an extension that monitors a call """ muted: Optional[bool] = None """ Specifies if a call party is muted """ owner: Optional[dict] = None """ Deprecated. Infromation a call owner """ stand_alone: Optional[bool] = None """ Specifies if a device is stand-alone """ status: Optional[dict] = None class DataExportTaskStatus(Enum): """ Task status """ Accepted = 'Accepted' InProgress = 'InProgress' Completed = 'Completed' Failed = 'Failed' Expired = 'Expired' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class DataExportTaskSpecificContactsItem(DataClassJsonMixin): """ List of users whose data is collected. The following data is exported: posts, tasks, events, etc. posted by the user(s); posts addressing the user(s) via direct and @Mentions; tasks assigned to the listed user(s) Generated by Python OpenAPI Parser """ id: Optional[str] = None """ Internal identifier of a contact """ email: Optional[str] = None """ Email address of a contact """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class DataExportTaskSpecific(DataClassJsonMixin): """ Information specififed in request """ time_from: Optional[str] = None """ Starting time for data collection """ time_to: Optional[str] = None """ Ending time for data collection """ contacts: Optional[List[DataExportTaskSpecificContactsItem]] = None chat_ids: Optional[List[str]] = None """ List of chats from which the data (posts, files, tasks, events, notes, etc.) will be collected """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class DataExportTaskDatasetsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a dataset """ uri: Optional[str] = None """ Link for downloading a dataset """ size: Optional[int] = None """ Size of ta dataset in bytes """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class DataExportTask(DataClassJsonMixin): uri: Optional[str] = None """ Canonical URI of a task """ id: Optional[str] = None """ Internal identifier of a task """ creation_time: Optional[str] = None """ Task creation datetime """ last_modified_time: Optional[str] = None """ Task last modification datetime """ status: Optional[DataExportTaskStatus] = None """ Task status """ creator: Optional[dict] = None """ Task creator information """ specific: Optional[DataExportTaskSpecific] = None """ Information specififed in request """ datasets: Optional[List[DataExportTaskDatasetsItem]] = None """ Data collection sets. Returned by task ID """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class DataExportTaskListNavigationFirstPage(DataClassJsonMixin): """ Canonical URI for the first page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class DataExportTaskListNavigation(DataClassJsonMixin): first_page: Optional[DataExportTaskListNavigationFirstPage] = None """ Canonical URI for the first page of the list """ next_page: Optional[dict] = None """ Canonical URI for the next page of the list """ previous_page: Optional[dict] = None """ Canonical URI for the previous page of the list """ last_page: Optional[dict] = None """ Canonical URI for the last page of the list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class DataExportTaskListPaging(DataClassJsonMixin): page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) """ per_page: Optional[int] = None """ Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty """ total_pages: Optional[int] = None """ The total number of pages in a dataset. May be omitted for some resources due to performance reasons """ total_elements: Optional[int] = None """ The total number of elements in a dataset. May be omitted for some resource due to performance reasons """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class DataExportTaskList(DataClassJsonMixin): tasks: Optional[List[dict]] = None navigation: Optional[DataExportTaskListNavigation] = None paging: Optional[DataExportTaskListPaging] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateDataExportTaskRequest(DataClassJsonMixin): time_from: Optional[str] = None """ Starting time for data collection. The default value is `timeTo` minus 24 hours. Max allowed time frame between `timeFrom` and `timeTo` is 6 months """ time_to: Optional[str] = None """ Ending time for data collection. The default value is current time. Max allowed time frame between `timeFrom` and `timeTo` is 6 months """ contacts: Optional[List[dict]] = None chat_ids: Optional[List[str]] = None """ List of chats from which the data (posts, files, tasks, events, notes, etc.) will be collected. Maximum number of chats supported is 10 """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateMessageStoreReportRequest(DataClassJsonMixin): date_from: Optional[str] = None """ Starting time for collecting messages. The default value equals to the current time minus 24 hours """ date_to: Optional[str] = None """ Ending time for collecting messages. The default value is the current time """ class MessageStoreReportStatus(Enum): """ Status of a message store report task """ Accepted = 'Accepted' Pending = 'Pending' InProgress = 'InProgress' AttemptFailed = 'AttemptFailed' Failed = 'Failed' Completed = 'Completed' Cancelled = 'Cancelled' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class MessageStoreReport(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a message store report task """ uri: Optional[str] = None """ Link to a task """ status: Optional[MessageStoreReportStatus] = None """ Status of a message store report task """ account_id: Optional[str] = None """ Internal identifier of an account """ extension_id: Optional[str] = None """ Internal identifier of an extension """ creation_time: Optional[str] = None """ Task creation time """ last_modified_time: Optional[str] = None """ Time of the last task modification """ date_to: Optional[str] = None """ Ending time for collecting messages """ date_from: Optional[str] = None """ Starting time for collecting messages """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class MessageStoreReportArchiveRecordsItem(DataClassJsonMixin): size: Optional[int] = None """ Archive size in bytes """ uri: Optional[str] = None """ Link for archive download """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class MessageStoreReportArchive(DataClassJsonMixin): records: Optional[List[MessageStoreReportArchiveRecordsItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListMeetingRecordingsResponseRecordsItemMeeting(DataClassJsonMixin): id: Optional[str] = None topic: Optional[str] = None start_time: Optional[str] = None class ListMeetingRecordingsResponseRecordsItemRecordingItemContentType(Enum): VideoMp4 = 'video/mp4' AudioM4a = 'audio/m4a' TextVtt = 'text/vtt' class ListMeetingRecordingsResponseRecordsItemRecordingItemStatus(Enum): Completed = 'Completed' Processing = 'Processing' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListMeetingRecordingsResponseRecordsItemRecordingItem(DataClassJsonMixin): id: Optional[str] = None content_download_uri: Optional[str] = None content_type: Optional[ListMeetingRecordingsResponseRecordsItemRecordingItemContentType] = None size: Optional[int] = None start_time: Optional[str] = None """ Starting time of a recording """ end_time: Optional[str] = None """ Ending time of a recording """ status: Optional[ListMeetingRecordingsResponseRecordsItemRecordingItemStatus] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListMeetingRecordingsResponseRecordsItem(DataClassJsonMixin): meeting: Optional[ListMeetingRecordingsResponseRecordsItemMeeting] = None recording: Optional[List[ListMeetingRecordingsResponseRecordsItemRecordingItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListMeetingRecordingsResponsePaging(DataClassJsonMixin): page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) """ per_page: Optional[int] = None """ Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty """ total_pages: Optional[int] = None """ The total number of pages in a dataset. May be omitted for some resources due to performance reasons """ total_elements: Optional[int] = None """ The total number of elements in a dataset. May be omitted for some resource due to performance reasons """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListMeetingRecordingsResponseNavigationFirstPage(DataClassJsonMixin): """ Canonical URI for the first page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListMeetingRecordingsResponseNavigation(DataClassJsonMixin): first_page: Optional[ListMeetingRecordingsResponseNavigationFirstPage] = None """ Canonical URI for the first page of the list """ next_page: Optional[dict] = None """ Canonical URI for the next page of the list """ previous_page: Optional[dict] = None """ Canonical URI for the previous page of the list """ last_page: Optional[dict] = None """ Canonical URI for the last page of the list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListMeetingRecordingsResponse(DataClassJsonMixin): records: Optional[List[ListMeetingRecordingsResponseRecordsItem]] = None paging: Optional[ListMeetingRecordingsResponsePaging] = None navigation: Optional[ListMeetingRecordingsResponseNavigation] = None class CustomFieldsResourceRecordsItemCategory(Enum): """ Object category to attach custom fields """ User = 'User' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CustomFieldsResourceRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Custom field identifier """ category: Optional[CustomFieldsResourceRecordsItemCategory] = None """ Object category to attach custom fields """ display_name: Optional[str] = None """ Custom field display name """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CustomFieldsResource(DataClassJsonMixin): records: Optional[List[CustomFieldsResourceRecordsItem]] = None class CustomFieldCreateRequestCategory(Enum): """ Object category to attach custom fields """ User = 'User' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CustomFieldCreateRequest(DataClassJsonMixin): category: Optional[CustomFieldCreateRequestCategory] = None """ Object category to attach custom fields """ display_name: Optional[str] = None """ Custom field display name """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CustomFieldUpdateRequest(DataClassJsonMixin): display_name: Optional[str] = None """ Custom field display name """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAPIVersionsResponseApiVersionsItem(DataClassJsonMixin): uri: Optional[str] = None """ Canonical URI of API versions """ version_string: Optional[str] = None """ Version of the RingCentral REST API """ release_date: Optional[str] = None """ Release date of this version """ uri_string: Optional[str] = None """ URI part determining the current version """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAPIVersionsResponse(DataClassJsonMixin): """ Example: ```json { "application/json": { "uri": "https://platform.ringcentral.com/restapi", "apiVersions": [ { "uri": "https://platform.ringcentral.com/restapi/v1.0", "versionString": "1.0.34", "releaseDate": "2018-02-09T00:00:00.000Z", "uriString": "v1.0" } ], "serverVersion": "10.0.4.7854", "serverRevision": "32f2a96b769c" } } ``` Generated by Python OpenAPI Parser """ uri: Optional[str] = None """ Canonical URI of the API version """ api_versions: Optional[List[ReadAPIVersionsResponseApiVersionsItem]] = None """ Full API version information: uri, number, release date """ server_version: Optional[str] = None """ Server version """ server_revision: Optional[str] = None """ Server revision """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAPIVersionResponse(DataClassJsonMixin): """ Example: ```json { "application/json": { "uri": "https://platform.ringcentral.com/restapi/v1.0", "versionString": "1.0.34", "releaseDate": "2018-02-09T00:00:00.000Z", "uriString": "v1.0" } } ``` Generated by Python OpenAPI Parser """ uri: Optional[str] = None """ Canonical URI of the version info resource """ version_string: Optional[str] = None """ Version of the RingCentral REST API """ release_date: Optional[str] = None """ Release date of this version """ uri_string: Optional[str] = None """ URI part determining the current version """ class ReadUserCallLogDirectionItem(Enum): Inbound = 'Inbound' Outbound = 'Outbound' class ReadUserCallLogTypeItem(Enum): Voice = 'Voice' Fax = 'Fax' class ReadUserCallLogTransportItem(Enum): PSTN = 'PSTN' VoIP = 'VoIP' class ReadUserCallLogView(Enum): Simple = 'Simple' Detailed = 'Detailed' class ReadUserCallLogRecordingType(Enum): Automatic = 'Automatic' OnDemand = 'OnDemand' All = 'All' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserCallLogResponseRecordsItemFromDevice(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a device """ uri: Optional[str] = None """ string to a device """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserCallLogResponseRecordsItemFrom(DataClassJsonMixin): phone_number: Optional[str] = None """ Phone number of a party. Usually it is a plain number including country and area code like 18661234567. But sometimes it could be returned from database with some formatting applied, for example (866)123-4567. This property is filled in all cases where parties communicate by means of global phone numbers, for example when calling to direct numbers or sending/receiving SMS """ extension_number: Optional[str] = None """ Extension short number (usually 3 or 4 digits). This property is filled when parties communicate by means of short internal numbers, for example when calling to other extension or sending/receiving Company Pager message """ extension_id: Optional[str] = None """ Internal identifier of an extension """ location: Optional[str] = None """ Contains party location (city, state) if one can be determined from phoneNumber. This property is filled only when phoneNumber is not empty and server can calculate location information from it (for example, this information is unavailable for US toll-free numbers) """ name: Optional[str] = None """ Symbolic name associated with a party. If the phone does not belong to the known extension, only the location is returned, the name is not determined then """ device: Optional[ReadUserCallLogResponseRecordsItemFromDevice] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserCallLogResponseRecordsItemToDevice(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a device """ uri: Optional[str] = None """ string to a device """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserCallLogResponseRecordsItemTo(DataClassJsonMixin): phone_number: Optional[str] = None """ Phone number of a party. Usually it is a plain number including country and area code like 18661234567. But sometimes it could be returned from database with some formatting applied, for example (866)123-4567. This property is filled in all cases where parties communicate by means of global phone numbers, for example when calling to direct numbers or sending/receiving SMS """ extension_number: Optional[str] = None """ Extension short number (usually 3 or 4 digits). This property is filled when parties communicate by means of short internal numbers, for example when calling to other extension or sending/receiving Company Pager message """ extension_id: Optional[str] = None """ Internal identifier of an extension """ location: Optional[str] = None """ Contains party location (city, state) if one can be determined from phoneNumber. This property is filled only when phoneNumber is not empty and server can calculate location information from it (for example, this information is unavailable for US toll-free numbers) """ name: Optional[str] = None """ Symbolic name associated with a party. If the phone does not belong to the known extension, only the location is returned, the name is not determined then """ device: Optional[ReadUserCallLogResponseRecordsItemToDevice] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserCallLogResponseRecordsItemExtension(DataClassJsonMixin): id: Optional[int] = None """ Internal identifier of an extension """ uri: Optional[str] = None """ Canonical URI of an extension """ class ReadUserCallLogResponseRecordsItemType(Enum): """ Call type """ Voice = 'Voice' Fax = 'Fax' class ReadUserCallLogResponseRecordsItemTransport(Enum): """ For 'Detailed' view only. Call transport """ PSTN = 'PSTN' VoIP = 'VoIP' class ReadUserCallLogResponseRecordsItemLegsItemAction(Enum): """ Action description of the call operation """ Unknown = 'Unknown' Phone_Call = 'Phone Call' Phone_Login = 'Phone Login' Incoming_Fax = 'Incoming Fax' Accept_Call = 'Accept Call' External_Application = 'External Application' FindMe = 'FindMe' FollowMe = 'FollowMe' Outgoing_Fax = 'Outgoing Fax' CallOut_CallMe = 'CallOut-CallMe' Call_Return = 'Call Return' Calling_Card = 'Calling Card' Monitoring = 'Monitoring' Ring_Directly = 'Ring Directly' RingOut_Web = 'RingOut Web' Text_Relay = 'Text Relay' VoIP_Call = 'VoIP Call' RingOut_PC = 'RingOut PC' RingMe = 'RingMe' Transfer = 'Transfer' OBJECT_411_Info = '411 Info' Emergency = 'Emergency' E911_Update = 'E911 Update' Support = 'Support' RingOut_Mobile = 'RingOut Mobile' MeetingsCall = 'MeetingsCall' SilentMonitoring = 'SilentMonitoring' class ReadUserCallLogResponseRecordsItemLegsItemDirection(Enum): """ Call direction """ Inbound = 'Inbound' Outbound = 'Outbound' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserCallLogResponseRecordsItemLegsItemBilling(DataClassJsonMixin): """ Billing information related to the call """ cost_included: Optional[float] = None """ Cost per minute, paid and already included in your RingCentral Plan. For example International Calls """ cost_purchased: Optional[float] = None """ Cost per minute, paid and not included in your RingCentral Plan """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserCallLogResponseRecordsItemLegsItemDelegate(DataClassJsonMixin): """ Information on a delegate extension that actually implemented a call action. For Secretary call log the field is returned if the current extension implemented a call. For Boss call log the field contains information on a Secretary extension which actually implemented a call on behalf of the current extension Generated by Python OpenAPI Parser """ id: Optional[str] = None """ Internal identifier of a Secretary extension """ name: Optional[str] = None """ Custom name of a Secretary extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserCallLogResponseRecordsItemLegsItemExtension(DataClassJsonMixin): """ Information on extension """ id: Optional[int] = None """ Internal identifier of an extension """ uri: Optional[str] = None """ Canonical URI of an extension """ class ReadUserCallLogResponseRecordsItemLegsItemLegType(Enum): """ Leg type """ SipForwarding = 'SipForwarding' ServiceMinus2 = 'ServiceMinus2' ServiceMinus3 = 'ServiceMinus3' PstnToSip = 'PstnToSip' Accept = 'Accept' FindMe = 'FindMe' FollowMe = 'FollowMe' TestCall = 'TestCall' FaxSent = 'FaxSent' CallBack = 'CallBack' CallingCard = 'CallingCard' RingDirectly = 'RingDirectly' RingOutWebToSubscriber = 'RingOutWebToSubscriber' RingOutWebToCaller = 'RingOutWebToCaller' SipToPstnMetered = 'SipToPstnMetered' RingOutClientToSubscriber = 'RingOutClientToSubscriber' RingOutClientToCaller = 'RingOutClientToCaller' RingMe = 'RingMe' TransferCall = 'TransferCall' SipToPstnUnmetered = 'SipToPstnUnmetered' RingOutDeviceToSubscriber = 'RingOutDeviceToSubscriber' RingOutDeviceToCaller = 'RingOutDeviceToCaller' RingOutOneLegToCaller = 'RingOutOneLegToCaller' ExtensionToExtension = 'ExtensionToExtension' CallPark = 'CallPark' PagingServer = 'PagingServer' Hunting = 'Hunting' OutgoingFreeSpDl = 'OutgoingFreeSpDl' ParkLocation = 'ParkLocation' ConferenceCall = 'ConferenceCall' MobileApp = 'MobileApp' Monitoring = 'Monitoring' MoveToConference = 'MoveToConference' Unknown = 'Unknown' class ReadUserCallLogResponseRecordsItemLegsItemType(Enum): """ Call type """ Voice = 'Voice' Fax = 'Fax' class ReadUserCallLogResponseRecordsItemLegsItemResult(Enum): """ Status description of the call operation """ Unknown = 'Unknown' Accepted = 'Accepted' CallConnected = 'Call connected' In_Progress = 'In Progress' Voicemail = 'Voicemail' Reply = 'Reply' Missed = 'Missed' Busy = 'Busy' Rejected = 'Rejected' No_Answer = 'No Answer' Hang_Up = 'Hang Up' Blocked = 'Blocked' SuspendedAccount = 'Suspended account' Call_Failed = 'Call Failed' Call_Failure = 'Call Failure' Internal_Error = 'Internal Error' IP_Phone_Offline = 'IP Phone Offline' No_Calling_Credit = 'No Calling Credit' Not_Allowed = 'Not Allowed' Restricted_Number = 'Restricted Number' Wrong_Number = 'Wrong Number' Answered_Not_Accepted = 'Answered Not Accepted' Stopped = 'Stopped' International_Disabled = 'International Disabled' International_Restricted = 'International Restricted' Abandoned = 'Abandoned' Declined = 'Declined' Received = 'Received' FaxOn_Demand = 'Fax on Demand' Partial_Receive = 'Partial Receive' Receive_Error = 'Receive Error' Fax_Receipt_Error = 'Fax Receipt Error' Sent = 'Sent' Fax_Partially_Sent = 'Fax Partially Sent' Send_Error = 'Send Error' Fax_Not_Sent = 'Fax Not Sent' Fax_Poor_Line = 'Fax Poor Line' class ReadUserCallLogResponseRecordsItemLegsItemReason(Enum): """ Reason of a call result: * `Accepted` - The call was connected to and accepted by this number * `Connected` - The call was answered, but there was no response on how to handle the call (for example, a voice mail system answered the call and did not push "1" to accept) * `Line Busy` - The phone number you dialed was busy * `Not Answered` - The phone number you dialed was not answered * `No Answer` - You did not answer the call * `Hang Up` - The caller hung up before the call was answered * `Stopped` - This attempt was stopped because the call was answered by another phone * `Internal Error` - An internal error occurred when making the call. Please try again * `No Credit` - There was not enough Calling Credit on your account to make this call * `Restricted Number` - The number you dialed is restricted by RingCentral * `Wrong Number` - The number you dialed has either been disconnected or is not a valid phone number. Please check the number and try again * `International Disabled` - International calling is not enabled on your account. Contact customer service to activate International Calling * `International Restricted` - The country and/or area you attempted to call has been prohibited by your administrator * `Bad Number` - An error occurred when making the call. Please check the number before trying again * `Info 411 Restricted` - Calling to 411 Information Services is restricted * `Customer 611 Restricted` - 611 customer service is not supported. Please contact customer service at <(888) 555-1212> * `No Digital Line` - This DigitalLine was either not plugged in or did not have an internet connection * `Failed Try Again` - Call failed. Please try again * `Max Call Limit` - The number of simultaneous calls to your account has reached its limit * `Too Many Calls` - The number of simultaneous calls for per DigitalLine associated with Other Phone has reached its limit. Please contact customer service * `Calls Not Accepted` - Your account was not accepting calls at this time * `Number Not Allowed` - The number that was dialed to access your account is not allowed * `Number Blocked` - This number is in your Blocked Numbers list * `Number Disabled` - The phone number and/or area you attempted to call has been prohibited by your administrator * `Resource Error` - An error occurred when making the call. Please try again * `Call Loop` - A call loop occurred due to an incorrect call forwarding configuration. Please check that you are not forwarding calls back to your own account * `Fax Not Received` - An incoming fax could not be received because a proper connection with the sender's fax machine could not be established * `Fax Partially Sent` - The fax was only partially sent. Possible explanations include phone line quality to poor to maintain the connection or the call was dropped * `Fax Not Sent` - An attempt to send the fax was made, but could not connect with the receiving fax machine * `Fax Poor Line` - An attempt to send the fax was made, but the phone line quality was too poor to send the fax * `Fax Prepare Error` - An internal error occurred when preparing the fax. Please try again * `Fax Save Error` - An internal error occurred when saving the fax. Please try again * `Fax Send Error` - An error occurred when sending the fax. Please try again Generated by Python OpenAPI Parser """ Accepted = 'Accepted' Connected = 'Connected' Line_Busy = 'line Busy' Not_Answered = 'Not Answered' No_Answer = 'No Answer' Hang_Up = 'Hang Up' Stopped = 'Stopped' Internal_Error = 'Internal Error' No_Credit = 'No Credit' Restricted_Number = 'Restricted Number' Wrong_Number = 'Wrong Number' International_Disabled = 'International Disabled' International_Restricted = 'International Restricted' Bad_Number = 'Bad Number' Info_411_Restricted = 'Info 411 Restricted' Customer_611_Restricted = 'Customer 611 Restricted' No_Digital_Line = 'No Digital Line' Failed_Try_Again = 'Failed Try Again' Max_Call_Limit = 'Max Call Limit' Too_Many_Calls = 'Too Many Calls' Calls_Not_Accepted = 'Calls Not Accepted' Number_Not_Allowed = 'Number Not Allowed' Number_Blocked = 'Number Blocked' Number_Disabled = 'Number Disabled' Not_Allowed = 'Not Allowed' Resource_Error = 'Resource Error' Call_Loop = 'Call Loop' Fax_Not_Received = 'Fax Not Received' Fax_Partially_Sent = 'Fax Partially Sent' Fax_Not_Sent = 'Fax Not Sent' Fax_Poor_Line = 'Fax Poor Line' Fax_Prepare_Error = 'Fax Prepare Error' Fax_Save_Error = 'Fax Save Error' Fax_Send_Error = 'Fax Send Error' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserCallLogResponseRecordsItemLegsItemFromDevice(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a device """ uri: Optional[str] = None """ string to a device """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserCallLogResponseRecordsItemLegsItemFrom(DataClassJsonMixin): """ Caller information """ phone_number: Optional[str] = None """ Phone number of a party. Usually it is a plain number including country and area code like 18661234567. But sometimes it could be returned from database with some formatting applied, for example (866)123-4567. This property is filled in all cases where parties communicate by means of global phone numbers, for example when calling to direct numbers or sending/receiving SMS """ extension_number: Optional[str] = None """ Extension short number (usually 3 or 4 digits). This property is filled when parties communicate by means of short internal numbers, for example when calling to other extension or sending/receiving Company Pager message """ extension_id: Optional[str] = None """ Internal identifier of an extension """ location: Optional[str] = None """ Contains party location (city, state) if one can be determined from phoneNumber. This property is filled only when phoneNumber is not empty and server can calculate location information from it (for example, this information is unavailable for US toll-free numbers) """ name: Optional[str] = None """ Symbolic name associated with a party. If the phone does not belong to the known extension, only the location is returned, the name is not determined then """ device: Optional[ReadUserCallLogResponseRecordsItemLegsItemFromDevice] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserCallLogResponseRecordsItemLegsItemToDevice(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a device """ uri: Optional[str] = None """ string to a device """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserCallLogResponseRecordsItemLegsItemTo(DataClassJsonMixin): """ Callee information """ phone_number: Optional[str] = None """ Phone number of a party. Usually it is a plain number including country and area code like 18661234567. But sometimes it could be returned from database with some formatting applied, for example (866)123-4567. This property is filled in all cases where parties communicate by means of global phone numbers, for example when calling to direct numbers or sending/receiving SMS """ extension_number: Optional[str] = None """ Extension short number (usually 3 or 4 digits). This property is filled when parties communicate by means of short internal numbers, for example when calling to other extension or sending/receiving Company Pager message """ extension_id: Optional[str] = None """ Internal identifier of an extension """ location: Optional[str] = None """ Contains party location (city, state) if one can be determined from phoneNumber. This property is filled only when phoneNumber is not empty and server can calculate location information from it (for example, this information is unavailable for US toll-free numbers) """ name: Optional[str] = None """ Symbolic name associated with a party. If the phone does not belong to the known extension, only the location is returned, the name is not determined then """ device: Optional[ReadUserCallLogResponseRecordsItemLegsItemToDevice] = None class ReadUserCallLogResponseRecordsItemLegsItemTransport(Enum): """ Call transport """ PSTN = 'PSTN' VoIP = 'VoIP' class ReadUserCallLogResponseRecordsItemLegsItemRecordingType(Enum): """ Indicates recording mode used """ Automatic = 'Automatic' OnDemand = 'OnDemand' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserCallLogResponseRecordsItemLegsItemRecording(DataClassJsonMixin): """ Call recording data. Returned if the call is recorded """ id: Optional[str] = None """ Internal identifier of the call recording """ uri: Optional[str] = None """ Link to the call recording metadata resource """ type: Optional[ReadUserCallLogResponseRecordsItemLegsItemRecordingType] = None """ Indicates recording mode used """ content_uri: Optional[str] = None """ Link to the call recording binary content """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserCallLogResponseRecordsItemLegsItemMessage(DataClassJsonMixin): """ Linked message (Fax/Voicemail) """ id: Optional[str] = None """ Internal identifier of a message """ type: Optional[str] = None """ Type of a message """ uri: Optional[str] = None """ Link to a message resource """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserCallLogResponseRecordsItemLegsItem(DataClassJsonMixin): action: Optional[ReadUserCallLogResponseRecordsItemLegsItemAction] = None """ Action description of the call operation """ direction: Optional[ReadUserCallLogResponseRecordsItemLegsItemDirection] = None """ Call direction """ billing: Optional[ReadUserCallLogResponseRecordsItemLegsItemBilling] = None """ Billing information related to the call """ delegate: Optional[ReadUserCallLogResponseRecordsItemLegsItemDelegate] = None """ Information on a delegate extension that actually implemented a call action. For Secretary call log the field is returned if the current extension implemented a call. For Boss call log the field contains information on a Secretary extension which actually implemented a call on behalf of the current extension """ extension_id: Optional[str] = None """ Internal identifier of an extension """ duration: Optional[int] = None """ Call duration in seconds """ extension: Optional[ReadUserCallLogResponseRecordsItemLegsItemExtension] = None """ Information on extension """ leg_type: Optional[ReadUserCallLogResponseRecordsItemLegsItemLegType] = None """ Leg type """ start_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ The call start datetime in (ISO 8601)[https://en.wikipedia.org/wiki/ISO_8601] format including timezone, for example 2016-03-10T18:07:52.534Z """ type: Optional[ReadUserCallLogResponseRecordsItemLegsItemType] = None """ Call type """ result: Optional[ReadUserCallLogResponseRecordsItemLegsItemResult] = None """ Status description of the call operation """ reason: Optional[ReadUserCallLogResponseRecordsItemLegsItemReason] = None """ Reason of a call result: * `Accepted` - The call was connected to and accepted by this number * `Connected` - The call was answered, but there was no response on how to handle the call (for example, a voice mail system answered the call and did not push "1" to accept) * `Line Busy` - The phone number you dialed was busy * `Not Answered` - The phone number you dialed was not answered * `No Answer` - You did not answer the call * `Hang Up` - The caller hung up before the call was answered * `Stopped` - This attempt was stopped because the call was answered by another phone * `Internal Error` - An internal error occurred when making the call. Please try again * `No Credit` - There was not enough Calling Credit on your account to make this call * `Restricted Number` - The number you dialed is restricted by RingCentral * `Wrong Number` - The number you dialed has either been disconnected or is not a valid phone number. Please check the number and try again * `International Disabled` - International calling is not enabled on your account. Contact customer service to activate International Calling * `International Restricted` - The country and/or area you attempted to call has been prohibited by your administrator * `Bad Number` - An error occurred when making the call. Please check the number before trying again * `Info 411 Restricted` - Calling to 411 Information Services is restricted * `Customer 611 Restricted` - 611 customer service is not supported. Please contact customer service at <(888) 555-1212> * `No Digital Line` - This DigitalLine was either not plugged in or did not have an internet connection * `Failed Try Again` - Call failed. Please try again * `Max Call Limit` - The number of simultaneous calls to your account has reached its limit * `Too Many Calls` - The number of simultaneous calls for per DigitalLine associated with Other Phone has reached its limit. Please contact customer service * `Calls Not Accepted` - Your account was not accepting calls at this time * `Number Not Allowed` - The number that was dialed to access your account is not allowed * `Number Blocked` - This number is in your Blocked Numbers list * `Number Disabled` - The phone number and/or area you attempted to call has been prohibited by your administrator * `Resource Error` - An error occurred when making the call. Please try again * `Call Loop` - A call loop occurred due to an incorrect call forwarding configuration. Please check that you are not forwarding calls back to your own account * `Fax Not Received` - An incoming fax could not be received because a proper connection with the sender's fax machine could not be established * `Fax Partially Sent` - The fax was only partially sent. Possible explanations include phone line quality to poor to maintain the connection or the call was dropped * `Fax Not Sent` - An attempt to send the fax was made, but could not connect with the receiving fax machine * `Fax Poor Line` - An attempt to send the fax was made, but the phone line quality was too poor to send the fax * `Fax Prepare Error` - An internal error occurred when preparing the fax. Please try again * `Fax Save Error` - An internal error occurred when saving the fax. Please try again * `Fax Send Error` - An error occurred when sending the fax. Please try again """ reason_description: Optional[str] = None from_: Optional[ReadUserCallLogResponseRecordsItemLegsItemFrom] = field(metadata=config(field_name='from'), default=None) """ Caller information """ to: Optional[ReadUserCallLogResponseRecordsItemLegsItemTo] = None """ Callee information """ transport: Optional[ReadUserCallLogResponseRecordsItemLegsItemTransport] = None """ Call transport """ recording: Optional[ReadUserCallLogResponseRecordsItemLegsItemRecording] = None """ Call recording data. Returned if the call is recorded """ short_recording: Optional[bool] = None """ Indicates that the recording is too short and therefore wouldn't be returned. The flag is not returned if the value is false """ master: Optional[bool] = None """ Returned for 'Detailed' call log. Specifies if the leg is master-leg """ message: Optional[ReadUserCallLogResponseRecordsItemLegsItemMessage] = None """ Linked message (Fax/Voicemail) """ telephony_session_id: Optional[str] = None """ Telephony identifier of a call session """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserCallLogResponseRecordsItemBilling(DataClassJsonMixin): """ Billing information related to the call """ cost_included: Optional[float] = None """ Cost per minute, paid and already included in your RingCentral Plan. For example International Calls """ cost_purchased: Optional[float] = None """ Cost per minute, paid and not included in your RingCentral Plan """ class ReadUserCallLogResponseRecordsItemDirection(Enum): """ Call direction """ Inbound = 'Inbound' Outbound = 'Outbound' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserCallLogResponseRecordsItemMessage(DataClassJsonMixin): """ Linked message (Fax/Voicemail) """ id: Optional[str] = None """ Internal identifier of a message """ type: Optional[str] = None """ Type of a message """ uri: Optional[str] = None """ Link to a message resource """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserCallLogResponseRecordsItemDelegate(DataClassJsonMixin): """ Information on a delegate extension that actually implemented a call action. For Secretary call log the field is returned if the current extension implemented a call. For Boss call log the field contains information on a Secretary extension which actually implemented a call on behalf of the current extension Generated by Python OpenAPI Parser """ id: Optional[str] = None """ Internal identifier of a Secretary extension """ name: Optional[str] = None """ Custom name of a Secretary extension """ class ReadUserCallLogResponseRecordsItemRecordingType(Enum): """ Indicates recording mode used """ Automatic = 'Automatic' OnDemand = 'OnDemand' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserCallLogResponseRecordsItemRecording(DataClassJsonMixin): """ Call recording data. Returned if a call is recorded """ id: Optional[str] = None """ Internal identifier of the call recording """ uri: Optional[str] = None """ Link to the call recording metadata resource """ type: Optional[ReadUserCallLogResponseRecordsItemRecordingType] = None """ Indicates recording mode used """ content_uri: Optional[str] = None """ Link to the call recording binary content """ class ReadUserCallLogResponseRecordsItemAction(Enum): """ Action description of the call operation """ Unknown = 'Unknown' Phone_Login = 'Phone Login' Calling_Card = 'Calling Card' VoIP_Call = 'VoIP Call' Phone_Call = 'Phone Call' Paging = 'Paging' Hunting = 'Hunting' Call_Park = 'Call Park' Monitoring = 'Monitoring' Text_Relay = 'Text Relay' External_Application = 'External Application' Park_Location = 'Park Location' CallOut_CallMe = 'CallOut-CallMe' Conference_Call = 'Conference Call' Move = 'Move' RC_Meetings = 'RC Meetings' Accept_Call = 'Accept Call' FindMe = 'FindMe' FollowMe = 'FollowMe' RingMe = 'RingMe' Transfer = 'Transfer' Call_Return = 'Call Return' Ring_Directly = 'Ring Directly' RingOut_Web = 'RingOut Web' RingOut_PC = 'RingOut PC' RingOut_Mobile = 'RingOut Mobile' Emergency = 'Emergency' E911_Update = 'E911 Update' Support = 'Support' Incoming_Fax = 'Incoming Fax' Outgoing_Fax = 'Outgoing Fax' class ReadUserCallLogResponseRecordsItemResult(Enum): """ Status description of the call operation """ Unknown = 'Unknown' Accepted = 'Accepted' CallConnected = 'Call connected' In_Progress = 'In Progress' Voicemail = 'Voicemail' Reply = 'Reply' Missed = 'Missed' Busy = 'Busy' Rejected = 'Rejected' No_Answer = 'No Answer' Hang_Up = 'Hang Up' Blocked = 'Blocked' SuspendedAccount = 'Suspended account' Call_Failed = 'Call Failed' Call_Failure = 'Call Failure' Internal_Error = 'Internal Error' IP_Phone_Offline = 'IP Phone Offline' No_Calling_Credit = 'No Calling Credit' Not_Allowed = 'Not Allowed' Restricted_Number = 'Restricted Number' Wrong_Number = 'Wrong Number' Answered_Not_Accepted = 'Answered Not Accepted' Stopped = 'Stopped' International_Disabled = 'International Disabled' International_Restricted = 'International Restricted' Abandoned = 'Abandoned' Declined = 'Declined' Received = 'Received' FaxOn_Demand = 'Fax on Demand' Partial_Receive = 'Partial Receive' Receive_Error = 'Receive Error' Fax_Receipt_Error = 'Fax Receipt Error' Sent = 'Sent' Fax_Partially_Sent = 'Fax Partially Sent' Send_Error = 'Send Error' Fax_Not_Sent = 'Fax Not Sent' Fax_Poor_Line = 'Fax Poor Line' class ReadUserCallLogResponseRecordsItemReason(Enum): """ Reason of a call result: * `Accepted` - The call was connected to and accepted by this number * `Connected` - The call was answered, but there was no response on how to handle the call (for example, a voice mail system answered the call and did not push "1" to accept) * `Line Busy` - The phone number you dialed was busy * `Not Answered` - The phone number you dialed was not answered * `No Answer` - You did not answer the call * `Hang Up` - The caller hung up before the call was answered * `Stopped` - This attempt was stopped because the call was answered by another phone * `Internal Error` - An internal error occurred when making the call. Please try again * `No Credit` - There was not enough Calling Credit on your account to make this call * `Restricted Number` - The number you dialed is restricted by RingCentral * `Wrong Number` - The number you dialed has either been disconnected or is not a valid phone number. Please check the number and try again * `International Disabled` - International calling is not enabled on your account. Contact customer service to activate International Calling * `International Restricted` - The country and/or area you attempted to call has been prohibited by your administrator * `Bad Number` - An error occurred when making the call. Please check the number before trying again * `Info 411 Restricted` - Calling to 411 Information Services is restricted * `Customer 611 Restricted` - 611 customer service is not supported. Please contact customer service at <(888) 555-1212> * `No Digital Line` - This DigitalLine was either not plugged in or did not have an internet connection * `Failed Try Again` - Call failed. Please try again * `Max Call Limit` - The number of simultaneous calls to your account has reached its limit * `Too Many Calls` - The number of simultaneous calls for per DigitalLine associated with Other Phone has reached its limit. Please contact customer service * `Calls Not Accepted` - Your account was not accepting calls at this time * `Number Not Allowed` - The number that was dialed to access your account is not allowed * `Number Blocked` - This number is in your Blocked Numbers list * `Number Disabled` - The phone number and/or area you attempted to call has been prohibited by your administrator * `Resource Error` - An error occurred when making the call. Please try again * `Call Loop` - A call loop occurred due to an incorrect call forwarding configuration. Please check that you are not forwarding calls back to your own account * `Fax Not Received` - An incoming fax could not be received because a proper connection with the sender's fax machine could not be established * `Fax Partially Sent` - The fax was only partially sent. Possible explanations include phone line quality to poor to maintain the connection or the call was dropped * `Fax Not Sent` - An attempt to send the fax was made, but could not connect with the receiving fax machine * `Fax Poor Line` - An attempt to send the fax was made, but the phone line quality was too poor to send the fax * `Fax Prepare Error` - An internal error occurred when preparing the fax. Please try again * `Fax Save Error` - An internal error occurred when saving the fax. Please try again * `Fax Send Error` - An error occurred when sending the fax. Please try again Generated by Python OpenAPI Parser """ Accepted = 'Accepted' Connected = 'Connected' Line_Busy = 'line Busy' Not_Answered = 'Not Answered' No_Answer = 'No Answer' Hang_Up = 'Hang Up' Stopped = 'Stopped' Internal_Error = 'Internal Error' No_Credit = 'No Credit' Restricted_Number = 'Restricted Number' Wrong_Number = 'Wrong Number' International_Disabled = 'International Disabled' International_Restricted = 'International Restricted' Bad_Number = 'Bad Number' Info_411_Restricted = 'Info 411 Restricted' Customer_611_Restricted = 'Customer 611 Restricted' No_Digital_Line = 'No Digital Line' Failed_Try_Again = 'Failed Try Again' Max_Call_Limit = 'Max Call Limit' Too_Many_Calls = 'Too Many Calls' Calls_Not_Accepted = 'Calls Not Accepted' Number_Not_Allowed = 'Number Not Allowed' Number_Blocked = 'Number Blocked' Number_Disabled = 'Number Disabled' Resource_Error = 'Resource Error' Call_Loop = 'Call Loop' Fax_Not_Received = 'Fax Not Received' Fax_Partially_Sent = 'Fax Partially Sent' Fax_Not_Sent = 'Fax Not Sent' Fax_Poor_Line = 'Fax Poor Line' Fax_Prepare_Error = 'Fax Prepare Error' Fax_Save_Error = 'Fax Save Error' Fax_Send_Error = 'Fax Send Error' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserCallLogResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a cal log record """ uri: Optional[str] = None """ Canonical URI of a call log record """ session_id: Optional[str] = None """ Internal identifier of a call session """ telephony_session_id: Optional[str] = None """ Telephony identifier of a call session """ from_: Optional[ReadUserCallLogResponseRecordsItemFrom] = field(metadata=config(field_name='from'), default=None) to: Optional[ReadUserCallLogResponseRecordsItemTo] = None extension: Optional[ReadUserCallLogResponseRecordsItemExtension] = None type: Optional[ReadUserCallLogResponseRecordsItemType] = None """ Call type """ transport: Optional[ReadUserCallLogResponseRecordsItemTransport] = None """ For 'Detailed' view only. Call transport """ legs: Optional[List[ReadUserCallLogResponseRecordsItemLegsItem]] = None """ For 'Detailed' view only. Leg description """ billing: Optional[ReadUserCallLogResponseRecordsItemBilling] = None """ Billing information related to the call """ direction: Optional[ReadUserCallLogResponseRecordsItemDirection] = None """ Call direction """ message: Optional[ReadUserCallLogResponseRecordsItemMessage] = None """ Linked message (Fax/Voicemail) """ start_time: Optional[str] = None """ The call start datetime in (ISO 8601)[https://en.wikipedia.org/wiki/ISO_8601] format including timezone, for example 2016-03-10T18:07:52.534Z """ delegate: Optional[ReadUserCallLogResponseRecordsItemDelegate] = None """ Information on a delegate extension that actually implemented a call action. For Secretary call log the field is returned if the current extension implemented a call. For Boss call log the field contains information on a Secretary extension which actually implemented a call on behalf of the current extension """ deleted: Optional[bool] = None """ Indicates whether the record is deleted. Returned for deleted records, for ISync requests """ duration: Optional[int] = None """ Call duration in seconds """ last_modified_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ For 'Detailed' view only. The datetime when the call log record was modified in (ISO 8601)[https://en.wikipedia.org/wiki/ISO_8601] format including timezone, for example 2016-03-10T18:07:52.534Z """ recording: Optional[ReadUserCallLogResponseRecordsItemRecording] = None """ Call recording data. Returned if a call is recorded """ short_recording: Optional[bool] = None """ Indicates that the recording is too short and therefore wouldn't be returned. The flag is not returned if the value is false """ action: Optional[ReadUserCallLogResponseRecordsItemAction] = None """ Action description of the call operation """ result: Optional[ReadUserCallLogResponseRecordsItemResult] = None """ Status description of the call operation """ reason: Optional[ReadUserCallLogResponseRecordsItemReason] = None """ Reason of a call result: * `Accepted` - The call was connected to and accepted by this number * `Connected` - The call was answered, but there was no response on how to handle the call (for example, a voice mail system answered the call and did not push "1" to accept) * `Line Busy` - The phone number you dialed was busy * `Not Answered` - The phone number you dialed was not answered * `No Answer` - You did not answer the call * `Hang Up` - The caller hung up before the call was answered * `Stopped` - This attempt was stopped because the call was answered by another phone * `Internal Error` - An internal error occurred when making the call. Please try again * `No Credit` - There was not enough Calling Credit on your account to make this call * `Restricted Number` - The number you dialed is restricted by RingCentral * `Wrong Number` - The number you dialed has either been disconnected or is not a valid phone number. Please check the number and try again * `International Disabled` - International calling is not enabled on your account. Contact customer service to activate International Calling * `International Restricted` - The country and/or area you attempted to call has been prohibited by your administrator * `Bad Number` - An error occurred when making the call. Please check the number before trying again * `Info 411 Restricted` - Calling to 411 Information Services is restricted * `Customer 611 Restricted` - 611 customer service is not supported. Please contact customer service at <(888) 555-1212> * `No Digital Line` - This DigitalLine was either not plugged in or did not have an internet connection * `Failed Try Again` - Call failed. Please try again * `Max Call Limit` - The number of simultaneous calls to your account has reached its limit * `Too Many Calls` - The number of simultaneous calls for per DigitalLine associated with Other Phone has reached its limit. Please contact customer service * `Calls Not Accepted` - Your account was not accepting calls at this time * `Number Not Allowed` - The number that was dialed to access your account is not allowed * `Number Blocked` - This number is in your Blocked Numbers list * `Number Disabled` - The phone number and/or area you attempted to call has been prohibited by your administrator * `Resource Error` - An error occurred when making the call. Please try again * `Call Loop` - A call loop occurred due to an incorrect call forwarding configuration. Please check that you are not forwarding calls back to your own account * `Fax Not Received` - An incoming fax could not be received because a proper connection with the sender's fax machine could not be established * `Fax Partially Sent` - The fax was only partially sent. Possible explanations include phone line quality to poor to maintain the connection or the call was dropped * `Fax Not Sent` - An attempt to send the fax was made, but could not connect with the receiving fax machine * `Fax Poor Line` - An attempt to send the fax was made, but the phone line quality was too poor to send the fax * `Fax Prepare Error` - An internal error occurred when preparing the fax. Please try again * `Fax Save Error` - An internal error occurred when saving the fax. Please try again * `Fax Send Error` - An error occurred when sending the fax. Please try again """ reason_description: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserCallLogResponseNavigationFirstPage(DataClassJsonMixin): """ Canonical URI for the first page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserCallLogResponseNavigationNextPage(DataClassJsonMixin): """ Canonical URI for the next page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserCallLogResponseNavigationPreviousPage(DataClassJsonMixin): """ Canonical URI for the previous page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserCallLogResponseNavigationLastPage(DataClassJsonMixin): """ Canonical URI for the last page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserCallLogResponseNavigation(DataClassJsonMixin): """ Information on navigation """ first_page: Optional[ReadUserCallLogResponseNavigationFirstPage] = None """ Canonical URI for the first page of the list """ next_page: Optional[ReadUserCallLogResponseNavigationNextPage] = None """ Canonical URI for the next page of the list """ previous_page: Optional[ReadUserCallLogResponseNavigationPreviousPage] = None """ Canonical URI for the previous page of the list """ last_page: Optional[ReadUserCallLogResponseNavigationLastPage] = None """ Canonical URI for the last page of the list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserCallLogResponsePaging(DataClassJsonMixin): """ Information on paging """ page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) """ per_page: Optional[int] = 100 """ Current page size, describes how many items are in each page. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty """ total_pages: Optional[int] = None """ The total number of pages in a dataset. May be omitted for some resources due to performance reasons """ total_elements: Optional[int] = None """ The total number of elements in a dataset. May be omitted for some resource due to performance reasons """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserCallLogResponse(DataClassJsonMixin): """ Required Properties: - navigation - paging - records Generated by Python OpenAPI Parser """ records: List[ReadUserCallLogResponseRecordsItem] """ List of call log records """ navigation: ReadUserCallLogResponseNavigation """ Information on navigation """ paging: ReadUserCallLogResponsePaging """ Information on paging """ class DeleteUserCallLogTypeItem(Enum): Voice = 'Voice' Fax = 'Fax' class DeleteUserCallLogDirectionItem(Enum): Inbound = 'Inbound' Outbound = 'Outbound' class SyncUserCallLogSyncTypeItem(Enum): FSync = 'FSync' ISync = 'ISync' class SyncUserCallLogStatusGroupItem(Enum): Missed = 'Missed' All = 'All' class SyncUserCallLogView(Enum): Simple = 'Simple' Detailed = 'Detailed' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SyncUserCallLogResponseRecordsItemFromDevice(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a device """ uri: Optional[str] = None """ string to a device """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SyncUserCallLogResponseRecordsItemFrom(DataClassJsonMixin): phone_number: Optional[str] = None """ Phone number of a party. Usually it is a plain number including country and area code like 18661234567. But sometimes it could be returned from database with some formatting applied, for example (866)123-4567. This property is filled in all cases where parties communicate by means of global phone numbers, for example when calling to direct numbers or sending/receiving SMS """ extension_number: Optional[str] = None """ Extension short number (usually 3 or 4 digits). This property is filled when parties communicate by means of short internal numbers, for example when calling to other extension or sending/receiving Company Pager message """ extension_id: Optional[str] = None """ Internal identifier of an extension """ location: Optional[str] = None """ Contains party location (city, state) if one can be determined from phoneNumber. This property is filled only when phoneNumber is not empty and server can calculate location information from it (for example, this information is unavailable for US toll-free numbers) """ name: Optional[str] = None """ Symbolic name associated with a party. If the phone does not belong to the known extension, only the location is returned, the name is not determined then """ device: Optional[SyncUserCallLogResponseRecordsItemFromDevice] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SyncUserCallLogResponseRecordsItemToDevice(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a device """ uri: Optional[str] = None """ string to a device """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SyncUserCallLogResponseRecordsItemTo(DataClassJsonMixin): phone_number: Optional[str] = None """ Phone number of a party. Usually it is a plain number including country and area code like 18661234567. But sometimes it could be returned from database with some formatting applied, for example (866)123-4567. This property is filled in all cases where parties communicate by means of global phone numbers, for example when calling to direct numbers or sending/receiving SMS """ extension_number: Optional[str] = None """ Extension short number (usually 3 or 4 digits). This property is filled when parties communicate by means of short internal numbers, for example when calling to other extension or sending/receiving Company Pager message """ extension_id: Optional[str] = None """ Internal identifier of an extension """ location: Optional[str] = None """ Contains party location (city, state) if one can be determined from phoneNumber. This property is filled only when phoneNumber is not empty and server can calculate location information from it (for example, this information is unavailable for US toll-free numbers) """ name: Optional[str] = None """ Symbolic name associated with a party. If the phone does not belong to the known extension, only the location is returned, the name is not determined then """ device: Optional[SyncUserCallLogResponseRecordsItemToDevice] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SyncUserCallLogResponseRecordsItemExtension(DataClassJsonMixin): id: Optional[int] = None """ Internal identifier of an extension """ uri: Optional[str] = None """ Canonical URI of an extension """ class SyncUserCallLogResponseRecordsItemType(Enum): """ Call type """ Voice = 'Voice' Fax = 'Fax' class SyncUserCallLogResponseRecordsItemTransport(Enum): """ For 'Detailed' view only. Call transport """ PSTN = 'PSTN' VoIP = 'VoIP' class SyncUserCallLogResponseRecordsItemLegsItemAction(Enum): """ Action description of the call operation """ Unknown = 'Unknown' Phone_Call = 'Phone Call' Phone_Login = 'Phone Login' Incoming_Fax = 'Incoming Fax' Accept_Call = 'Accept Call' External_Application = 'External Application' FindMe = 'FindMe' FollowMe = 'FollowMe' Outgoing_Fax = 'Outgoing Fax' CallOut_CallMe = 'CallOut-CallMe' Call_Return = 'Call Return' Calling_Card = 'Calling Card' Monitoring = 'Monitoring' Ring_Directly = 'Ring Directly' RingOut_Web = 'RingOut Web' Text_Relay = 'Text Relay' VoIP_Call = 'VoIP Call' RingOut_PC = 'RingOut PC' RingMe = 'RingMe' Transfer = 'Transfer' OBJECT_411_Info = '411 Info' Emergency = 'Emergency' E911_Update = 'E911 Update' Support = 'Support' RingOut_Mobile = 'RingOut Mobile' MeetingsCall = 'MeetingsCall' SilentMonitoring = 'SilentMonitoring' class SyncUserCallLogResponseRecordsItemLegsItemDirection(Enum): """ Call direction """ Inbound = 'Inbound' Outbound = 'Outbound' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SyncUserCallLogResponseRecordsItemLegsItemBilling(DataClassJsonMixin): """ Billing information related to the call """ cost_included: Optional[float] = None """ Cost per minute, paid and already included in your RingCentral Plan. For example International Calls """ cost_purchased: Optional[float] = None """ Cost per minute, paid and not included in your RingCentral Plan """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SyncUserCallLogResponseRecordsItemLegsItemDelegate(DataClassJsonMixin): """ Information on a delegate extension that actually implemented a call action. For Secretary call log the field is returned if the current extension implemented a call. For Boss call log the field contains information on a Secretary extension which actually implemented a call on behalf of the current extension Generated by Python OpenAPI Parser """ id: Optional[str] = None """ Internal identifier of a Secretary extension """ name: Optional[str] = None """ Custom name of a Secretary extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SyncUserCallLogResponseRecordsItemLegsItemExtension(DataClassJsonMixin): """ Information on extension """ id: Optional[int] = None """ Internal identifier of an extension """ uri: Optional[str] = None """ Canonical URI of an extension """ class SyncUserCallLogResponseRecordsItemLegsItemLegType(Enum): """ Leg type """ SipForwarding = 'SipForwarding' ServiceMinus2 = 'ServiceMinus2' ServiceMinus3 = 'ServiceMinus3' PstnToSip = 'PstnToSip' Accept = 'Accept' FindMe = 'FindMe' FollowMe = 'FollowMe' TestCall = 'TestCall' FaxSent = 'FaxSent' CallBack = 'CallBack' CallingCard = 'CallingCard' RingDirectly = 'RingDirectly' RingOutWebToSubscriber = 'RingOutWebToSubscriber' RingOutWebToCaller = 'RingOutWebToCaller' SipToPstnMetered = 'SipToPstnMetered' RingOutClientToSubscriber = 'RingOutClientToSubscriber' RingOutClientToCaller = 'RingOutClientToCaller' RingMe = 'RingMe' TransferCall = 'TransferCall' SipToPstnUnmetered = 'SipToPstnUnmetered' RingOutDeviceToSubscriber = 'RingOutDeviceToSubscriber' RingOutDeviceToCaller = 'RingOutDeviceToCaller' RingOutOneLegToCaller = 'RingOutOneLegToCaller' ExtensionToExtension = 'ExtensionToExtension' CallPark = 'CallPark' PagingServer = 'PagingServer' Hunting = 'Hunting' OutgoingFreeSpDl = 'OutgoingFreeSpDl' ParkLocation = 'ParkLocation' ConferenceCall = 'ConferenceCall' MobileApp = 'MobileApp' Monitoring = 'Monitoring' MoveToConference = 'MoveToConference' Unknown = 'Unknown' class SyncUserCallLogResponseRecordsItemLegsItemType(Enum): """ Call type """ Voice = 'Voice' Fax = 'Fax' class SyncUserCallLogResponseRecordsItemLegsItemResult(Enum): """ Status description of the call operation """ Unknown = 'Unknown' Accepted = 'Accepted' CallConnected = 'Call connected' In_Progress = 'In Progress' Voicemail = 'Voicemail' Reply = 'Reply' Missed = 'Missed' Busy = 'Busy' Rejected = 'Rejected' No_Answer = 'No Answer' Hang_Up = 'Hang Up' Blocked = 'Blocked' SuspendedAccount = 'Suspended account' Call_Failed = 'Call Failed' Call_Failure = 'Call Failure' Internal_Error = 'Internal Error' IP_Phone_Offline = 'IP Phone Offline' No_Calling_Credit = 'No Calling Credit' Not_Allowed = 'Not Allowed' Restricted_Number = 'Restricted Number' Wrong_Number = 'Wrong Number' Answered_Not_Accepted = 'Answered Not Accepted' Stopped = 'Stopped' International_Disabled = 'International Disabled' International_Restricted = 'International Restricted' Abandoned = 'Abandoned' Declined = 'Declined' Received = 'Received' FaxOn_Demand = 'Fax on Demand' Partial_Receive = 'Partial Receive' Receive_Error = 'Receive Error' Fax_Receipt_Error = 'Fax Receipt Error' Sent = 'Sent' Fax_Partially_Sent = 'Fax Partially Sent' Send_Error = 'Send Error' Fax_Not_Sent = 'Fax Not Sent' Fax_Poor_Line = 'Fax Poor Line' class SyncUserCallLogResponseRecordsItemLegsItemReason(Enum): """ Reason of a call result: * `Accepted` - The call was connected to and accepted by this number * `Connected` - The call was answered, but there was no response on how to handle the call (for example, a voice mail system answered the call and did not push "1" to accept) * `Line Busy` - The phone number you dialed was busy * `Not Answered` - The phone number you dialed was not answered * `No Answer` - You did not answer the call * `Hang Up` - The caller hung up before the call was answered * `Stopped` - This attempt was stopped because the call was answered by another phone * `Internal Error` - An internal error occurred when making the call. Please try again * `No Credit` - There was not enough Calling Credit on your account to make this call * `Restricted Number` - The number you dialed is restricted by RingCentral * `Wrong Number` - The number you dialed has either been disconnected or is not a valid phone number. Please check the number and try again * `International Disabled` - International calling is not enabled on your account. Contact customer service to activate International Calling * `International Restricted` - The country and/or area you attempted to call has been prohibited by your administrator * `Bad Number` - An error occurred when making the call. Please check the number before trying again * `Info 411 Restricted` - Calling to 411 Information Services is restricted * `Customer 611 Restricted` - 611 customer service is not supported. Please contact customer service at <(888) 555-1212> * `No Digital Line` - This DigitalLine was either not plugged in or did not have an internet connection * `Failed Try Again` - Call failed. Please try again * `Max Call Limit` - The number of simultaneous calls to your account has reached its limit * `Too Many Calls` - The number of simultaneous calls for per DigitalLine associated with Other Phone has reached its limit. Please contact customer service * `Calls Not Accepted` - Your account was not accepting calls at this time * `Number Not Allowed` - The number that was dialed to access your account is not allowed * `Number Blocked` - This number is in your Blocked Numbers list * `Number Disabled` - The phone number and/or area you attempted to call has been prohibited by your administrator * `Resource Error` - An error occurred when making the call. Please try again * `Call Loop` - A call loop occurred due to an incorrect call forwarding configuration. Please check that you are not forwarding calls back to your own account * `Fax Not Received` - An incoming fax could not be received because a proper connection with the sender's fax machine could not be established * `Fax Partially Sent` - The fax was only partially sent. Possible explanations include phone line quality to poor to maintain the connection or the call was dropped * `Fax Not Sent` - An attempt to send the fax was made, but could not connect with the receiving fax machine * `Fax Poor Line` - An attempt to send the fax was made, but the phone line quality was too poor to send the fax * `Fax Prepare Error` - An internal error occurred when preparing the fax. Please try again * `Fax Save Error` - An internal error occurred when saving the fax. Please try again * `Fax Send Error` - An error occurred when sending the fax. Please try again Generated by Python OpenAPI Parser """ Accepted = 'Accepted' Connected = 'Connected' Line_Busy = 'line Busy' Not_Answered = 'Not Answered' No_Answer = 'No Answer' Hang_Up = 'Hang Up' Stopped = 'Stopped' Internal_Error = 'Internal Error' No_Credit = 'No Credit' Restricted_Number = 'Restricted Number' Wrong_Number = 'Wrong Number' International_Disabled = 'International Disabled' International_Restricted = 'International Restricted' Bad_Number = 'Bad Number' Info_411_Restricted = 'Info 411 Restricted' Customer_611_Restricted = 'Customer 611 Restricted' No_Digital_Line = 'No Digital Line' Failed_Try_Again = 'Failed Try Again' Max_Call_Limit = 'Max Call Limit' Too_Many_Calls = 'Too Many Calls' Calls_Not_Accepted = 'Calls Not Accepted' Number_Not_Allowed = 'Number Not Allowed' Number_Blocked = 'Number Blocked' Number_Disabled = 'Number Disabled' Not_Allowed = 'Not Allowed' Resource_Error = 'Resource Error' Call_Loop = 'Call Loop' Fax_Not_Received = 'Fax Not Received' Fax_Partially_Sent = 'Fax Partially Sent' Fax_Not_Sent = 'Fax Not Sent' Fax_Poor_Line = 'Fax Poor Line' Fax_Prepare_Error = 'Fax Prepare Error' Fax_Save_Error = 'Fax Save Error' Fax_Send_Error = 'Fax Send Error' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SyncUserCallLogResponseRecordsItemLegsItemFromDevice(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a device """ uri: Optional[str] = None """ string to a device """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SyncUserCallLogResponseRecordsItemLegsItemFrom(DataClassJsonMixin): """ Caller information """ phone_number: Optional[str] = None """ Phone number of a party. Usually it is a plain number including country and area code like 18661234567. But sometimes it could be returned from database with some formatting applied, for example (866)123-4567. This property is filled in all cases where parties communicate by means of global phone numbers, for example when calling to direct numbers or sending/receiving SMS """ extension_number: Optional[str] = None """ Extension short number (usually 3 or 4 digits). This property is filled when parties communicate by means of short internal numbers, for example when calling to other extension or sending/receiving Company Pager message """ extension_id: Optional[str] = None """ Internal identifier of an extension """ location: Optional[str] = None """ Contains party location (city, state) if one can be determined from phoneNumber. This property is filled only when phoneNumber is not empty and server can calculate location information from it (for example, this information is unavailable for US toll-free numbers) """ name: Optional[str] = None """ Symbolic name associated with a party. If the phone does not belong to the known extension, only the location is returned, the name is not determined then """ device: Optional[SyncUserCallLogResponseRecordsItemLegsItemFromDevice] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SyncUserCallLogResponseRecordsItemLegsItemToDevice(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a device """ uri: Optional[str] = None """ string to a device """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SyncUserCallLogResponseRecordsItemLegsItemTo(DataClassJsonMixin): """ Callee information """ phone_number: Optional[str] = None """ Phone number of a party. Usually it is a plain number including country and area code like 18661234567. But sometimes it could be returned from database with some formatting applied, for example (866)123-4567. This property is filled in all cases where parties communicate by means of global phone numbers, for example when calling to direct numbers or sending/receiving SMS """ extension_number: Optional[str] = None """ Extension short number (usually 3 or 4 digits). This property is filled when parties communicate by means of short internal numbers, for example when calling to other extension or sending/receiving Company Pager message """ extension_id: Optional[str] = None """ Internal identifier of an extension """ location: Optional[str] = None """ Contains party location (city, state) if one can be determined from phoneNumber. This property is filled only when phoneNumber is not empty and server can calculate location information from it (for example, this information is unavailable for US toll-free numbers) """ name: Optional[str] = None """ Symbolic name associated with a party. If the phone does not belong to the known extension, only the location is returned, the name is not determined then """ device: Optional[SyncUserCallLogResponseRecordsItemLegsItemToDevice] = None class SyncUserCallLogResponseRecordsItemLegsItemTransport(Enum): """ Call transport """ PSTN = 'PSTN' VoIP = 'VoIP' class SyncUserCallLogResponseRecordsItemLegsItemRecordingType(Enum): """ Indicates recording mode used """ Automatic = 'Automatic' OnDemand = 'OnDemand' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SyncUserCallLogResponseRecordsItemLegsItemRecording(DataClassJsonMixin): """ Call recording data. Returned if the call is recorded """ id: Optional[str] = None """ Internal identifier of the call recording """ uri: Optional[str] = None """ Link to the call recording metadata resource """ type: Optional[SyncUserCallLogResponseRecordsItemLegsItemRecordingType] = None """ Indicates recording mode used """ content_uri: Optional[str] = None """ Link to the call recording binary content """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SyncUserCallLogResponseRecordsItemLegsItemMessage(DataClassJsonMixin): """ Linked message (Fax/Voicemail) """ id: Optional[str] = None """ Internal identifier of a message """ type: Optional[str] = None """ Type of a message """ uri: Optional[str] = None """ Link to a message resource """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SyncUserCallLogResponseRecordsItemLegsItem(DataClassJsonMixin): action: Optional[SyncUserCallLogResponseRecordsItemLegsItemAction] = None """ Action description of the call operation """ direction: Optional[SyncUserCallLogResponseRecordsItemLegsItemDirection] = None """ Call direction """ billing: Optional[SyncUserCallLogResponseRecordsItemLegsItemBilling] = None """ Billing information related to the call """ delegate: Optional[SyncUserCallLogResponseRecordsItemLegsItemDelegate] = None """ Information on a delegate extension that actually implemented a call action. For Secretary call log the field is returned if the current extension implemented a call. For Boss call log the field contains information on a Secretary extension which actually implemented a call on behalf of the current extension """ extension_id: Optional[str] = None """ Internal identifier of an extension """ duration: Optional[int] = None """ Call duration in seconds """ extension: Optional[SyncUserCallLogResponseRecordsItemLegsItemExtension] = None """ Information on extension """ leg_type: Optional[SyncUserCallLogResponseRecordsItemLegsItemLegType] = None """ Leg type """ start_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ The call start datetime in (ISO 8601)[https://en.wikipedia.org/wiki/ISO_8601] format including timezone, for example 2016-03-10T18:07:52.534Z """ type: Optional[SyncUserCallLogResponseRecordsItemLegsItemType] = None """ Call type """ result: Optional[SyncUserCallLogResponseRecordsItemLegsItemResult] = None """ Status description of the call operation """ reason: Optional[SyncUserCallLogResponseRecordsItemLegsItemReason] = None """ Reason of a call result: * `Accepted` - The call was connected to and accepted by this number * `Connected` - The call was answered, but there was no response on how to handle the call (for example, a voice mail system answered the call and did not push "1" to accept) * `Line Busy` - The phone number you dialed was busy * `Not Answered` - The phone number you dialed was not answered * `No Answer` - You did not answer the call * `Hang Up` - The caller hung up before the call was answered * `Stopped` - This attempt was stopped because the call was answered by another phone * `Internal Error` - An internal error occurred when making the call. Please try again * `No Credit` - There was not enough Calling Credit on your account to make this call * `Restricted Number` - The number you dialed is restricted by RingCentral * `Wrong Number` - The number you dialed has either been disconnected or is not a valid phone number. Please check the number and try again * `International Disabled` - International calling is not enabled on your account. Contact customer service to activate International Calling * `International Restricted` - The country and/or area you attempted to call has been prohibited by your administrator * `Bad Number` - An error occurred when making the call. Please check the number before trying again * `Info 411 Restricted` - Calling to 411 Information Services is restricted * `Customer 611 Restricted` - 611 customer service is not supported. Please contact customer service at <(888) 555-1212> * `No Digital Line` - This DigitalLine was either not plugged in or did not have an internet connection * `Failed Try Again` - Call failed. Please try again * `Max Call Limit` - The number of simultaneous calls to your account has reached its limit * `Too Many Calls` - The number of simultaneous calls for per DigitalLine associated with Other Phone has reached its limit. Please contact customer service * `Calls Not Accepted` - Your account was not accepting calls at this time * `Number Not Allowed` - The number that was dialed to access your account is not allowed * `Number Blocked` - This number is in your Blocked Numbers list * `Number Disabled` - The phone number and/or area you attempted to call has been prohibited by your administrator * `Resource Error` - An error occurred when making the call. Please try again * `Call Loop` - A call loop occurred due to an incorrect call forwarding configuration. Please check that you are not forwarding calls back to your own account * `Fax Not Received` - An incoming fax could not be received because a proper connection with the sender's fax machine could not be established * `Fax Partially Sent` - The fax was only partially sent. Possible explanations include phone line quality to poor to maintain the connection or the call was dropped * `Fax Not Sent` - An attempt to send the fax was made, but could not connect with the receiving fax machine * `Fax Poor Line` - An attempt to send the fax was made, but the phone line quality was too poor to send the fax * `Fax Prepare Error` - An internal error occurred when preparing the fax. Please try again * `Fax Save Error` - An internal error occurred when saving the fax. Please try again * `Fax Send Error` - An error occurred when sending the fax. Please try again """ reason_description: Optional[str] = None from_: Optional[SyncUserCallLogResponseRecordsItemLegsItemFrom] = field(metadata=config(field_name='from'), default=None) """ Caller information """ to: Optional[SyncUserCallLogResponseRecordsItemLegsItemTo] = None """ Callee information """ transport: Optional[SyncUserCallLogResponseRecordsItemLegsItemTransport] = None """ Call transport """ recording: Optional[SyncUserCallLogResponseRecordsItemLegsItemRecording] = None """ Call recording data. Returned if the call is recorded """ short_recording: Optional[bool] = None """ Indicates that the recording is too short and therefore wouldn't be returned. The flag is not returned if the value is false """ master: Optional[bool] = None """ Returned for 'Detailed' call log. Specifies if the leg is master-leg """ message: Optional[SyncUserCallLogResponseRecordsItemLegsItemMessage] = None """ Linked message (Fax/Voicemail) """ telephony_session_id: Optional[str] = None """ Telephony identifier of a call session """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SyncUserCallLogResponseRecordsItemBilling(DataClassJsonMixin): """ Billing information related to the call """ cost_included: Optional[float] = None """ Cost per minute, paid and already included in your RingCentral Plan. For example International Calls """ cost_purchased: Optional[float] = None """ Cost per minute, paid and not included in your RingCentral Plan """ class SyncUserCallLogResponseRecordsItemDirection(Enum): """ Call direction """ Inbound = 'Inbound' Outbound = 'Outbound' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SyncUserCallLogResponseRecordsItemMessage(DataClassJsonMixin): """ Linked message (Fax/Voicemail) """ id: Optional[str] = None """ Internal identifier of a message """ type: Optional[str] = None """ Type of a message """ uri: Optional[str] = None """ Link to a message resource """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SyncUserCallLogResponseRecordsItemDelegate(DataClassJsonMixin): """ Information on a delegate extension that actually implemented a call action. For Secretary call log the field is returned if the current extension implemented a call. For Boss call log the field contains information on a Secretary extension which actually implemented a call on behalf of the current extension Generated by Python OpenAPI Parser """ id: Optional[str] = None """ Internal identifier of a Secretary extension """ name: Optional[str] = None """ Custom name of a Secretary extension """ class SyncUserCallLogResponseRecordsItemRecordingType(Enum): """ Indicates recording mode used """ Automatic = 'Automatic' OnDemand = 'OnDemand' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SyncUserCallLogResponseRecordsItemRecording(DataClassJsonMixin): """ Call recording data. Returned if a call is recorded """ id: Optional[str] = None """ Internal identifier of the call recording """ uri: Optional[str] = None """ Link to the call recording metadata resource """ type: Optional[SyncUserCallLogResponseRecordsItemRecordingType] = None """ Indicates recording mode used """ content_uri: Optional[str] = None """ Link to the call recording binary content """ class SyncUserCallLogResponseRecordsItemAction(Enum): """ Action description of the call operation """ Unknown = 'Unknown' Phone_Login = 'Phone Login' Calling_Card = 'Calling Card' VoIP_Call = 'VoIP Call' Phone_Call = 'Phone Call' Paging = 'Paging' Hunting = 'Hunting' Call_Park = 'Call Park' Monitoring = 'Monitoring' Text_Relay = 'Text Relay' External_Application = 'External Application' Park_Location = 'Park Location' CallOut_CallMe = 'CallOut-CallMe' Conference_Call = 'Conference Call' Move = 'Move' RC_Meetings = 'RC Meetings' Accept_Call = 'Accept Call' FindMe = 'FindMe' FollowMe = 'FollowMe' RingMe = 'RingMe' Transfer = 'Transfer' Call_Return = 'Call Return' Ring_Directly = 'Ring Directly' RingOut_Web = 'RingOut Web' RingOut_PC = 'RingOut PC' RingOut_Mobile = 'RingOut Mobile' Emergency = 'Emergency' E911_Update = 'E911 Update' Support = 'Support' Incoming_Fax = 'Incoming Fax' Outgoing_Fax = 'Outgoing Fax' class SyncUserCallLogResponseRecordsItemResult(Enum): """ Status description of the call operation """ Unknown = 'Unknown' Accepted = 'Accepted' CallConnected = 'Call connected' In_Progress = 'In Progress' Voicemail = 'Voicemail' Reply = 'Reply' Missed = 'Missed' Busy = 'Busy' Rejected = 'Rejected' No_Answer = 'No Answer' Hang_Up = 'Hang Up' Blocked = 'Blocked' SuspendedAccount = 'Suspended account' Call_Failed = 'Call Failed' Call_Failure = 'Call Failure' Internal_Error = 'Internal Error' IP_Phone_Offline = 'IP Phone Offline' No_Calling_Credit = 'No Calling Credit' Not_Allowed = 'Not Allowed' Restricted_Number = 'Restricted Number' Wrong_Number = 'Wrong Number' Answered_Not_Accepted = 'Answered Not Accepted' Stopped = 'Stopped' International_Disabled = 'International Disabled' International_Restricted = 'International Restricted' Abandoned = 'Abandoned' Declined = 'Declined' Received = 'Received' FaxOn_Demand = 'Fax on Demand' Partial_Receive = 'Partial Receive' Receive_Error = 'Receive Error' Fax_Receipt_Error = 'Fax Receipt Error' Sent = 'Sent' Fax_Partially_Sent = 'Fax Partially Sent' Send_Error = 'Send Error' Fax_Not_Sent = 'Fax Not Sent' Fax_Poor_Line = 'Fax Poor Line' class SyncUserCallLogResponseRecordsItemReason(Enum): """ Reason of a call result: * `Accepted` - The call was connected to and accepted by this number * `Connected` - The call was answered, but there was no response on how to handle the call (for example, a voice mail system answered the call and did not push "1" to accept) * `Line Busy` - The phone number you dialed was busy * `Not Answered` - The phone number you dialed was not answered * `No Answer` - You did not answer the call * `Hang Up` - The caller hung up before the call was answered * `Stopped` - This attempt was stopped because the call was answered by another phone * `Internal Error` - An internal error occurred when making the call. Please try again * `No Credit` - There was not enough Calling Credit on your account to make this call * `Restricted Number` - The number you dialed is restricted by RingCentral * `Wrong Number` - The number you dialed has either been disconnected or is not a valid phone number. Please check the number and try again * `International Disabled` - International calling is not enabled on your account. Contact customer service to activate International Calling * `International Restricted` - The country and/or area you attempted to call has been prohibited by your administrator * `Bad Number` - An error occurred when making the call. Please check the number before trying again * `Info 411 Restricted` - Calling to 411 Information Services is restricted * `Customer 611 Restricted` - 611 customer service is not supported. Please contact customer service at <(888) 555-1212> * `No Digital Line` - This DigitalLine was either not plugged in or did not have an internet connection * `Failed Try Again` - Call failed. Please try again * `Max Call Limit` - The number of simultaneous calls to your account has reached its limit * `Too Many Calls` - The number of simultaneous calls for per DigitalLine associated with Other Phone has reached its limit. Please contact customer service * `Calls Not Accepted` - Your account was not accepting calls at this time * `Number Not Allowed` - The number that was dialed to access your account is not allowed * `Number Blocked` - This number is in your Blocked Numbers list * `Number Disabled` - The phone number and/or area you attempted to call has been prohibited by your administrator * `Resource Error` - An error occurred when making the call. Please try again * `Call Loop` - A call loop occurred due to an incorrect call forwarding configuration. Please check that you are not forwarding calls back to your own account * `Fax Not Received` - An incoming fax could not be received because a proper connection with the sender's fax machine could not be established * `Fax Partially Sent` - The fax was only partially sent. Possible explanations include phone line quality to poor to maintain the connection or the call was dropped * `Fax Not Sent` - An attempt to send the fax was made, but could not connect with the receiving fax machine * `Fax Poor Line` - An attempt to send the fax was made, but the phone line quality was too poor to send the fax * `Fax Prepare Error` - An internal error occurred when preparing the fax. Please try again * `Fax Save Error` - An internal error occurred when saving the fax. Please try again * `Fax Send Error` - An error occurred when sending the fax. Please try again Generated by Python OpenAPI Parser """ Accepted = 'Accepted' Connected = 'Connected' Line_Busy = 'line Busy' Not_Answered = 'Not Answered' No_Answer = 'No Answer' Hang_Up = 'Hang Up' Stopped = 'Stopped' Internal_Error = 'Internal Error' No_Credit = 'No Credit' Restricted_Number = 'Restricted Number' Wrong_Number = 'Wrong Number' International_Disabled = 'International Disabled' International_Restricted = 'International Restricted' Bad_Number = 'Bad Number' Info_411_Restricted = 'Info 411 Restricted' Customer_611_Restricted = 'Customer 611 Restricted' No_Digital_Line = 'No Digital Line' Failed_Try_Again = 'Failed Try Again' Max_Call_Limit = 'Max Call Limit' Too_Many_Calls = 'Too Many Calls' Calls_Not_Accepted = 'Calls Not Accepted' Number_Not_Allowed = 'Number Not Allowed' Number_Blocked = 'Number Blocked' Number_Disabled = 'Number Disabled' Resource_Error = 'Resource Error' Call_Loop = 'Call Loop' Fax_Not_Received = 'Fax Not Received' Fax_Partially_Sent = 'Fax Partially Sent' Fax_Not_Sent = 'Fax Not Sent' Fax_Poor_Line = 'Fax Poor Line' Fax_Prepare_Error = 'Fax Prepare Error' Fax_Save_Error = 'Fax Save Error' Fax_Send_Error = 'Fax Send Error' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SyncUserCallLogResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a cal log record """ uri: Optional[str] = None """ Canonical URI of a call log record """ session_id: Optional[str] = None """ Internal identifier of a call session """ telephony_session_id: Optional[str] = None """ Telephony identifier of a call session """ from_: Optional[SyncUserCallLogResponseRecordsItemFrom] = field(metadata=config(field_name='from'), default=None) to: Optional[SyncUserCallLogResponseRecordsItemTo] = None extension: Optional[SyncUserCallLogResponseRecordsItemExtension] = None type: Optional[SyncUserCallLogResponseRecordsItemType] = None """ Call type """ transport: Optional[SyncUserCallLogResponseRecordsItemTransport] = None """ For 'Detailed' view only. Call transport """ legs: Optional[List[SyncUserCallLogResponseRecordsItemLegsItem]] = None """ For 'Detailed' view only. Leg description """ billing: Optional[SyncUserCallLogResponseRecordsItemBilling] = None """ Billing information related to the call """ direction: Optional[SyncUserCallLogResponseRecordsItemDirection] = None """ Call direction """ message: Optional[SyncUserCallLogResponseRecordsItemMessage] = None """ Linked message (Fax/Voicemail) """ start_time: Optional[str] = None """ The call start datetime in (ISO 8601)[https://en.wikipedia.org/wiki/ISO_8601] format including timezone, for example 2016-03-10T18:07:52.534Z """ delegate: Optional[SyncUserCallLogResponseRecordsItemDelegate] = None """ Information on a delegate extension that actually implemented a call action. For Secretary call log the field is returned if the current extension implemented a call. For Boss call log the field contains information on a Secretary extension which actually implemented a call on behalf of the current extension """ deleted: Optional[bool] = None """ Indicates whether the record is deleted. Returned for deleted records, for ISync requests """ duration: Optional[int] = None """ Call duration in seconds """ last_modified_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ For 'Detailed' view only. The datetime when the call log record was modified in (ISO 8601)[https://en.wikipedia.org/wiki/ISO_8601] format including timezone, for example 2016-03-10T18:07:52.534Z """ recording: Optional[SyncUserCallLogResponseRecordsItemRecording] = None """ Call recording data. Returned if a call is recorded """ short_recording: Optional[bool] = None """ Indicates that the recording is too short and therefore wouldn't be returned. The flag is not returned if the value is false """ action: Optional[SyncUserCallLogResponseRecordsItemAction] = None """ Action description of the call operation """ result: Optional[SyncUserCallLogResponseRecordsItemResult] = None """ Status description of the call operation """ reason: Optional[SyncUserCallLogResponseRecordsItemReason] = None """ Reason of a call result: * `Accepted` - The call was connected to and accepted by this number * `Connected` - The call was answered, but there was no response on how to handle the call (for example, a voice mail system answered the call and did not push "1" to accept) * `Line Busy` - The phone number you dialed was busy * `Not Answered` - The phone number you dialed was not answered * `No Answer` - You did not answer the call * `Hang Up` - The caller hung up before the call was answered * `Stopped` - This attempt was stopped because the call was answered by another phone * `Internal Error` - An internal error occurred when making the call. Please try again * `No Credit` - There was not enough Calling Credit on your account to make this call * `Restricted Number` - The number you dialed is restricted by RingCentral * `Wrong Number` - The number you dialed has either been disconnected or is not a valid phone number. Please check the number and try again * `International Disabled` - International calling is not enabled on your account. Contact customer service to activate International Calling * `International Restricted` - The country and/or area you attempted to call has been prohibited by your administrator * `Bad Number` - An error occurred when making the call. Please check the number before trying again * `Info 411 Restricted` - Calling to 411 Information Services is restricted * `Customer 611 Restricted` - 611 customer service is not supported. Please contact customer service at <(888) 555-1212> * `No Digital Line` - This DigitalLine was either not plugged in or did not have an internet connection * `Failed Try Again` - Call failed. Please try again * `Max Call Limit` - The number of simultaneous calls to your account has reached its limit * `Too Many Calls` - The number of simultaneous calls for per DigitalLine associated with Other Phone has reached its limit. Please contact customer service * `Calls Not Accepted` - Your account was not accepting calls at this time * `Number Not Allowed` - The number that was dialed to access your account is not allowed * `Number Blocked` - This number is in your Blocked Numbers list * `Number Disabled` - The phone number and/or area you attempted to call has been prohibited by your administrator * `Resource Error` - An error occurred when making the call. Please try again * `Call Loop` - A call loop occurred due to an incorrect call forwarding configuration. Please check that you are not forwarding calls back to your own account * `Fax Not Received` - An incoming fax could not be received because a proper connection with the sender's fax machine could not be established * `Fax Partially Sent` - The fax was only partially sent. Possible explanations include phone line quality to poor to maintain the connection or the call was dropped * `Fax Not Sent` - An attempt to send the fax was made, but could not connect with the receiving fax machine * `Fax Poor Line` - An attempt to send the fax was made, but the phone line quality was too poor to send the fax * `Fax Prepare Error` - An internal error occurred when preparing the fax. Please try again * `Fax Save Error` - An internal error occurred when saving the fax. Please try again * `Fax Send Error` - An error occurred when sending the fax. Please try again """ reason_description: Optional[str] = None class SyncUserCallLogResponseSyncInfoSyncType(Enum): """ Type of synchronization """ FSync = 'FSync' ISync = 'ISync' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SyncUserCallLogResponseSyncInfo(DataClassJsonMixin): """ Sync information (type, token and time) """ sync_type: Optional[SyncUserCallLogResponseSyncInfoSyncType] = None """ Type of synchronization """ sync_token: Optional[str] = None """ Synchronization token """ sync_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ The last synchronization datetime in (ISO 8601)[https://en.wikipedia.org/wiki/ISO_8601] format including timezone, for example 2016-03-10T18:07:52.534Z """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SyncUserCallLogResponse(DataClassJsonMixin): uri: Optional[str] = None """ Link to the list of call log records with sync information """ records: Optional[List[SyncUserCallLogResponseRecordsItem]] = None """ List of call log records with synchronization information. For ISync the total number of returned records is limited to 250; this includes both new records and the old ones, specified by the recordCount parameter """ sync_info: Optional[SyncUserCallLogResponseSyncInfo] = None """ Sync information (type, token and time) """ class ReadUserCallRecordView(Enum): Simple = 'Simple' Detailed = 'Detailed' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserCallRecordResponseFromDevice(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a device """ uri: Optional[str] = None """ string to a device """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserCallRecordResponseFrom(DataClassJsonMixin): phone_number: Optional[str] = None """ Phone number of a party. Usually it is a plain number including country and area code like 18661234567. But sometimes it could be returned from database with some formatting applied, for example (866)123-4567. This property is filled in all cases where parties communicate by means of global phone numbers, for example when calling to direct numbers or sending/receiving SMS """ extension_number: Optional[str] = None """ Extension short number (usually 3 or 4 digits). This property is filled when parties communicate by means of short internal numbers, for example when calling to other extension or sending/receiving Company Pager message """ extension_id: Optional[str] = None """ Internal identifier of an extension """ location: Optional[str] = None """ Contains party location (city, state) if one can be determined from phoneNumber. This property is filled only when phoneNumber is not empty and server can calculate location information from it (for example, this information is unavailable for US toll-free numbers) """ name: Optional[str] = None """ Symbolic name associated with a party. If the phone does not belong to the known extension, only the location is returned, the name is not determined then """ device: Optional[ReadUserCallRecordResponseFromDevice] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserCallRecordResponseToDevice(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a device """ uri: Optional[str] = None """ string to a device """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserCallRecordResponseTo(DataClassJsonMixin): phone_number: Optional[str] = None """ Phone number of a party. Usually it is a plain number including country and area code like 18661234567. But sometimes it could be returned from database with some formatting applied, for example (866)123-4567. This property is filled in all cases where parties communicate by means of global phone numbers, for example when calling to direct numbers or sending/receiving SMS """ extension_number: Optional[str] = None """ Extension short number (usually 3 or 4 digits). This property is filled when parties communicate by means of short internal numbers, for example when calling to other extension or sending/receiving Company Pager message """ extension_id: Optional[str] = None """ Internal identifier of an extension """ location: Optional[str] = None """ Contains party location (city, state) if one can be determined from phoneNumber. This property is filled only when phoneNumber is not empty and server can calculate location information from it (for example, this information is unavailable for US toll-free numbers) """ name: Optional[str] = None """ Symbolic name associated with a party. If the phone does not belong to the known extension, only the location is returned, the name is not determined then """ device: Optional[ReadUserCallRecordResponseToDevice] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserCallRecordResponseExtension(DataClassJsonMixin): id: Optional[int] = None """ Internal identifier of an extension """ uri: Optional[str] = None """ Canonical URI of an extension """ class ReadUserCallRecordResponseType(Enum): """ Call type """ Voice = 'Voice' Fax = 'Fax' class ReadUserCallRecordResponseTransport(Enum): """ For 'Detailed' view only. Call transport """ PSTN = 'PSTN' VoIP = 'VoIP' class ReadUserCallRecordResponseLegsItemAction(Enum): """ Action description of the call operation """ Unknown = 'Unknown' Phone_Call = 'Phone Call' Phone_Login = 'Phone Login' Incoming_Fax = 'Incoming Fax' Accept_Call = 'Accept Call' External_Application = 'External Application' FindMe = 'FindMe' FollowMe = 'FollowMe' Outgoing_Fax = 'Outgoing Fax' CallOut_CallMe = 'CallOut-CallMe' Call_Return = 'Call Return' Calling_Card = 'Calling Card' Monitoring = 'Monitoring' Ring_Directly = 'Ring Directly' RingOut_Web = 'RingOut Web' Text_Relay = 'Text Relay' VoIP_Call = 'VoIP Call' RingOut_PC = 'RingOut PC' RingMe = 'RingMe' Transfer = 'Transfer' OBJECT_411_Info = '411 Info' Emergency = 'Emergency' E911_Update = 'E911 Update' Support = 'Support' RingOut_Mobile = 'RingOut Mobile' MeetingsCall = 'MeetingsCall' SilentMonitoring = 'SilentMonitoring' class ReadUserCallRecordResponseLegsItemDirection(Enum): """ Call direction """ Inbound = 'Inbound' Outbound = 'Outbound' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserCallRecordResponseLegsItemBilling(DataClassJsonMixin): """ Billing information related to the call """ cost_included: Optional[float] = None """ Cost per minute, paid and already included in your RingCentral Plan. For example International Calls """ cost_purchased: Optional[float] = None """ Cost per minute, paid and not included in your RingCentral Plan """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserCallRecordResponseLegsItemDelegate(DataClassJsonMixin): """ Information on a delegate extension that actually implemented a call action. For Secretary call log the field is returned if the current extension implemented a call. For Boss call log the field contains information on a Secretary extension which actually implemented a call on behalf of the current extension Generated by Python OpenAPI Parser """ id: Optional[str] = None """ Internal identifier of a Secretary extension """ name: Optional[str] = None """ Custom name of a Secretary extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserCallRecordResponseLegsItemExtension(DataClassJsonMixin): """ Information on extension """ id: Optional[int] = None """ Internal identifier of an extension """ uri: Optional[str] = None """ Canonical URI of an extension """ class ReadUserCallRecordResponseLegsItemLegType(Enum): """ Leg type """ SipForwarding = 'SipForwarding' ServiceMinus2 = 'ServiceMinus2' ServiceMinus3 = 'ServiceMinus3' PstnToSip = 'PstnToSip' Accept = 'Accept' FindMe = 'FindMe' FollowMe = 'FollowMe' TestCall = 'TestCall' FaxSent = 'FaxSent' CallBack = 'CallBack' CallingCard = 'CallingCard' RingDirectly = 'RingDirectly' RingOutWebToSubscriber = 'RingOutWebToSubscriber' RingOutWebToCaller = 'RingOutWebToCaller' SipToPstnMetered = 'SipToPstnMetered' RingOutClientToSubscriber = 'RingOutClientToSubscriber' RingOutClientToCaller = 'RingOutClientToCaller' RingMe = 'RingMe' TransferCall = 'TransferCall' SipToPstnUnmetered = 'SipToPstnUnmetered' RingOutDeviceToSubscriber = 'RingOutDeviceToSubscriber' RingOutDeviceToCaller = 'RingOutDeviceToCaller' RingOutOneLegToCaller = 'RingOutOneLegToCaller' ExtensionToExtension = 'ExtensionToExtension' CallPark = 'CallPark' PagingServer = 'PagingServer' Hunting = 'Hunting' OutgoingFreeSpDl = 'OutgoingFreeSpDl' ParkLocation = 'ParkLocation' ConferenceCall = 'ConferenceCall' MobileApp = 'MobileApp' Monitoring = 'Monitoring' MoveToConference = 'MoveToConference' Unknown = 'Unknown' class ReadUserCallRecordResponseLegsItemType(Enum): """ Call type """ Voice = 'Voice' Fax = 'Fax' class ReadUserCallRecordResponseLegsItemResult(Enum): """ Status description of the call operation """ Unknown = 'Unknown' Accepted = 'Accepted' CallConnected = 'Call connected' In_Progress = 'In Progress' Voicemail = 'Voicemail' Reply = 'Reply' Missed = 'Missed' Busy = 'Busy' Rejected = 'Rejected' No_Answer = 'No Answer' Hang_Up = 'Hang Up' Blocked = 'Blocked' SuspendedAccount = 'Suspended account' Call_Failed = 'Call Failed' Call_Failure = 'Call Failure' Internal_Error = 'Internal Error' IP_Phone_Offline = 'IP Phone Offline' No_Calling_Credit = 'No Calling Credit' Not_Allowed = 'Not Allowed' Restricted_Number = 'Restricted Number' Wrong_Number = 'Wrong Number' Answered_Not_Accepted = 'Answered Not Accepted' Stopped = 'Stopped' International_Disabled = 'International Disabled' International_Restricted = 'International Restricted' Abandoned = 'Abandoned' Declined = 'Declined' Received = 'Received' FaxOn_Demand = 'Fax on Demand' Partial_Receive = 'Partial Receive' Receive_Error = 'Receive Error' Fax_Receipt_Error = 'Fax Receipt Error' Sent = 'Sent' Fax_Partially_Sent = 'Fax Partially Sent' Send_Error = 'Send Error' Fax_Not_Sent = 'Fax Not Sent' Fax_Poor_Line = 'Fax Poor Line' class ReadUserCallRecordResponseLegsItemReason(Enum): """ Reason of a call result: * `Accepted` - The call was connected to and accepted by this number * `Connected` - The call was answered, but there was no response on how to handle the call (for example, a voice mail system answered the call and did not push "1" to accept) * `Line Busy` - The phone number you dialed was busy * `Not Answered` - The phone number you dialed was not answered * `No Answer` - You did not answer the call * `Hang Up` - The caller hung up before the call was answered * `Stopped` - This attempt was stopped because the call was answered by another phone * `Internal Error` - An internal error occurred when making the call. Please try again * `No Credit` - There was not enough Calling Credit on your account to make this call * `Restricted Number` - The number you dialed is restricted by RingCentral * `Wrong Number` - The number you dialed has either been disconnected or is not a valid phone number. Please check the number and try again * `International Disabled` - International calling is not enabled on your account. Contact customer service to activate International Calling * `International Restricted` - The country and/or area you attempted to call has been prohibited by your administrator * `Bad Number` - An error occurred when making the call. Please check the number before trying again * `Info 411 Restricted` - Calling to 411 Information Services is restricted * `Customer 611 Restricted` - 611 customer service is not supported. Please contact customer service at <(888) 555-1212> * `No Digital Line` - This DigitalLine was either not plugged in or did not have an internet connection * `Failed Try Again` - Call failed. Please try again * `Max Call Limit` - The number of simultaneous calls to your account has reached its limit * `Too Many Calls` - The number of simultaneous calls for per DigitalLine associated with Other Phone has reached its limit. Please contact customer service * `Calls Not Accepted` - Your account was not accepting calls at this time * `Number Not Allowed` - The number that was dialed to access your account is not allowed * `Number Blocked` - This number is in your Blocked Numbers list * `Number Disabled` - The phone number and/or area you attempted to call has been prohibited by your administrator * `Resource Error` - An error occurred when making the call. Please try again * `Call Loop` - A call loop occurred due to an incorrect call forwarding configuration. Please check that you are not forwarding calls back to your own account * `Fax Not Received` - An incoming fax could not be received because a proper connection with the sender's fax machine could not be established * `Fax Partially Sent` - The fax was only partially sent. Possible explanations include phone line quality to poor to maintain the connection or the call was dropped * `Fax Not Sent` - An attempt to send the fax was made, but could not connect with the receiving fax machine * `Fax Poor Line` - An attempt to send the fax was made, but the phone line quality was too poor to send the fax * `Fax Prepare Error` - An internal error occurred when preparing the fax. Please try again * `Fax Save Error` - An internal error occurred when saving the fax. Please try again * `Fax Send Error` - An error occurred when sending the fax. Please try again Generated by Python OpenAPI Parser """ Accepted = 'Accepted' Connected = 'Connected' Line_Busy = 'line Busy' Not_Answered = 'Not Answered' No_Answer = 'No Answer' Hang_Up = 'Hang Up' Stopped = 'Stopped' Internal_Error = 'Internal Error' No_Credit = 'No Credit' Restricted_Number = 'Restricted Number' Wrong_Number = 'Wrong Number' International_Disabled = 'International Disabled' International_Restricted = 'International Restricted' Bad_Number = 'Bad Number' Info_411_Restricted = 'Info 411 Restricted' Customer_611_Restricted = 'Customer 611 Restricted' No_Digital_Line = 'No Digital Line' Failed_Try_Again = 'Failed Try Again' Max_Call_Limit = 'Max Call Limit' Too_Many_Calls = 'Too Many Calls' Calls_Not_Accepted = 'Calls Not Accepted' Number_Not_Allowed = 'Number Not Allowed' Number_Blocked = 'Number Blocked' Number_Disabled = 'Number Disabled' Not_Allowed = 'Not Allowed' Resource_Error = 'Resource Error' Call_Loop = 'Call Loop' Fax_Not_Received = 'Fax Not Received' Fax_Partially_Sent = 'Fax Partially Sent' Fax_Not_Sent = 'Fax Not Sent' Fax_Poor_Line = 'Fax Poor Line' Fax_Prepare_Error = 'Fax Prepare Error' Fax_Save_Error = 'Fax Save Error' Fax_Send_Error = 'Fax Send Error' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserCallRecordResponseLegsItemFromDevice(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a device """ uri: Optional[str] = None """ string to a device """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserCallRecordResponseLegsItemFrom(DataClassJsonMixin): """ Caller information """ phone_number: Optional[str] = None """ Phone number of a party. Usually it is a plain number including country and area code like 18661234567. But sometimes it could be returned from database with some formatting applied, for example (866)123-4567. This property is filled in all cases where parties communicate by means of global phone numbers, for example when calling to direct numbers or sending/receiving SMS """ extension_number: Optional[str] = None """ Extension short number (usually 3 or 4 digits). This property is filled when parties communicate by means of short internal numbers, for example when calling to other extension or sending/receiving Company Pager message """ extension_id: Optional[str] = None """ Internal identifier of an extension """ location: Optional[str] = None """ Contains party location (city, state) if one can be determined from phoneNumber. This property is filled only when phoneNumber is not empty and server can calculate location information from it (for example, this information is unavailable for US toll-free numbers) """ name: Optional[str] = None """ Symbolic name associated with a party. If the phone does not belong to the known extension, only the location is returned, the name is not determined then """ device: Optional[ReadUserCallRecordResponseLegsItemFromDevice] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserCallRecordResponseLegsItemToDevice(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a device """ uri: Optional[str] = None """ string to a device """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserCallRecordResponseLegsItemTo(DataClassJsonMixin): """ Callee information """ phone_number: Optional[str] = None """ Phone number of a party. Usually it is a plain number including country and area code like 18661234567. But sometimes it could be returned from database with some formatting applied, for example (866)123-4567. This property is filled in all cases where parties communicate by means of global phone numbers, for example when calling to direct numbers or sending/receiving SMS """ extension_number: Optional[str] = None """ Extension short number (usually 3 or 4 digits). This property is filled when parties communicate by means of short internal numbers, for example when calling to other extension or sending/receiving Company Pager message """ extension_id: Optional[str] = None """ Internal identifier of an extension """ location: Optional[str] = None """ Contains party location (city, state) if one can be determined from phoneNumber. This property is filled only when phoneNumber is not empty and server can calculate location information from it (for example, this information is unavailable for US toll-free numbers) """ name: Optional[str] = None """ Symbolic name associated with a party. If the phone does not belong to the known extension, only the location is returned, the name is not determined then """ device: Optional[ReadUserCallRecordResponseLegsItemToDevice] = None class ReadUserCallRecordResponseLegsItemTransport(Enum): """ Call transport """ PSTN = 'PSTN' VoIP = 'VoIP' class ReadUserCallRecordResponseLegsItemRecordingType(Enum): """ Indicates recording mode used """ Automatic = 'Automatic' OnDemand = 'OnDemand' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserCallRecordResponseLegsItemRecording(DataClassJsonMixin): """ Call recording data. Returned if the call is recorded """ id: Optional[str] = None """ Internal identifier of the call recording """ uri: Optional[str] = None """ Link to the call recording metadata resource """ type: Optional[ReadUserCallRecordResponseLegsItemRecordingType] = None """ Indicates recording mode used """ content_uri: Optional[str] = None """ Link to the call recording binary content """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserCallRecordResponseLegsItemMessage(DataClassJsonMixin): """ Linked message (Fax/Voicemail) """ id: Optional[str] = None """ Internal identifier of a message """ type: Optional[str] = None """ Type of a message """ uri: Optional[str] = None """ Link to a message resource """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserCallRecordResponseLegsItem(DataClassJsonMixin): action: Optional[ReadUserCallRecordResponseLegsItemAction] = None """ Action description of the call operation """ direction: Optional[ReadUserCallRecordResponseLegsItemDirection] = None """ Call direction """ billing: Optional[ReadUserCallRecordResponseLegsItemBilling] = None """ Billing information related to the call """ delegate: Optional[ReadUserCallRecordResponseLegsItemDelegate] = None """ Information on a delegate extension that actually implemented a call action. For Secretary call log the field is returned if the current extension implemented a call. For Boss call log the field contains information on a Secretary extension which actually implemented a call on behalf of the current extension """ extension_id: Optional[str] = None """ Internal identifier of an extension """ duration: Optional[int] = None """ Call duration in seconds """ extension: Optional[ReadUserCallRecordResponseLegsItemExtension] = None """ Information on extension """ leg_type: Optional[ReadUserCallRecordResponseLegsItemLegType] = None """ Leg type """ start_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ The call start datetime in (ISO 8601)[https://en.wikipedia.org/wiki/ISO_8601] format including timezone, for example 2016-03-10T18:07:52.534Z """ type: Optional[ReadUserCallRecordResponseLegsItemType] = None """ Call type """ result: Optional[ReadUserCallRecordResponseLegsItemResult] = None """ Status description of the call operation """ reason: Optional[ReadUserCallRecordResponseLegsItemReason] = None """ Reason of a call result: * `Accepted` - The call was connected to and accepted by this number * `Connected` - The call was answered, but there was no response on how to handle the call (for example, a voice mail system answered the call and did not push "1" to accept) * `Line Busy` - The phone number you dialed was busy * `Not Answered` - The phone number you dialed was not answered * `No Answer` - You did not answer the call * `Hang Up` - The caller hung up before the call was answered * `Stopped` - This attempt was stopped because the call was answered by another phone * `Internal Error` - An internal error occurred when making the call. Please try again * `No Credit` - There was not enough Calling Credit on your account to make this call * `Restricted Number` - The number you dialed is restricted by RingCentral * `Wrong Number` - The number you dialed has either been disconnected or is not a valid phone number. Please check the number and try again * `International Disabled` - International calling is not enabled on your account. Contact customer service to activate International Calling * `International Restricted` - The country and/or area you attempted to call has been prohibited by your administrator * `Bad Number` - An error occurred when making the call. Please check the number before trying again * `Info 411 Restricted` - Calling to 411 Information Services is restricted * `Customer 611 Restricted` - 611 customer service is not supported. Please contact customer service at <(888) 555-1212> * `No Digital Line` - This DigitalLine was either not plugged in or did not have an internet connection * `Failed Try Again` - Call failed. Please try again * `Max Call Limit` - The number of simultaneous calls to your account has reached its limit * `Too Many Calls` - The number of simultaneous calls for per DigitalLine associated with Other Phone has reached its limit. Please contact customer service * `Calls Not Accepted` - Your account was not accepting calls at this time * `Number Not Allowed` - The number that was dialed to access your account is not allowed * `Number Blocked` - This number is in your Blocked Numbers list * `Number Disabled` - The phone number and/or area you attempted to call has been prohibited by your administrator * `Resource Error` - An error occurred when making the call. Please try again * `Call Loop` - A call loop occurred due to an incorrect call forwarding configuration. Please check that you are not forwarding calls back to your own account * `Fax Not Received` - An incoming fax could not be received because a proper connection with the sender's fax machine could not be established * `Fax Partially Sent` - The fax was only partially sent. Possible explanations include phone line quality to poor to maintain the connection or the call was dropped * `Fax Not Sent` - An attempt to send the fax was made, but could not connect with the receiving fax machine * `Fax Poor Line` - An attempt to send the fax was made, but the phone line quality was too poor to send the fax * `Fax Prepare Error` - An internal error occurred when preparing the fax. Please try again * `Fax Save Error` - An internal error occurred when saving the fax. Please try again * `Fax Send Error` - An error occurred when sending the fax. Please try again """ reason_description: Optional[str] = None from_: Optional[ReadUserCallRecordResponseLegsItemFrom] = field(metadata=config(field_name='from'), default=None) """ Caller information """ to: Optional[ReadUserCallRecordResponseLegsItemTo] = None """ Callee information """ transport: Optional[ReadUserCallRecordResponseLegsItemTransport] = None """ Call transport """ recording: Optional[ReadUserCallRecordResponseLegsItemRecording] = None """ Call recording data. Returned if the call is recorded """ short_recording: Optional[bool] = None """ Indicates that the recording is too short and therefore wouldn't be returned. The flag is not returned if the value is false """ master: Optional[bool] = None """ Returned for 'Detailed' call log. Specifies if the leg is master-leg """ message: Optional[ReadUserCallRecordResponseLegsItemMessage] = None """ Linked message (Fax/Voicemail) """ telephony_session_id: Optional[str] = None """ Telephony identifier of a call session """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserCallRecordResponseBilling(DataClassJsonMixin): """ Billing information related to the call """ cost_included: Optional[float] = None """ Cost per minute, paid and already included in your RingCentral Plan. For example International Calls """ cost_purchased: Optional[float] = None """ Cost per minute, paid and not included in your RingCentral Plan """ class ReadUserCallRecordResponseDirection(Enum): """ Call direction """ Inbound = 'Inbound' Outbound = 'Outbound' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserCallRecordResponseMessage(DataClassJsonMixin): """ Linked message (Fax/Voicemail) """ id: Optional[str] = None """ Internal identifier of a message """ type: Optional[str] = None """ Type of a message """ uri: Optional[str] = None """ Link to a message resource """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserCallRecordResponseDelegate(DataClassJsonMixin): """ Information on a delegate extension that actually implemented a call action. For Secretary call log the field is returned if the current extension implemented a call. For Boss call log the field contains information on a Secretary extension which actually implemented a call on behalf of the current extension Generated by Python OpenAPI Parser """ id: Optional[str] = None """ Internal identifier of a Secretary extension """ name: Optional[str] = None """ Custom name of a Secretary extension """ class ReadUserCallRecordResponseRecordingType(Enum): """ Indicates recording mode used """ Automatic = 'Automatic' OnDemand = 'OnDemand' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserCallRecordResponseRecording(DataClassJsonMixin): """ Call recording data. Returned if a call is recorded """ id: Optional[str] = None """ Internal identifier of the call recording """ uri: Optional[str] = None """ Link to the call recording metadata resource """ type: Optional[ReadUserCallRecordResponseRecordingType] = None """ Indicates recording mode used """ content_uri: Optional[str] = None """ Link to the call recording binary content """ class ReadUserCallRecordResponseAction(Enum): """ Action description of the call operation """ Unknown = 'Unknown' Phone_Login = 'Phone Login' Calling_Card = 'Calling Card' VoIP_Call = 'VoIP Call' Phone_Call = 'Phone Call' Paging = 'Paging' Hunting = 'Hunting' Call_Park = 'Call Park' Monitoring = 'Monitoring' Text_Relay = 'Text Relay' External_Application = 'External Application' Park_Location = 'Park Location' CallOut_CallMe = 'CallOut-CallMe' Conference_Call = 'Conference Call' Move = 'Move' RC_Meetings = 'RC Meetings' Accept_Call = 'Accept Call' FindMe = 'FindMe' FollowMe = 'FollowMe' RingMe = 'RingMe' Transfer = 'Transfer' Call_Return = 'Call Return' Ring_Directly = 'Ring Directly' RingOut_Web = 'RingOut Web' RingOut_PC = 'RingOut PC' RingOut_Mobile = 'RingOut Mobile' Emergency = 'Emergency' E911_Update = 'E911 Update' Support = 'Support' Incoming_Fax = 'Incoming Fax' Outgoing_Fax = 'Outgoing Fax' class ReadUserCallRecordResponseResult(Enum): """ Status description of the call operation """ Unknown = 'Unknown' Accepted = 'Accepted' CallConnected = 'Call connected' In_Progress = 'In Progress' Voicemail = 'Voicemail' Reply = 'Reply' Missed = 'Missed' Busy = 'Busy' Rejected = 'Rejected' No_Answer = 'No Answer' Hang_Up = 'Hang Up' Blocked = 'Blocked' SuspendedAccount = 'Suspended account' Call_Failed = 'Call Failed' Call_Failure = 'Call Failure' Internal_Error = 'Internal Error' IP_Phone_Offline = 'IP Phone Offline' No_Calling_Credit = 'No Calling Credit' Not_Allowed = 'Not Allowed' Restricted_Number = 'Restricted Number' Wrong_Number = 'Wrong Number' Answered_Not_Accepted = 'Answered Not Accepted' Stopped = 'Stopped' International_Disabled = 'International Disabled' International_Restricted = 'International Restricted' Abandoned = 'Abandoned' Declined = 'Declined' Received = 'Received' FaxOn_Demand = 'Fax on Demand' Partial_Receive = 'Partial Receive' Receive_Error = 'Receive Error' Fax_Receipt_Error = 'Fax Receipt Error' Sent = 'Sent' Fax_Partially_Sent = 'Fax Partially Sent' Send_Error = 'Send Error' Fax_Not_Sent = 'Fax Not Sent' Fax_Poor_Line = 'Fax Poor Line' class ReadUserCallRecordResponseReason(Enum): """ Reason of a call result: * `Accepted` - The call was connected to and accepted by this number * `Connected` - The call was answered, but there was no response on how to handle the call (for example, a voice mail system answered the call and did not push "1" to accept) * `Line Busy` - The phone number you dialed was busy * `Not Answered` - The phone number you dialed was not answered * `No Answer` - You did not answer the call * `Hang Up` - The caller hung up before the call was answered * `Stopped` - This attempt was stopped because the call was answered by another phone * `Internal Error` - An internal error occurred when making the call. Please try again * `No Credit` - There was not enough Calling Credit on your account to make this call * `Restricted Number` - The number you dialed is restricted by RingCentral * `Wrong Number` - The number you dialed has either been disconnected or is not a valid phone number. Please check the number and try again * `International Disabled` - International calling is not enabled on your account. Contact customer service to activate International Calling * `International Restricted` - The country and/or area you attempted to call has been prohibited by your administrator * `Bad Number` - An error occurred when making the call. Please check the number before trying again * `Info 411 Restricted` - Calling to 411 Information Services is restricted * `Customer 611 Restricted` - 611 customer service is not supported. Please contact customer service at <(888) 555-1212> * `No Digital Line` - This DigitalLine was either not plugged in or did not have an internet connection * `Failed Try Again` - Call failed. Please try again * `Max Call Limit` - The number of simultaneous calls to your account has reached its limit * `Too Many Calls` - The number of simultaneous calls for per DigitalLine associated with Other Phone has reached its limit. Please contact customer service * `Calls Not Accepted` - Your account was not accepting calls at this time * `Number Not Allowed` - The number that was dialed to access your account is not allowed * `Number Blocked` - This number is in your Blocked Numbers list * `Number Disabled` - The phone number and/or area you attempted to call has been prohibited by your administrator * `Resource Error` - An error occurred when making the call. Please try again * `Call Loop` - A call loop occurred due to an incorrect call forwarding configuration. Please check that you are not forwarding calls back to your own account * `Fax Not Received` - An incoming fax could not be received because a proper connection with the sender's fax machine could not be established * `Fax Partially Sent` - The fax was only partially sent. Possible explanations include phone line quality to poor to maintain the connection or the call was dropped * `Fax Not Sent` - An attempt to send the fax was made, but could not connect with the receiving fax machine * `Fax Poor Line` - An attempt to send the fax was made, but the phone line quality was too poor to send the fax * `Fax Prepare Error` - An internal error occurred when preparing the fax. Please try again * `Fax Save Error` - An internal error occurred when saving the fax. Please try again * `Fax Send Error` - An error occurred when sending the fax. Please try again Generated by Python OpenAPI Parser """ Accepted = 'Accepted' Connected = 'Connected' Line_Busy = 'line Busy' Not_Answered = 'Not Answered' No_Answer = 'No Answer' Hang_Up = 'Hang Up' Stopped = 'Stopped' Internal_Error = 'Internal Error' No_Credit = 'No Credit' Restricted_Number = 'Restricted Number' Wrong_Number = 'Wrong Number' International_Disabled = 'International Disabled' International_Restricted = 'International Restricted' Bad_Number = 'Bad Number' Info_411_Restricted = 'Info 411 Restricted' Customer_611_Restricted = 'Customer 611 Restricted' No_Digital_Line = 'No Digital Line' Failed_Try_Again = 'Failed Try Again' Max_Call_Limit = 'Max Call Limit' Too_Many_Calls = 'Too Many Calls' Calls_Not_Accepted = 'Calls Not Accepted' Number_Not_Allowed = 'Number Not Allowed' Number_Blocked = 'Number Blocked' Number_Disabled = 'Number Disabled' Resource_Error = 'Resource Error' Call_Loop = 'Call Loop' Fax_Not_Received = 'Fax Not Received' Fax_Partially_Sent = 'Fax Partially Sent' Fax_Not_Sent = 'Fax Not Sent' Fax_Poor_Line = 'Fax Poor Line' Fax_Prepare_Error = 'Fax Prepare Error' Fax_Save_Error = 'Fax Save Error' Fax_Send_Error = 'Fax Send Error' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserCallRecordResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a cal log record """ uri: Optional[str] = None """ Canonical URI of a call log record """ session_id: Optional[str] = None """ Internal identifier of a call session """ telephony_session_id: Optional[str] = None """ Telephony identifier of a call session """ from_: Optional[ReadUserCallRecordResponseFrom] = field(metadata=config(field_name='from'), default=None) to: Optional[ReadUserCallRecordResponseTo] = None extension: Optional[ReadUserCallRecordResponseExtension] = None type: Optional[ReadUserCallRecordResponseType] = None """ Call type """ transport: Optional[ReadUserCallRecordResponseTransport] = None """ For 'Detailed' view only. Call transport """ legs: Optional[List[ReadUserCallRecordResponseLegsItem]] = None """ For 'Detailed' view only. Leg description """ billing: Optional[ReadUserCallRecordResponseBilling] = None """ Billing information related to the call """ direction: Optional[ReadUserCallRecordResponseDirection] = None """ Call direction """ message: Optional[ReadUserCallRecordResponseMessage] = None """ Linked message (Fax/Voicemail) """ start_time: Optional[str] = None """ The call start datetime in (ISO 8601)[https://en.wikipedia.org/wiki/ISO_8601] format including timezone, for example 2016-03-10T18:07:52.534Z """ delegate: Optional[ReadUserCallRecordResponseDelegate] = None """ Information on a delegate extension that actually implemented a call action. For Secretary call log the field is returned if the current extension implemented a call. For Boss call log the field contains information on a Secretary extension which actually implemented a call on behalf of the current extension """ deleted: Optional[bool] = None """ Indicates whether the record is deleted. Returned for deleted records, for ISync requests """ duration: Optional[int] = None """ Call duration in seconds """ last_modified_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ For 'Detailed' view only. The datetime when the call log record was modified in (ISO 8601)[https://en.wikipedia.org/wiki/ISO_8601] format including timezone, for example 2016-03-10T18:07:52.534Z """ recording: Optional[ReadUserCallRecordResponseRecording] = None """ Call recording data. Returned if a call is recorded """ short_recording: Optional[bool] = None """ Indicates that the recording is too short and therefore wouldn't be returned. The flag is not returned if the value is false """ action: Optional[ReadUserCallRecordResponseAction] = None """ Action description of the call operation """ result: Optional[ReadUserCallRecordResponseResult] = None """ Status description of the call operation """ reason: Optional[ReadUserCallRecordResponseReason] = None """ Reason of a call result: * `Accepted` - The call was connected to and accepted by this number * `Connected` - The call was answered, but there was no response on how to handle the call (for example, a voice mail system answered the call and did not push "1" to accept) * `Line Busy` - The phone number you dialed was busy * `Not Answered` - The phone number you dialed was not answered * `No Answer` - You did not answer the call * `Hang Up` - The caller hung up before the call was answered * `Stopped` - This attempt was stopped because the call was answered by another phone * `Internal Error` - An internal error occurred when making the call. Please try again * `No Credit` - There was not enough Calling Credit on your account to make this call * `Restricted Number` - The number you dialed is restricted by RingCentral * `Wrong Number` - The number you dialed has either been disconnected or is not a valid phone number. Please check the number and try again * `International Disabled` - International calling is not enabled on your account. Contact customer service to activate International Calling * `International Restricted` - The country and/or area you attempted to call has been prohibited by your administrator * `Bad Number` - An error occurred when making the call. Please check the number before trying again * `Info 411 Restricted` - Calling to 411 Information Services is restricted * `Customer 611 Restricted` - 611 customer service is not supported. Please contact customer service at <(888) 555-1212> * `No Digital Line` - This DigitalLine was either not plugged in or did not have an internet connection * `Failed Try Again` - Call failed. Please try again * `Max Call Limit` - The number of simultaneous calls to your account has reached its limit * `Too Many Calls` - The number of simultaneous calls for per DigitalLine associated with Other Phone has reached its limit. Please contact customer service * `Calls Not Accepted` - Your account was not accepting calls at this time * `Number Not Allowed` - The number that was dialed to access your account is not allowed * `Number Blocked` - This number is in your Blocked Numbers list * `Number Disabled` - The phone number and/or area you attempted to call has been prohibited by your administrator * `Resource Error` - An error occurred when making the call. Please try again * `Call Loop` - A call loop occurred due to an incorrect call forwarding configuration. Please check that you are not forwarding calls back to your own account * `Fax Not Received` - An incoming fax could not be received because a proper connection with the sender's fax machine could not be established * `Fax Partially Sent` - The fax was only partially sent. Possible explanations include phone line quality to poor to maintain the connection or the call was dropped * `Fax Not Sent` - An attempt to send the fax was made, but could not connect with the receiving fax machine * `Fax Poor Line` - An attempt to send the fax was made, but the phone line quality was too poor to send the fax * `Fax Prepare Error` - An internal error occurred when preparing the fax. Please try again * `Fax Save Error` - An internal error occurred when saving the fax. Please try again * `Fax Send Error` - An error occurred when sending the fax. Please try again """ reason_description: Optional[str] = None class ListExtensionActiveCallsDirectionItem(Enum): Inbound = 'Inbound' Outbound = 'Outbound' class ListExtensionActiveCallsView(Enum): Simple = 'Simple' Detailed = 'Detailed' class ListExtensionActiveCallsTypeItem(Enum): Voice = 'Voice' Fax = 'Fax' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionActiveCallsResponseRecordsItemFromDevice(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a device """ uri: Optional[str] = None """ string to a device """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionActiveCallsResponseRecordsItemFrom(DataClassJsonMixin): phone_number: Optional[str] = None """ Phone number of a party. Usually it is a plain number including country and area code like 18661234567. But sometimes it could be returned from database with some formatting applied, for example (866)123-4567. This property is filled in all cases where parties communicate by means of global phone numbers, for example when calling to direct numbers or sending/receiving SMS """ extension_number: Optional[str] = None """ Extension short number (usually 3 or 4 digits). This property is filled when parties communicate by means of short internal numbers, for example when calling to other extension or sending/receiving Company Pager message """ extension_id: Optional[str] = None """ Internal identifier of an extension """ location: Optional[str] = None """ Contains party location (city, state) if one can be determined from phoneNumber. This property is filled only when phoneNumber is not empty and server can calculate location information from it (for example, this information is unavailable for US toll-free numbers) """ name: Optional[str] = None """ Symbolic name associated with a party. If the phone does not belong to the known extension, only the location is returned, the name is not determined then """ device: Optional[ListExtensionActiveCallsResponseRecordsItemFromDevice] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionActiveCallsResponseRecordsItemToDevice(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a device """ uri: Optional[str] = None """ string to a device """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionActiveCallsResponseRecordsItemTo(DataClassJsonMixin): phone_number: Optional[str] = None """ Phone number of a party. Usually it is a plain number including country and area code like 18661234567. But sometimes it could be returned from database with some formatting applied, for example (866)123-4567. This property is filled in all cases where parties communicate by means of global phone numbers, for example when calling to direct numbers or sending/receiving SMS """ extension_number: Optional[str] = None """ Extension short number (usually 3 or 4 digits). This property is filled when parties communicate by means of short internal numbers, for example when calling to other extension or sending/receiving Company Pager message """ extension_id: Optional[str] = None """ Internal identifier of an extension """ location: Optional[str] = None """ Contains party location (city, state) if one can be determined from phoneNumber. This property is filled only when phoneNumber is not empty and server can calculate location information from it (for example, this information is unavailable for US toll-free numbers) """ name: Optional[str] = None """ Symbolic name associated with a party. If the phone does not belong to the known extension, only the location is returned, the name is not determined then """ device: Optional[ListExtensionActiveCallsResponseRecordsItemToDevice] = None
/ringcentral_async_client-1.0.3-py3-none-any.whl/ringcentral_async_client/_code_gen/model/_4.py
0.722723
0.160529
_4.py
pypi
from ._9 import * @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleRequestQueueFixedOrderAgentsItem(DataClassJsonMixin): extension: Optional[CreateAnsweringRuleRequestQueueFixedOrderAgentsItemExtension] = None index: Optional[int] = None """ Ordinal of an agent (call queue member) """ class CreateAnsweringRuleRequestQueueHoldAudioInterruptionMode(Enum): """ Connecting audio interruption mode """ Never = 'Never' WhenMusicEnds = 'WhenMusicEnds' Periodically = 'Periodically' class CreateAnsweringRuleRequestQueueHoldTimeExpirationAction(Enum): """ Specifies the type of action to be taken after the hold time (waiting for an available call queue member) expires. If 'TransferToExtension' option is selected, the extension specified in `transfer` field is used. The default value is `Voicemail` Generated by Python OpenAPI Parser """ TransferToExtension = 'TransferToExtension' UnconditionalForwarding = 'UnconditionalForwarding' Voicemail = 'Voicemail' class CreateAnsweringRuleRequestQueueMaxCallersAction(Enum): """ Specifies the type of action to be taken if count of callers on hold exceeds the supported maximum Generated by Python OpenAPI Parser """ Voicemail = 'Voicemail' Announcement = 'Announcement' TransferToExtension = 'TransferToExtension' UnconditionalForwarding = 'UnconditionalForwarding' class CreateAnsweringRuleRequestQueueUnconditionalForwardingItemAction(Enum): """ Event that initiates forwarding to the specified phone number """ HoldTimeExpiration = 'HoldTimeExpiration' MaxCallers = 'MaxCallers' NoAnswer = 'NoAnswer' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleRequestQueueUnconditionalForwardingItem(DataClassJsonMixin): phone_number: Optional[str] = None """ Phone number to which the call is forwarded. In addition to common e.164 format, the following number patterns are supported: 11xxxxxxxxxxx, 444xxxxxxxxxxx, 616xxxxxxxxxxx; where xxxxxxxxxxx is a phone number in e.164 format (without '+' sign) """ action: Optional[CreateAnsweringRuleRequestQueueUnconditionalForwardingItemAction] = None """ Event that initiates forwarding to the specified phone number """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleRequestQueue(DataClassJsonMixin): """ Queue settings applied for department (call queue) extension type, with the 'AgentQueue' value specified as a call handling action Generated by Python OpenAPI Parser """ transfer_mode: Optional[CreateAnsweringRuleRequestQueueTransferMode] = None """ Specifies how calls are transferred to group members """ transfer: Optional[List[CreateAnsweringRuleRequestQueueTransferItem]] = None """ Call transfer information """ no_answer_action: Optional[CreateAnsweringRuleRequestQueueNoAnswerAction] = None """ Specifies the type of action to be taken if: members are available but no one answers, or all members are busy/unavailable. This option is available for Business hours only. For simultaneous transfer mode only 'WaitPrimaryMembers' and 'WaitPrimaryAndOverflowMembers' are supported """ fixed_order_agents: Optional[List[CreateAnsweringRuleRequestQueueFixedOrderAgentsItem]] = None """ Information on a call forwarding rule """ hold_audio_interruption_mode: Optional[CreateAnsweringRuleRequestQueueHoldAudioInterruptionMode] = None """ Connecting audio interruption mode """ hold_audio_interruption_period: Optional[int] = None """ Connecting audio interruption message period in seconds """ hold_time_expiration_action: Optional[CreateAnsweringRuleRequestQueueHoldTimeExpirationAction] = 'Voicemail' """ Specifies the type of action to be taken after the hold time (waiting for an available call queue member) expires. If 'TransferToExtension' option is selected, the extension specified in `transfer` field is used. The default value is `Voicemail` """ agent_timeout: Optional[int] = None """ Maximum time in seconds to wait for a call queue member before trying the next member """ wrap_up_time: Optional[int] = None """ Minimum post-call wrap up time in seconds before agent status is automatically set; the value range is from 180 to 300 """ hold_time: Optional[int] = None """ Maximum hold time in seconds to wait for an available call queue member """ max_callers: Optional[int] = None """ Maximum count of callers on hold; the limitation is 25 callers """ max_callers_action: Optional[CreateAnsweringRuleRequestQueueMaxCallersAction] = None """ Specifies the type of action to be taken if count of callers on hold exceeds the supported maximum """ unconditional_forwarding: Optional[List[CreateAnsweringRuleRequestQueueUnconditionalForwardingItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleRequestTransferExtension(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an extension """ uri: Optional[str] = None """ Canonical URI of an extension """ extension_number: Optional[str] = None """ Number of department extension """ partner_id: Optional[str] = None """ For Partner Applications Internal identifier of an extension created by partner. The RingCentral supports the mapping of accounts and stores the corresponding account ID/extension ID for each partner ID of a client application. In request URIs partner IDs are accepted instead of regular RingCentral native IDs as path parameters using pid = XXX clause. Though in response URIs contain the corresponding account IDs and extension IDs. In all request and response bodies these values are reflected via partnerId attributes of account and extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleRequestTransfer(DataClassJsonMixin): """ Transfer settings applied for department (call queue) extension type, with 'TransferToExtension' call handling action Generated by Python OpenAPI Parser """ extension: Optional[CreateAnsweringRuleRequestTransferExtension] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleRequestVoicemailRecipient(DataClassJsonMixin): """ Recipient data """ uri: Optional[str] = None """ Link to a recipient extension resource """ id: Optional[int] = None """ Internal identifier of a recipient extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleRequestVoicemail(DataClassJsonMixin): """ Specifies whether to take a voicemail and who should do it """ enabled: Optional[bool] = None """ If 'True' then voicemails are allowed to be received """ recipient: Optional[CreateAnsweringRuleRequestVoicemailRecipient] = None """ Recipient data """ class CreateAnsweringRuleRequestGreetingsItemType(Enum): """ Type of a greeting, specifying the case when the greeting is played. """ Introductory = 'Introductory' Announcement = 'Announcement' ConnectingMessage = 'ConnectingMessage' ConnectingAudio = 'ConnectingAudio' Voicemail = 'Voicemail' Unavailable = 'Unavailable' InterruptPrompt = 'InterruptPrompt' HoldMusic = 'HoldMusic' Custom = 'Custom' Company = 'Company' BlockedCallersSpecific = 'BlockedCallersSpecific' BlockedCallersAll = 'BlockedCallersAll' BlockedNoCallerId = 'BlockedNoCallerId' BlockedPayPhones = 'BlockedPayPhones' StartRecording = 'StartRecording' StopRecording = 'StopRecording' AutomaticRecording = 'AutomaticRecording' class CreateAnsweringRuleRequestGreetingsItemUsageType(Enum): """ Usage type of a greeting, specifying if the greeting is applied to user extension or department extension. Generated by Python OpenAPI Parser """ UserExtensionAnsweringRule = 'UserExtensionAnsweringRule' ExtensionAnsweringRule = 'ExtensionAnsweringRule' DepartmentExtensionAnsweringRule = 'DepartmentExtensionAnsweringRule' CompanyAnsweringRule = 'CompanyAnsweringRule' CompanyAfterHoursAnsweringRule = 'CompanyAfterHoursAnsweringRule' VoicemailExtensionAnsweringRule = 'VoicemailExtensionAnsweringRule' AnnouncementExtensionAnsweringRule = 'AnnouncementExtensionAnsweringRule' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleRequestGreetingsItemPreset(DataClassJsonMixin): uri: Optional[str] = None """ Link to a greeting resource """ id: Optional[str] = None """ Internal identifier of a greeting """ name: Optional[str] = None """ Name of a greeting """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleRequestGreetingsItemCustom(DataClassJsonMixin): uri: Optional[str] = None """ Link to a custom user greeting """ id: Optional[str] = None """ Internal identifier of a custom user greeting """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleRequestGreetingsItem(DataClassJsonMixin): type: Optional[CreateAnsweringRuleRequestGreetingsItemType] = None """ Type of a greeting, specifying the case when the greeting is played. """ usage_type: Optional[CreateAnsweringRuleRequestGreetingsItemUsageType] = None """ Usage type of a greeting, specifying if the greeting is applied to user extension or department extension. """ preset: Optional[CreateAnsweringRuleRequestGreetingsItemPreset] = None custom: Optional[CreateAnsweringRuleRequestGreetingsItemCustom] = None class CreateAnsweringRuleRequestScreening(Enum): """ Call screening status. 'Off' - no call screening; 'NoCallerId' - if caller ID is missing, then callers are asked to say their name before connecting; 'UnknownCallerId' - if caller ID is not in contact list, then callers are asked to say their name before connecting; 'Always' - the callers are always asked to say their name before connecting. The default value is 'Off' Generated by Python OpenAPI Parser """ Off = 'Off' NoCallerId = 'NoCallerId' UnknownCallerId = 'UnknownCallerId' Always = 'Always' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleRequest(DataClassJsonMixin): enabled: Optional[bool] = None """ Specifies if the rule is active or inactive. The default value is 'True' """ type: Optional[str] = None """ Type of an answering rule. The 'Custom' value should be specified """ name: Optional[str] = None """ Name of an answering rule specified by user """ callers: Optional[List[CreateAnsweringRuleRequestCallersItem]] = None """ Answering rule will be applied when calls are received from the specified caller(s) """ called_numbers: Optional[List[CreateAnsweringRuleRequestCalledNumbersItem]] = None """ Answering rules are applied when calling to selected number(s) """ schedule: Optional[CreateAnsweringRuleRequestSchedule] = None """ Schedule when an answering rule should be applied """ call_handling_action: Optional[CreateAnsweringRuleRequestCallHandlingAction] = None """ Specifies how incoming calls are forwarded """ forwarding: Optional[CreateAnsweringRuleRequestForwarding] = None """ Forwarding parameters. Returned if 'ForwardCalls' is specified in 'callHandlingAction'. These settings determine the forwarding numbers to which the call will be forwarded """ unconditional_forwarding: Optional[CreateAnsweringRuleRequestUnconditionalForwarding] = None """ Unconditional forwarding parameters. Returned if 'UnconditionalForwarding' is specified in 'callHandlingAction' """ queue: Optional[CreateAnsweringRuleRequestQueue] = None """ Queue settings applied for department (call queue) extension type, with the 'AgentQueue' value specified as a call handling action """ transfer: Optional[CreateAnsweringRuleRequestTransfer] = None """ Transfer settings applied for department (call queue) extension type, with 'TransferToExtension' call handling action """ voicemail: Optional[CreateAnsweringRuleRequestVoicemail] = None """ Specifies whether to take a voicemail and who should do it """ greetings: Optional[List[CreateAnsweringRuleRequestGreetingsItem]] = None """ Greetings applied for an answering rule; only predefined greetings can be applied, see Dictionary Greeting List """ screening: Optional[CreateAnsweringRuleRequestScreening] = None """ Call screening status. 'Off' - no call screening; 'NoCallerId' - if caller ID is missing, then callers are asked to say their name before connecting; 'UnknownCallerId' - if caller ID is not in contact list, then callers are asked to say their name before connecting; 'Always' - the callers are always asked to say their name before connecting. The default value is 'Off' """ class CreateAnsweringRuleResponseType(Enum): """ Type of an answering rule """ BusinessHours = 'BusinessHours' AfterHours = 'AfterHours' Custom = 'Custom' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleResponseScheduleWeeklyRangesMondayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleResponseScheduleWeeklyRangesTuesdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleResponseScheduleWeeklyRangesWednesdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleResponseScheduleWeeklyRangesThursdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleResponseScheduleWeeklyRangesFridayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleResponseScheduleWeeklyRangesSaturdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleResponseScheduleWeeklyRangesSundayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleResponseScheduleWeeklyRanges(DataClassJsonMixin): """ Weekly schedule """ monday: Optional[List[CreateAnsweringRuleResponseScheduleWeeklyRangesMondayItem]] = None """ Time intervals for a particular day """ tuesday: Optional[List[CreateAnsweringRuleResponseScheduleWeeklyRangesTuesdayItem]] = None """ Time intervals for a particular day """ wednesday: Optional[List[CreateAnsweringRuleResponseScheduleWeeklyRangesWednesdayItem]] = None """ Time intervals for a particular day """ thursday: Optional[List[CreateAnsweringRuleResponseScheduleWeeklyRangesThursdayItem]] = None """ Time intervals for a particular day """ friday: Optional[List[CreateAnsweringRuleResponseScheduleWeeklyRangesFridayItem]] = None """ Time intervals for a particular day """ saturday: Optional[List[CreateAnsweringRuleResponseScheduleWeeklyRangesSaturdayItem]] = None """ Time intervals for a particular day """ sunday: Optional[List[CreateAnsweringRuleResponseScheduleWeeklyRangesSundayItem]] = None """ Time intervals for a particular day """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleResponseScheduleRangesItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Starting datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), for example *2018-10-29T14:00:00*, *2018-10-29T14:00:00Z*, *2018-10-29T14:00:00+0100* """ to: Optional[str] = None """ Ending datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), for example *2018-10-29T14:00:00*, *2018-10-29T14:00:00Z*, *2018-10-29T14:00:00+0100* """ class CreateAnsweringRuleResponseScheduleRef(Enum): """ The user's schedule specified for business hours or after hours; it can also be set/retrieved calling the corresponding method Generated by Python OpenAPI Parser """ BusinessHours = 'BusinessHours' AfterHours = 'AfterHours' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleResponseSchedule(DataClassJsonMixin): """ Schedule when an answering rule should be applied """ weekly_ranges: Optional[CreateAnsweringRuleResponseScheduleWeeklyRanges] = None """ Weekly schedule """ ranges: Optional[List[CreateAnsweringRuleResponseScheduleRangesItem]] = None """ Specific data ranges """ ref: Optional[CreateAnsweringRuleResponseScheduleRef] = None """ The user's schedule specified for business hours or after hours; it can also be set/retrieved calling the corresponding method """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleResponseCalledNumbersItem(DataClassJsonMixin): phone_number: Optional[str] = None """ Called phone number """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleResponseCallersItem(DataClassJsonMixin): caller_id: Optional[str] = None """ Phone number of a caller """ name: Optional[str] = None """ Contact name of a caller """ class CreateAnsweringRuleResponseCallHandlingAction(Enum): """ Specifies how incoming calls are forwarded """ ForwardCalls = 'ForwardCalls' UnconditionalForwarding = 'UnconditionalForwarding' AgentQueue = 'AgentQueue' TransferToExtension = 'TransferToExtension' TakeMessagesOnly = 'TakeMessagesOnly' PlayAnnouncementOnly = 'PlayAnnouncementOnly' SharedLines = 'SharedLines' class CreateAnsweringRuleResponseForwardingRingingMode(Enum): """ Specifies the order in which forwarding numbers ring. 'Sequentially' means that forwarding numbers are ringing one at a time, in order of priority. 'Simultaneously' means that forwarding numbers are ring all at the same time Generated by Python OpenAPI Parser """ Sequentially = 'Sequentially' Simultaneously = 'Simultaneously' class CreateAnsweringRuleResponseForwardingRulesItemForwardingNumbersItemLabel(Enum): """ Forwarding/Call flip number title """ Business_Mobile_Phone = 'Business Mobile Phone' class CreateAnsweringRuleResponseForwardingRulesItemForwardingNumbersItemType(Enum): """ Type of a forwarding number """ Home = 'Home' Mobile = 'Mobile' Work = 'Work' PhoneLine = 'PhoneLine' Outage = 'Outage' Other = 'Other' BusinessMobilePhone = 'BusinessMobilePhone' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleResponseForwardingRulesItemForwardingNumbersItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a forwarding number """ uri: Optional[str] = None """ Canonical URI of a forwarding/call flip phone number """ phone_number: Optional[str] = None """ Forwarding/Call flip phone number """ label: Optional[CreateAnsweringRuleResponseForwardingRulesItemForwardingNumbersItemLabel] = None """ Forwarding/Call flip number title """ type: Optional[CreateAnsweringRuleResponseForwardingRulesItemForwardingNumbersItemType] = None """ Type of a forwarding number """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleResponseForwardingRulesItem(DataClassJsonMixin): index: Optional[int] = None """ Forwarding number (or group) ordinal """ ring_count: Optional[int] = None """ Number of rings for a forwarding number (or group) """ enabled: Optional[bool] = None """ Forwarding number status. Returned only if `showInactiveNumbers` is set to `true` """ forwarding_numbers: Optional[List[CreateAnsweringRuleResponseForwardingRulesItemForwardingNumbersItem]] = None """ Forwarding number (or group) data """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleResponseForwarding(DataClassJsonMixin): """ Forwarding parameters. Returned if 'ForwardCalls' is specified in 'callHandlingAction'. These settings determine the forwarding numbers to which the call will be forwarded Generated by Python OpenAPI Parser """ notify_my_soft_phones: Optional[bool] = None """ Specifies if the user's softphone(s) are notified before forwarding the incoming call to desk phones and forwarding numbers """ notify_admin_soft_phones: Optional[bool] = None """ Specifies if the administrator's softphone is notified before forwarding the incoming call to desk phones and forwarding numbers. The default value is 'False' """ soft_phones_ring_count: Optional[int] = None """ Number of rings before forwarding starts """ ringing_mode: Optional[CreateAnsweringRuleResponseForwardingRingingMode] = None """ Specifies the order in which forwarding numbers ring. 'Sequentially' means that forwarding numbers are ringing one at a time, in order of priority. 'Simultaneously' means that forwarding numbers are ring all at the same time """ rules: Optional[List[CreateAnsweringRuleResponseForwardingRulesItem]] = None """ Information on a call forwarding rule """ mobile_timeout: Optional[bool] = None """ Specifies if mobile timeout is activated for the rule """ class CreateAnsweringRuleResponseUnconditionalForwardingAction(Enum): """ Event that initiates forwarding to the specified phone number """ HoldTimeExpiration = 'HoldTimeExpiration' MaxCallers = 'MaxCallers' NoAnswer = 'NoAnswer' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleResponseUnconditionalForwarding(DataClassJsonMixin): """ Unconditional forwarding parameters. Returned if 'UnconditionalForwarding' is specified in 'callHandlingAction' Generated by Python OpenAPI Parser """ phone_number: Optional[str] = None """ Phone number to which the call is forwarded. In addition to common e.164 format, the following number patterns are supported: 11xxxxxxxxxxx, 444xxxxxxxxxxx, 616xxxxxxxxxxx; where xxxxxxxxxxx is a phone number in e.164 format (without '+' sign) """ action: Optional[CreateAnsweringRuleResponseUnconditionalForwardingAction] = None """ Event that initiates forwarding to the specified phone number """ class CreateAnsweringRuleResponseQueueTransferMode(Enum): """ Specifies how calls are transferred to group members """ Rotating = 'Rotating' Simultaneous = 'Simultaneous' FixedOrder = 'FixedOrder' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleResponseQueueTransferItemExtension(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an extension the call is transferred to """ name: Optional[str] = None """ Extension name """ extension_number: Optional[str] = None """ Extension number """ class CreateAnsweringRuleResponseQueueTransferItemAction(Enum): """ Event that initiates transferring to the specified extension """ HoldTimeExpiration = 'HoldTimeExpiration' MaxCallers = 'MaxCallers' NoAnswer = 'NoAnswer' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleResponseQueueTransferItem(DataClassJsonMixin): extension: Optional[CreateAnsweringRuleResponseQueueTransferItemExtension] = None action: Optional[CreateAnsweringRuleResponseQueueTransferItemAction] = None """ Event that initiates transferring to the specified extension """ class CreateAnsweringRuleResponseQueueNoAnswerAction(Enum): """ Specifies the type of action to be taken if: members are available but no one answers, or all members are busy/unavailable. This option is available for Business hours only. For simultaneous transfer mode only 'WaitPrimaryMembers' and 'WaitPrimaryAndOverflowMembers' are supported Generated by Python OpenAPI Parser """ WaitPrimaryMembers = 'WaitPrimaryMembers' WaitPrimaryAndOverflowMembers = 'WaitPrimaryAndOverflowMembers' Voicemail = 'Voicemail' TransferToExtension = 'TransferToExtension' UnconditionalForwarding = 'UnconditionalForwarding' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleResponseQueueFixedOrderAgentsItemExtension(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an extension """ uri: Optional[str] = None """ Canonical URI of an extension """ extension_number: Optional[str] = None """ Number of department extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleResponseQueueFixedOrderAgentsItem(DataClassJsonMixin): extension: Optional[CreateAnsweringRuleResponseQueueFixedOrderAgentsItemExtension] = None index: Optional[int] = None """ Ordinal of an agent (call queue member) """ class CreateAnsweringRuleResponseQueueHoldAudioInterruptionMode(Enum): """ Connecting audio interruption mode """ Never = 'Never' WhenMusicEnds = 'WhenMusicEnds' Periodically = 'Periodically' class CreateAnsweringRuleResponseQueueHoldTimeExpirationAction(Enum): """ Specifies the type of action to be taken after the hold time (waiting for an available call queue member) expires. If 'TransferToExtension' option is selected, the extension specified in `transfer` field is used. The default value is `Voicemail` Generated by Python OpenAPI Parser """ TransferToExtension = 'TransferToExtension' UnconditionalForwarding = 'UnconditionalForwarding' Voicemail = 'Voicemail' class CreateAnsweringRuleResponseQueueMaxCallersAction(Enum): """ Specifies the type of action to be taken if count of callers on hold exceeds the supported maximum Generated by Python OpenAPI Parser """ Voicemail = 'Voicemail' Announcement = 'Announcement' TransferToExtension = 'TransferToExtension' UnconditionalForwarding = 'UnconditionalForwarding' class CreateAnsweringRuleResponseQueueUnconditionalForwardingItemAction(Enum): """ Event that initiates forwarding to the specified phone number """ HoldTimeExpiration = 'HoldTimeExpiration' MaxCallers = 'MaxCallers' NoAnswer = 'NoAnswer' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleResponseQueueUnconditionalForwardingItem(DataClassJsonMixin): phone_number: Optional[str] = None """ Phone number to which the call is forwarded. In addition to common e.164 format, the following number patterns are supported: 11xxxxxxxxxxx, 444xxxxxxxxxxx, 616xxxxxxxxxxx; where xxxxxxxxxxx is a phone number in e.164 format (without '+' sign) """ action: Optional[CreateAnsweringRuleResponseQueueUnconditionalForwardingItemAction] = None """ Event that initiates forwarding to the specified phone number """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleResponseQueue(DataClassJsonMixin): """ Queue settings applied for department (call queue) extension type, with the 'AgentQueue' value specified as a call handling action Generated by Python OpenAPI Parser """ transfer_mode: Optional[CreateAnsweringRuleResponseQueueTransferMode] = None """ Specifies how calls are transferred to group members """ transfer: Optional[List[CreateAnsweringRuleResponseQueueTransferItem]] = None """ Call transfer information """ no_answer_action: Optional[CreateAnsweringRuleResponseQueueNoAnswerAction] = None """ Specifies the type of action to be taken if: members are available but no one answers, or all members are busy/unavailable. This option is available for Business hours only. For simultaneous transfer mode only 'WaitPrimaryMembers' and 'WaitPrimaryAndOverflowMembers' are supported """ fixed_order_agents: Optional[List[CreateAnsweringRuleResponseQueueFixedOrderAgentsItem]] = None """ Information on a call forwarding rule """ hold_audio_interruption_mode: Optional[CreateAnsweringRuleResponseQueueHoldAudioInterruptionMode] = None """ Connecting audio interruption mode """ hold_audio_interruption_period: Optional[int] = None """ Connecting audio interruption message period in seconds """ hold_time_expiration_action: Optional[CreateAnsweringRuleResponseQueueHoldTimeExpirationAction] = 'Voicemail' """ Specifies the type of action to be taken after the hold time (waiting for an available call queue member) expires. If 'TransferToExtension' option is selected, the extension specified in `transfer` field is used. The default value is `Voicemail` """ agent_timeout: Optional[int] = None """ Maximum time in seconds to wait for a call queue member before trying the next member """ wrap_up_time: Optional[int] = None """ Minimum post-call wrap up time in seconds before agent status is automatically set; the value range is from 180 to 300 """ hold_time: Optional[int] = None """ Maximum hold time in seconds to wait for an available call queue member """ max_callers: Optional[int] = None """ Maximum count of callers on hold; the limitation is 25 callers """ max_callers_action: Optional[CreateAnsweringRuleResponseQueueMaxCallersAction] = None """ Specifies the type of action to be taken if count of callers on hold exceeds the supported maximum """ unconditional_forwarding: Optional[List[CreateAnsweringRuleResponseQueueUnconditionalForwardingItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleResponseTransferExtension(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an extension """ uri: Optional[str] = None """ Canonical URI of an extension """ extension_number: Optional[str] = None """ Number of department extension """ partner_id: Optional[str] = None """ For Partner Applications Internal identifier of an extension created by partner. The RingCentral supports the mapping of accounts and stores the corresponding account ID/extension ID for each partner ID of a client application. In request URIs partner IDs are accepted instead of regular RingCentral native IDs as path parameters using pid = XXX clause. Though in response URIs contain the corresponding account IDs and extension IDs. In all request and response bodies these values are reflected via partnerId attributes of account and extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleResponseTransfer(DataClassJsonMixin): """ Transfer settings applied for department (call queue) extension type, with 'TransferToExtension' call handling action Generated by Python OpenAPI Parser """ extension: Optional[CreateAnsweringRuleResponseTransferExtension] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleResponseVoicemailRecipient(DataClassJsonMixin): """ Recipient data """ uri: Optional[str] = None """ Link to a recipient extension resource """ id: Optional[int] = None """ Internal identifier of a recipient extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleResponseVoicemail(DataClassJsonMixin): """ Specifies whether to take a voicemail and who should do it """ enabled: Optional[bool] = None """ If 'True' then voicemails are allowed to be received """ recipient: Optional[CreateAnsweringRuleResponseVoicemailRecipient] = None """ Recipient data """ class CreateAnsweringRuleResponseGreetingsItemType(Enum): """ Type of a greeting, specifying the case when the greeting is played. """ Introductory = 'Introductory' Announcement = 'Announcement' ConnectingMessage = 'ConnectingMessage' ConnectingAudio = 'ConnectingAudio' Voicemail = 'Voicemail' Unavailable = 'Unavailable' InterruptPrompt = 'InterruptPrompt' HoldMusic = 'HoldMusic' Custom = 'Custom' Company = 'Company' BlockedCallersSpecific = 'BlockedCallersSpecific' BlockedCallersAll = 'BlockedCallersAll' BlockedNoCallerId = 'BlockedNoCallerId' BlockedPayPhones = 'BlockedPayPhones' StartRecording = 'StartRecording' StopRecording = 'StopRecording' AutomaticRecording = 'AutomaticRecording' class CreateAnsweringRuleResponseGreetingsItemUsageType(Enum): """ Usage type of a greeting, specifying if the greeting is applied to user extension or department extension. Generated by Python OpenAPI Parser """ UserExtensionAnsweringRule = 'UserExtensionAnsweringRule' ExtensionAnsweringRule = 'ExtensionAnsweringRule' DepartmentExtensionAnsweringRule = 'DepartmentExtensionAnsweringRule' CompanyAnsweringRule = 'CompanyAnsweringRule' CompanyAfterHoursAnsweringRule = 'CompanyAfterHoursAnsweringRule' VoicemailExtensionAnsweringRule = 'VoicemailExtensionAnsweringRule' AnnouncementExtensionAnsweringRule = 'AnnouncementExtensionAnsweringRule' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleResponseGreetingsItemPreset(DataClassJsonMixin): uri: Optional[str] = None """ Link to a greeting resource """ id: Optional[str] = None """ Internal identifier of a greeting """ name: Optional[str] = None """ Name of a greeting """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleResponseGreetingsItemCustom(DataClassJsonMixin): uri: Optional[str] = None """ Link to a custom user greeting """ id: Optional[str] = None """ Internal identifier of a custom user greeting """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleResponseGreetingsItem(DataClassJsonMixin): type: Optional[CreateAnsweringRuleResponseGreetingsItemType] = None """ Type of a greeting, specifying the case when the greeting is played. """ usage_type: Optional[CreateAnsweringRuleResponseGreetingsItemUsageType] = None """ Usage type of a greeting, specifying if the greeting is applied to user extension or department extension. """ preset: Optional[CreateAnsweringRuleResponseGreetingsItemPreset] = None custom: Optional[CreateAnsweringRuleResponseGreetingsItemCustom] = None class CreateAnsweringRuleResponseScreening(Enum): """ Call screening status. 'Off' - no call screening; 'NoCallerId' - if caller ID is missing, then callers are asked to say their name before connecting; 'UnknownCallerId' - if caller ID is not in contact list, then callers are asked to say their name before connecting; 'Always' - the callers are always asked to say their name before connecting. The default value is 'Off' Generated by Python OpenAPI Parser """ Off = 'Off' NoCallerId = 'NoCallerId' UnknownCallerId = 'UnknownCallerId' Always = 'Always' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleResponseSharedLines(DataClassJsonMixin): """ SharedLines call handling action settings """ timeout: Optional[int] = None """ Number of seconds to wait before forwarding unanswered calls. The value range is 10 - 80 """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleResponse(DataClassJsonMixin): uri: Optional[str] = None """ Canonical URI to an answering rule resource """ id: Optional[str] = None """ Internal identifier of an answering rule """ type: Optional[CreateAnsweringRuleResponseType] = None """ Type of an answering rule """ name: Optional[str] = None """ Name of an answering rule specified by user """ enabled: Optional[bool] = None """ Specifies if an answering rule is active or inactive """ schedule: Optional[CreateAnsweringRuleResponseSchedule] = None """ Schedule when an answering rule should be applied """ called_numbers: Optional[List[CreateAnsweringRuleResponseCalledNumbersItem]] = None """ Answering rules are applied when calling to selected number(s) """ callers: Optional[List[CreateAnsweringRuleResponseCallersItem]] = None """ Answering rules are applied when calls are received from specified caller(s) """ call_handling_action: Optional[CreateAnsweringRuleResponseCallHandlingAction] = None """ Specifies how incoming calls are forwarded """ forwarding: Optional[CreateAnsweringRuleResponseForwarding] = None """ Forwarding parameters. Returned if 'ForwardCalls' is specified in 'callHandlingAction'. These settings determine the forwarding numbers to which the call will be forwarded """ unconditional_forwarding: Optional[CreateAnsweringRuleResponseUnconditionalForwarding] = None """ Unconditional forwarding parameters. Returned if 'UnconditionalForwarding' is specified in 'callHandlingAction' """ queue: Optional[CreateAnsweringRuleResponseQueue] = None """ Queue settings applied for department (call queue) extension type, with the 'AgentQueue' value specified as a call handling action """ transfer: Optional[CreateAnsweringRuleResponseTransfer] = None """ Transfer settings applied for department (call queue) extension type, with 'TransferToExtension' call handling action """ voicemail: Optional[CreateAnsweringRuleResponseVoicemail] = None """ Specifies whether to take a voicemail and who should do it """ greetings: Optional[List[CreateAnsweringRuleResponseGreetingsItem]] = None """ Greetings applied for an answering rule; only predefined greetings can be applied, see Dictionary Greeting List """ screening: Optional[CreateAnsweringRuleResponseScreening] = None """ Call screening status. 'Off' - no call screening; 'NoCallerId' - if caller ID is missing, then callers are asked to say their name before connecting; 'UnknownCallerId' - if caller ID is not in contact list, then callers are asked to say their name before connecting; 'Always' - the callers are always asked to say their name before connecting. The default value is 'Off' """ shared_lines: Optional[CreateAnsweringRuleResponseSharedLines] = None """ SharedLines call handling action settings """ class ReadAnsweringRuleResponseType(Enum): """ Type of an answering rule """ BusinessHours = 'BusinessHours' AfterHours = 'AfterHours' Custom = 'Custom' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAnsweringRuleResponseScheduleWeeklyRangesMondayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAnsweringRuleResponseScheduleWeeklyRangesTuesdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAnsweringRuleResponseScheduleWeeklyRangesWednesdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAnsweringRuleResponseScheduleWeeklyRangesThursdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAnsweringRuleResponseScheduleWeeklyRangesFridayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAnsweringRuleResponseScheduleWeeklyRangesSaturdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAnsweringRuleResponseScheduleWeeklyRangesSundayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAnsweringRuleResponseScheduleWeeklyRanges(DataClassJsonMixin): """ Weekly schedule """ monday: Optional[List[ReadAnsweringRuleResponseScheduleWeeklyRangesMondayItem]] = None """ Time intervals for a particular day """ tuesday: Optional[List[ReadAnsweringRuleResponseScheduleWeeklyRangesTuesdayItem]] = None """ Time intervals for a particular day """ wednesday: Optional[List[ReadAnsweringRuleResponseScheduleWeeklyRangesWednesdayItem]] = None """ Time intervals for a particular day """ thursday: Optional[List[ReadAnsweringRuleResponseScheduleWeeklyRangesThursdayItem]] = None """ Time intervals for a particular day """ friday: Optional[List[ReadAnsweringRuleResponseScheduleWeeklyRangesFridayItem]] = None """ Time intervals for a particular day """ saturday: Optional[List[ReadAnsweringRuleResponseScheduleWeeklyRangesSaturdayItem]] = None """ Time intervals for a particular day """ sunday: Optional[List[ReadAnsweringRuleResponseScheduleWeeklyRangesSundayItem]] = None """ Time intervals for a particular day """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAnsweringRuleResponseScheduleRangesItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Starting datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), for example *2018-10-29T14:00:00*, *2018-10-29T14:00:00Z*, *2018-10-29T14:00:00+0100* """ to: Optional[str] = None """ Ending datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), for example *2018-10-29T14:00:00*, *2018-10-29T14:00:00Z*, *2018-10-29T14:00:00+0100* """ class ReadAnsweringRuleResponseScheduleRef(Enum): """ The user's schedule specified for business hours or after hours; it can also be set/retrieved calling the corresponding method Generated by Python OpenAPI Parser """ BusinessHours = 'BusinessHours' AfterHours = 'AfterHours' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAnsweringRuleResponseSchedule(DataClassJsonMixin): """ Schedule when an answering rule should be applied """ weekly_ranges: Optional[ReadAnsweringRuleResponseScheduleWeeklyRanges] = None """ Weekly schedule """ ranges: Optional[List[ReadAnsweringRuleResponseScheduleRangesItem]] = None """ Specific data ranges """ ref: Optional[ReadAnsweringRuleResponseScheduleRef] = None """ The user's schedule specified for business hours or after hours; it can also be set/retrieved calling the corresponding method """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAnsweringRuleResponseCalledNumbersItem(DataClassJsonMixin): phone_number: Optional[str] = None """ Called phone number """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAnsweringRuleResponseCallersItem(DataClassJsonMixin): caller_id: Optional[str] = None """ Phone number of a caller """ name: Optional[str] = None """ Contact name of a caller """ class ReadAnsweringRuleResponseCallHandlingAction(Enum): """ Specifies how incoming calls are forwarded """ ForwardCalls = 'ForwardCalls' UnconditionalForwarding = 'UnconditionalForwarding' AgentQueue = 'AgentQueue' TransferToExtension = 'TransferToExtension' TakeMessagesOnly = 'TakeMessagesOnly' PlayAnnouncementOnly = 'PlayAnnouncementOnly' SharedLines = 'SharedLines' class ReadAnsweringRuleResponseForwardingRingingMode(Enum): """ Specifies the order in which forwarding numbers ring. 'Sequentially' means that forwarding numbers are ringing one at a time, in order of priority. 'Simultaneously' means that forwarding numbers are ring all at the same time Generated by Python OpenAPI Parser """ Sequentially = 'Sequentially' Simultaneously = 'Simultaneously' class ReadAnsweringRuleResponseForwardingRulesItemForwardingNumbersItemLabel(Enum): """ Forwarding/Call flip number title """ Business_Mobile_Phone = 'Business Mobile Phone' class ReadAnsweringRuleResponseForwardingRulesItemForwardingNumbersItemType(Enum): """ Type of a forwarding number """ Home = 'Home' Mobile = 'Mobile' Work = 'Work' PhoneLine = 'PhoneLine' Outage = 'Outage' Other = 'Other' BusinessMobilePhone = 'BusinessMobilePhone' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAnsweringRuleResponseForwardingRulesItemForwardingNumbersItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a forwarding number """ uri: Optional[str] = None """ Canonical URI of a forwarding/call flip phone number """ phone_number: Optional[str] = None """ Forwarding/Call flip phone number """ label: Optional[ReadAnsweringRuleResponseForwardingRulesItemForwardingNumbersItemLabel] = None """ Forwarding/Call flip number title """ type: Optional[ReadAnsweringRuleResponseForwardingRulesItemForwardingNumbersItemType] = None """ Type of a forwarding number """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAnsweringRuleResponseForwardingRulesItem(DataClassJsonMixin): index: Optional[int] = None """ Forwarding number (or group) ordinal """ ring_count: Optional[int] = None """ Number of rings for a forwarding number (or group) """ enabled: Optional[bool] = None """ Forwarding number status. Returned only if `showInactiveNumbers` is set to `true` """ forwarding_numbers: Optional[List[ReadAnsweringRuleResponseForwardingRulesItemForwardingNumbersItem]] = None """ Forwarding number (or group) data """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAnsweringRuleResponseForwarding(DataClassJsonMixin): """ Forwarding parameters. Returned if 'ForwardCalls' is specified in 'callHandlingAction'. These settings determine the forwarding numbers to which the call will be forwarded Generated by Python OpenAPI Parser """ notify_my_soft_phones: Optional[bool] = None """ Specifies if the user's softphone(s) are notified before forwarding the incoming call to desk phones and forwarding numbers """ notify_admin_soft_phones: Optional[bool] = None """ Specifies if the administrator's softphone is notified before forwarding the incoming call to desk phones and forwarding numbers. The default value is 'False' """ soft_phones_ring_count: Optional[int] = None """ Number of rings before forwarding starts """ ringing_mode: Optional[ReadAnsweringRuleResponseForwardingRingingMode] = None """ Specifies the order in which forwarding numbers ring. 'Sequentially' means that forwarding numbers are ringing one at a time, in order of priority. 'Simultaneously' means that forwarding numbers are ring all at the same time """ rules: Optional[List[ReadAnsweringRuleResponseForwardingRulesItem]] = None """ Information on a call forwarding rule """ mobile_timeout: Optional[bool] = None """ Specifies if mobile timeout is activated for the rule """ class ReadAnsweringRuleResponseUnconditionalForwardingAction(Enum): """ Event that initiates forwarding to the specified phone number """ HoldTimeExpiration = 'HoldTimeExpiration' MaxCallers = 'MaxCallers' NoAnswer = 'NoAnswer' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAnsweringRuleResponseUnconditionalForwarding(DataClassJsonMixin): """ Unconditional forwarding parameters. Returned if 'UnconditionalForwarding' is specified in 'callHandlingAction' Generated by Python OpenAPI Parser """ phone_number: Optional[str] = None """ Phone number to which the call is forwarded. In addition to common e.164 format, the following number patterns are supported: 11xxxxxxxxxxx, 444xxxxxxxxxxx, 616xxxxxxxxxxx; where xxxxxxxxxxx is a phone number in e.164 format (without '+' sign) """ action: Optional[ReadAnsweringRuleResponseUnconditionalForwardingAction] = None """ Event that initiates forwarding to the specified phone number """ class ReadAnsweringRuleResponseQueueTransferMode(Enum): """ Specifies how calls are transferred to group members """ Rotating = 'Rotating' Simultaneous = 'Simultaneous' FixedOrder = 'FixedOrder' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAnsweringRuleResponseQueueTransferItemExtension(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an extension the call is transferred to """ name: Optional[str] = None """ Extension name """ extension_number: Optional[str] = None """ Extension number """ class ReadAnsweringRuleResponseQueueTransferItemAction(Enum): """ Event that initiates transferring to the specified extension """ HoldTimeExpiration = 'HoldTimeExpiration' MaxCallers = 'MaxCallers' NoAnswer = 'NoAnswer' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAnsweringRuleResponseQueueTransferItem(DataClassJsonMixin): extension: Optional[ReadAnsweringRuleResponseQueueTransferItemExtension] = None action: Optional[ReadAnsweringRuleResponseQueueTransferItemAction] = None """ Event that initiates transferring to the specified extension """ class ReadAnsweringRuleResponseQueueNoAnswerAction(Enum): """ Specifies the type of action to be taken if: members are available but no one answers, or all members are busy/unavailable. This option is available for Business hours only. For simultaneous transfer mode only 'WaitPrimaryMembers' and 'WaitPrimaryAndOverflowMembers' are supported Generated by Python OpenAPI Parser """ WaitPrimaryMembers = 'WaitPrimaryMembers' WaitPrimaryAndOverflowMembers = 'WaitPrimaryAndOverflowMembers' Voicemail = 'Voicemail' TransferToExtension = 'TransferToExtension' UnconditionalForwarding = 'UnconditionalForwarding' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAnsweringRuleResponseQueueFixedOrderAgentsItemExtension(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an extension """ uri: Optional[str] = None """ Canonical URI of an extension """ extension_number: Optional[str] = None """ Number of department extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAnsweringRuleResponseQueueFixedOrderAgentsItem(DataClassJsonMixin): extension: Optional[ReadAnsweringRuleResponseQueueFixedOrderAgentsItemExtension] = None index: Optional[int] = None """ Ordinal of an agent (call queue member) """ class ReadAnsweringRuleResponseQueueHoldAudioInterruptionMode(Enum): """ Connecting audio interruption mode """ Never = 'Never' WhenMusicEnds = 'WhenMusicEnds' Periodically = 'Periodically' class ReadAnsweringRuleResponseQueueHoldTimeExpirationAction(Enum): """ Specifies the type of action to be taken after the hold time (waiting for an available call queue member) expires. If 'TransferToExtension' option is selected, the extension specified in `transfer` field is used. The default value is `Voicemail` Generated by Python OpenAPI Parser """ TransferToExtension = 'TransferToExtension' UnconditionalForwarding = 'UnconditionalForwarding' Voicemail = 'Voicemail' class ReadAnsweringRuleResponseQueueMaxCallersAction(Enum): """ Specifies the type of action to be taken if count of callers on hold exceeds the supported maximum Generated by Python OpenAPI Parser """ Voicemail = 'Voicemail' Announcement = 'Announcement' TransferToExtension = 'TransferToExtension' UnconditionalForwarding = 'UnconditionalForwarding' class ReadAnsweringRuleResponseQueueUnconditionalForwardingItemAction(Enum): """ Event that initiates forwarding to the specified phone number """ HoldTimeExpiration = 'HoldTimeExpiration' MaxCallers = 'MaxCallers' NoAnswer = 'NoAnswer' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAnsweringRuleResponseQueueUnconditionalForwardingItem(DataClassJsonMixin): phone_number: Optional[str] = None """ Phone number to which the call is forwarded. In addition to common e.164 format, the following number patterns are supported: 11xxxxxxxxxxx, 444xxxxxxxxxxx, 616xxxxxxxxxxx; where xxxxxxxxxxx is a phone number in e.164 format (without '+' sign) """ action: Optional[ReadAnsweringRuleResponseQueueUnconditionalForwardingItemAction] = None """ Event that initiates forwarding to the specified phone number """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAnsweringRuleResponseQueue(DataClassJsonMixin): """ Queue settings applied for department (call queue) extension type, with the 'AgentQueue' value specified as a call handling action Generated by Python OpenAPI Parser """ transfer_mode: Optional[ReadAnsweringRuleResponseQueueTransferMode] = None """ Specifies how calls are transferred to group members """ transfer: Optional[List[ReadAnsweringRuleResponseQueueTransferItem]] = None """ Call transfer information """ no_answer_action: Optional[ReadAnsweringRuleResponseQueueNoAnswerAction] = None """ Specifies the type of action to be taken if: members are available but no one answers, or all members are busy/unavailable. This option is available for Business hours only. For simultaneous transfer mode only 'WaitPrimaryMembers' and 'WaitPrimaryAndOverflowMembers' are supported """ fixed_order_agents: Optional[List[ReadAnsweringRuleResponseQueueFixedOrderAgentsItem]] = None """ Information on a call forwarding rule """ hold_audio_interruption_mode: Optional[ReadAnsweringRuleResponseQueueHoldAudioInterruptionMode] = None """ Connecting audio interruption mode """ hold_audio_interruption_period: Optional[int] = None """ Connecting audio interruption message period in seconds """ hold_time_expiration_action: Optional[ReadAnsweringRuleResponseQueueHoldTimeExpirationAction] = 'Voicemail' """ Specifies the type of action to be taken after the hold time (waiting for an available call queue member) expires. If 'TransferToExtension' option is selected, the extension specified in `transfer` field is used. The default value is `Voicemail` """ agent_timeout: Optional[int] = None """ Maximum time in seconds to wait for a call queue member before trying the next member """ wrap_up_time: Optional[int] = None """ Minimum post-call wrap up time in seconds before agent status is automatically set; the value range is from 180 to 300 """ hold_time: Optional[int] = None """ Maximum hold time in seconds to wait for an available call queue member """ max_callers: Optional[int] = None """ Maximum count of callers on hold; the limitation is 25 callers """ max_callers_action: Optional[ReadAnsweringRuleResponseQueueMaxCallersAction] = None """ Specifies the type of action to be taken if count of callers on hold exceeds the supported maximum """ unconditional_forwarding: Optional[List[ReadAnsweringRuleResponseQueueUnconditionalForwardingItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAnsweringRuleResponseTransferExtension(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an extension """ uri: Optional[str] = None """ Canonical URI of an extension """ extension_number: Optional[str] = None """ Number of department extension """ partner_id: Optional[str] = None """ For Partner Applications Internal identifier of an extension created by partner. The RingCentral supports the mapping of accounts and stores the corresponding account ID/extension ID for each partner ID of a client application. In request URIs partner IDs are accepted instead of regular RingCentral native IDs as path parameters using pid = XXX clause. Though in response URIs contain the corresponding account IDs and extension IDs. In all request and response bodies these values are reflected via partnerId attributes of account and extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAnsweringRuleResponseTransfer(DataClassJsonMixin): """ Transfer settings applied for department (call queue) extension type, with 'TransferToExtension' call handling action Generated by Python OpenAPI Parser """ extension: Optional[ReadAnsweringRuleResponseTransferExtension] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAnsweringRuleResponseVoicemailRecipient(DataClassJsonMixin): """ Recipient data """ uri: Optional[str] = None """ Link to a recipient extension resource """ id: Optional[int] = None """ Internal identifier of a recipient extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAnsweringRuleResponseVoicemail(DataClassJsonMixin): """ Specifies whether to take a voicemail and who should do it """ enabled: Optional[bool] = None """ If 'True' then voicemails are allowed to be received """ recipient: Optional[ReadAnsweringRuleResponseVoicemailRecipient] = None """ Recipient data """ class ReadAnsweringRuleResponseGreetingsItemType(Enum): """ Type of a greeting, specifying the case when the greeting is played. """ Introductory = 'Introductory' Announcement = 'Announcement' ConnectingMessage = 'ConnectingMessage' ConnectingAudio = 'ConnectingAudio' Voicemail = 'Voicemail' Unavailable = 'Unavailable' InterruptPrompt = 'InterruptPrompt' HoldMusic = 'HoldMusic' Custom = 'Custom' Company = 'Company' BlockedCallersSpecific = 'BlockedCallersSpecific' BlockedCallersAll = 'BlockedCallersAll' BlockedNoCallerId = 'BlockedNoCallerId' BlockedPayPhones = 'BlockedPayPhones' StartRecording = 'StartRecording' StopRecording = 'StopRecording' AutomaticRecording = 'AutomaticRecording' class ReadAnsweringRuleResponseGreetingsItemUsageType(Enum): """ Usage type of a greeting, specifying if the greeting is applied to user extension or department extension. Generated by Python OpenAPI Parser """ UserExtensionAnsweringRule = 'UserExtensionAnsweringRule' ExtensionAnsweringRule = 'ExtensionAnsweringRule' DepartmentExtensionAnsweringRule = 'DepartmentExtensionAnsweringRule' CompanyAnsweringRule = 'CompanyAnsweringRule' CompanyAfterHoursAnsweringRule = 'CompanyAfterHoursAnsweringRule' VoicemailExtensionAnsweringRule = 'VoicemailExtensionAnsweringRule' AnnouncementExtensionAnsweringRule = 'AnnouncementExtensionAnsweringRule' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAnsweringRuleResponseGreetingsItemPreset(DataClassJsonMixin): uri: Optional[str] = None """ Link to a greeting resource """ id: Optional[str] = None """ Internal identifier of a greeting """ name: Optional[str] = None """ Name of a greeting """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAnsweringRuleResponseGreetingsItemCustom(DataClassJsonMixin): uri: Optional[str] = None """ Link to a custom user greeting """ id: Optional[str] = None """ Internal identifier of a custom user greeting """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAnsweringRuleResponseGreetingsItem(DataClassJsonMixin): type: Optional[ReadAnsweringRuleResponseGreetingsItemType] = None """ Type of a greeting, specifying the case when the greeting is played. """ usage_type: Optional[ReadAnsweringRuleResponseGreetingsItemUsageType] = None """ Usage type of a greeting, specifying if the greeting is applied to user extension or department extension. """ preset: Optional[ReadAnsweringRuleResponseGreetingsItemPreset] = None custom: Optional[ReadAnsweringRuleResponseGreetingsItemCustom] = None class ReadAnsweringRuleResponseScreening(Enum): """ Call screening status. 'Off' - no call screening; 'NoCallerId' - if caller ID is missing, then callers are asked to say their name before connecting; 'UnknownCallerId' - if caller ID is not in contact list, then callers are asked to say their name before connecting; 'Always' - the callers are always asked to say their name before connecting. The default value is 'Off' Generated by Python OpenAPI Parser """ Off = 'Off' NoCallerId = 'NoCallerId' UnknownCallerId = 'UnknownCallerId' Always = 'Always' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAnsweringRuleResponseSharedLines(DataClassJsonMixin): """ SharedLines call handling action settings """ timeout: Optional[int] = None """ Number of seconds to wait before forwarding unanswered calls. The value range is 10 - 80 """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAnsweringRuleResponse(DataClassJsonMixin): uri: Optional[str] = None """ Canonical URI to an answering rule resource """ id: Optional[str] = None """ Internal identifier of an answering rule """ type: Optional[ReadAnsweringRuleResponseType] = None """ Type of an answering rule """ name: Optional[str] = None """ Name of an answering rule specified by user """ enabled: Optional[bool] = None """ Specifies if an answering rule is active or inactive """ schedule: Optional[ReadAnsweringRuleResponseSchedule] = None """ Schedule when an answering rule should be applied """ called_numbers: Optional[List[ReadAnsweringRuleResponseCalledNumbersItem]] = None """ Answering rules are applied when calling to selected number(s) """ callers: Optional[List[ReadAnsweringRuleResponseCallersItem]] = None """ Answering rules are applied when calls are received from specified caller(s) """ call_handling_action: Optional[ReadAnsweringRuleResponseCallHandlingAction] = None """ Specifies how incoming calls are forwarded """ forwarding: Optional[ReadAnsweringRuleResponseForwarding] = None """ Forwarding parameters. Returned if 'ForwardCalls' is specified in 'callHandlingAction'. These settings determine the forwarding numbers to which the call will be forwarded """ unconditional_forwarding: Optional[ReadAnsweringRuleResponseUnconditionalForwarding] = None """ Unconditional forwarding parameters. Returned if 'UnconditionalForwarding' is specified in 'callHandlingAction' """ queue: Optional[ReadAnsweringRuleResponseQueue] = None """ Queue settings applied for department (call queue) extension type, with the 'AgentQueue' value specified as a call handling action """ transfer: Optional[ReadAnsweringRuleResponseTransfer] = None """ Transfer settings applied for department (call queue) extension type, with 'TransferToExtension' call handling action """ voicemail: Optional[ReadAnsweringRuleResponseVoicemail] = None """ Specifies whether to take a voicemail and who should do it """ greetings: Optional[List[ReadAnsweringRuleResponseGreetingsItem]] = None """ Greetings applied for an answering rule; only predefined greetings can be applied, see Dictionary Greeting List """ screening: Optional[ReadAnsweringRuleResponseScreening] = None """ Call screening status. 'Off' - no call screening; 'NoCallerId' - if caller ID is missing, then callers are asked to say their name before connecting; 'UnknownCallerId' - if caller ID is not in contact list, then callers are asked to say their name before connecting; 'Always' - the callers are always asked to say their name before connecting. The default value is 'Off' """ shared_lines: Optional[ReadAnsweringRuleResponseSharedLines] = None """ SharedLines call handling action settings """ class UpdateAnsweringRuleRequestForwardingRingingMode(Enum): """ Specifies the order in which forwarding numbers ring. 'Sequentially' means that forwarding numbers are ringing one at a time, in order of priority. 'Simultaneously' means that forwarding numbers are ringing all at the same time. The default value is 'Sequentially' Generated by Python OpenAPI Parser """ Sequentially = 'Sequentially' Simultaneously = 'Simultaneously' class UpdateAnsweringRuleRequestForwardingRulesItemForwardingNumbersItemType(Enum): """ Forwarding phone number type """ Home = 'Home' Mobile = 'Mobile' Work = 'Work' PhoneLine = 'PhoneLine' Outage = 'Outage' Other = 'Other' BusinessMobilePhone = 'BusinessMobilePhone' class UpdateAnsweringRuleRequestForwardingRulesItemForwardingNumbersItemLabel(Enum): """ Forwarding/Call flip number title """ Business_Mobile_Phone = 'Business Mobile Phone' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleRequestForwardingRulesItemForwardingNumbersItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a forwarding number """ type: Optional[UpdateAnsweringRuleRequestForwardingRulesItemForwardingNumbersItemType] = None """ Forwarding phone number type """ uri: Optional[str] = None """ Canonical URI of a forwarding/call flip phone number """ phone_number: Optional[str] = None """ Forwarding/Call flip phone number """ label: Optional[UpdateAnsweringRuleRequestForwardingRulesItemForwardingNumbersItemLabel] = None """ Forwarding/Call flip number title """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleRequestForwardingRulesItem(DataClassJsonMixin): index: Optional[int] = None """ Forwarding number (or group) ordinal. Not returned for inactive numbers """ ring_count: Optional[int] = None """ Number of rings for a forwarding number (or group). For inactive numbers the default value ('4') is returned """ enabled: Optional[bool] = None """ Phone number status """ forwarding_numbers: Optional[List[UpdateAnsweringRuleRequestForwardingRulesItemForwardingNumbersItem]] = None """ Forwarding number (or group) data """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleRequestForwarding(DataClassJsonMixin): """ Forwarding parameters. Returned if 'ForwardCalls' is specified in 'callHandlingAction'. These settings determine the forwarding numbers to which the call will be forwarded Generated by Python OpenAPI Parser """ notify_my_soft_phones: Optional[bool] = None """ Specifies if the first ring on desktop/mobile apps is enabled. The default value is 'True' """ notify_admin_soft_phones: Optional[bool] = None """ Specifies if the administrator's softphone (desktop application) is notified before forwarding the incoming call to desk phones and forwarding numbers. The default value is 'True' """ soft_phones_ring_count: Optional[int] = 1 """ Specifies delay between ring on apps and starting of a call forwarding """ ringing_mode: Optional[UpdateAnsweringRuleRequestForwardingRingingMode] = None """ Specifies the order in which forwarding numbers ring. 'Sequentially' means that forwarding numbers are ringing one at a time, in order of priority. 'Simultaneously' means that forwarding numbers are ringing all at the same time. The default value is 'Sequentially' """ rules: Optional[List[UpdateAnsweringRuleRequestForwardingRulesItem]] = None """ Information on a call forwarding rule """ mobile_timeout: Optional[bool] = None """ Specifies if mobile timeout is activated for the rule """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleRequestCallersItem(DataClassJsonMixin): caller_id: Optional[str] = None """ Phone number of a caller """ name: Optional[str] = None """ Contact name of a caller """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleRequestCalledNumbersItem(DataClassJsonMixin): phone_number: Optional[str] = None """ Called phone number """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleRequestScheduleWeeklyRangesMondayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleRequestScheduleWeeklyRangesTuesdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleRequestScheduleWeeklyRangesWednesdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleRequestScheduleWeeklyRangesThursdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleRequestScheduleWeeklyRangesFridayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleRequestScheduleWeeklyRangesSaturdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleRequestScheduleWeeklyRangesSundayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleRequestScheduleWeeklyRanges(DataClassJsonMixin): """ Weekly schedule """ monday: Optional[List[UpdateAnsweringRuleRequestScheduleWeeklyRangesMondayItem]] = None """ Time intervals for a particular day """ tuesday: Optional[List[UpdateAnsweringRuleRequestScheduleWeeklyRangesTuesdayItem]] = None """ Time intervals for a particular day """ wednesday: Optional[List[UpdateAnsweringRuleRequestScheduleWeeklyRangesWednesdayItem]] = None """ Time intervals for a particular day """ thursday: Optional[List[UpdateAnsweringRuleRequestScheduleWeeklyRangesThursdayItem]] = None """ Time intervals for a particular day """ friday: Optional[List[UpdateAnsweringRuleRequestScheduleWeeklyRangesFridayItem]] = None """ Time intervals for a particular day """ saturday: Optional[List[UpdateAnsweringRuleRequestScheduleWeeklyRangesSaturdayItem]] = None """ Time intervals for a particular day """ sunday: Optional[List[UpdateAnsweringRuleRequestScheduleWeeklyRangesSundayItem]] = None """ Time intervals for a particular day """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleRequestScheduleRangesItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Starting datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), for example *2018-10-29T14:00:00*, *2018-10-29T14:00:00Z*, *2018-10-29T14:00:00+0100* """ to: Optional[str] = None """ Ending datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), for example *2018-10-29T14:00:00*, *2018-10-29T14:00:00Z*, *2018-10-29T14:00:00+0100* """ class UpdateAnsweringRuleRequestScheduleRef(Enum): """ The user's schedule specified for business hours or after hours; it can also be set/retrieved calling the corresponding method Generated by Python OpenAPI Parser """ BusinessHours = 'BusinessHours' AfterHours = 'AfterHours' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleRequestSchedule(DataClassJsonMixin): """ Schedule when an answering rule should be applied """ weekly_ranges: Optional[UpdateAnsweringRuleRequestScheduleWeeklyRanges] = None """ Weekly schedule """ ranges: Optional[List[UpdateAnsweringRuleRequestScheduleRangesItem]] = None """ Specific data ranges """ ref: Optional[UpdateAnsweringRuleRequestScheduleRef] = None """ The user's schedule specified for business hours or after hours; it can also be set/retrieved calling the corresponding method """ class UpdateAnsweringRuleRequestCallHandlingAction(Enum): """ Specifies how incoming calls are forwarded """ ForwardCalls = 'ForwardCalls' UnconditionalForwarding = 'UnconditionalForwarding' AgentQueue = 'AgentQueue' TransferToExtension = 'TransferToExtension' TakeMessagesOnly = 'TakeMessagesOnly' PlayAnnouncementOnly = 'PlayAnnouncementOnly' SharedLines = 'SharedLines' class UpdateAnsweringRuleRequestType(Enum): """ Type of an answering rule """ BusinessHours = 'BusinessHours' AfterHours = 'AfterHours' Custom = 'Custom' class UpdateAnsweringRuleRequestUnconditionalForwardingAction(Enum): """ Event that initiates forwarding to the specified phone number """ HoldTimeExpiration = 'HoldTimeExpiration' MaxCallers = 'MaxCallers' NoAnswer = 'NoAnswer' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleRequestUnconditionalForwarding(DataClassJsonMixin): """ Unconditional forwarding parameters. Returned if 'UnconditionalForwarding' is specified in 'callHandlingAction' Generated by Python OpenAPI Parser """ phone_number: Optional[str] = None """ Phone number to which the call is forwarded. In addition to common e.164 format, the following number patterns are supported: 11xxxxxxxxxxx, 444xxxxxxxxxxx, 616xxxxxxxxxxx; where xxxxxxxxxxx is a phone number in e.164 format (without '+' sign) """ action: Optional[UpdateAnsweringRuleRequestUnconditionalForwardingAction] = None """ Event that initiates forwarding to the specified phone number """ class UpdateAnsweringRuleRequestQueueTransferMode(Enum): """ Specifies how calls are transferred to group members """ Rotating = 'Rotating' Simultaneous = 'Simultaneous' FixedOrder = 'FixedOrder' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleRequestQueueTransferItemExtension(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an extension the call is transferred to """ name: Optional[str] = None """ Extension name """ extension_number: Optional[str] = None """ Extension number """ class UpdateAnsweringRuleRequestQueueTransferItemAction(Enum): """ Event that initiates transferring to the specified extension """ HoldTimeExpiration = 'HoldTimeExpiration' MaxCallers = 'MaxCallers' NoAnswer = 'NoAnswer' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleRequestQueueTransferItem(DataClassJsonMixin): extension: Optional[UpdateAnsweringRuleRequestQueueTransferItemExtension] = None action: Optional[UpdateAnsweringRuleRequestQueueTransferItemAction] = None """ Event that initiates transferring to the specified extension """ class UpdateAnsweringRuleRequestQueueNoAnswerAction(Enum): """ Specifies the type of action to be taken if: members are available but no one answers, or all members are busy/unavailable. This option is available for Business hours only. For simultaneous transfer mode only 'WaitPrimaryMembers' and 'WaitPrimaryAndOverflowMembers' are supported Generated by Python OpenAPI Parser """ WaitPrimaryMembers = 'WaitPrimaryMembers' WaitPrimaryAndOverflowMembers = 'WaitPrimaryAndOverflowMembers' Voicemail = 'Voicemail' TransferToExtension = 'TransferToExtension' UnconditionalForwarding = 'UnconditionalForwarding' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleRequestQueueFixedOrderAgentsItemExtension(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an extension """ uri: Optional[str] = None """ Canonical URI of an extension """ extension_number: Optional[str] = None """ Number of department extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleRequestQueueFixedOrderAgentsItem(DataClassJsonMixin): extension: Optional[UpdateAnsweringRuleRequestQueueFixedOrderAgentsItemExtension] = None index: Optional[int] = None """ Ordinal of an agent (call queue member) """ class UpdateAnsweringRuleRequestQueueHoldAudioInterruptionMode(Enum): """ Connecting audio interruption mode """ Never = 'Never' WhenMusicEnds = 'WhenMusicEnds' Periodically = 'Periodically' class UpdateAnsweringRuleRequestQueueHoldTimeExpirationAction(Enum): """ Specifies the type of action to be taken after the hold time (waiting for an available call queue member) expires. If 'TransferToExtension' option is selected, the extension specified in `transfer` field is used. The default value is `Voicemail` Generated by Python OpenAPI Parser """ TransferToExtension = 'TransferToExtension' UnconditionalForwarding = 'UnconditionalForwarding' Voicemail = 'Voicemail' class UpdateAnsweringRuleRequestQueueMaxCallersAction(Enum): """ Specifies the type of action to be taken if count of callers on hold exceeds the supported maximum Generated by Python OpenAPI Parser """ Voicemail = 'Voicemail' Announcement = 'Announcement' TransferToExtension = 'TransferToExtension' UnconditionalForwarding = 'UnconditionalForwarding' class UpdateAnsweringRuleRequestQueueUnconditionalForwardingItemAction(Enum): """ Event that initiates forwarding to the specified phone number """ HoldTimeExpiration = 'HoldTimeExpiration' MaxCallers = 'MaxCallers' NoAnswer = 'NoAnswer' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleRequestQueueUnconditionalForwardingItem(DataClassJsonMixin): phone_number: Optional[str] = None """ Phone number to which the call is forwarded. In addition to common e.164 format, the following number patterns are supported: 11xxxxxxxxxxx, 444xxxxxxxxxxx, 616xxxxxxxxxxx; where xxxxxxxxxxx is a phone number in e.164 format (without '+' sign) """ action: Optional[UpdateAnsweringRuleRequestQueueUnconditionalForwardingItemAction] = None """ Event that initiates forwarding to the specified phone number """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleRequestQueue(DataClassJsonMixin): """ Queue settings applied for department (call queue) extension type, with the 'AgentQueue' value specified as a call handling action Generated by Python OpenAPI Parser """ transfer_mode: Optional[UpdateAnsweringRuleRequestQueueTransferMode] = None """ Specifies how calls are transferred to group members """ transfer: Optional[List[UpdateAnsweringRuleRequestQueueTransferItem]] = None """ Call transfer information """ no_answer_action: Optional[UpdateAnsweringRuleRequestQueueNoAnswerAction] = None """ Specifies the type of action to be taken if: members are available but no one answers, or all members are busy/unavailable. This option is available for Business hours only. For simultaneous transfer mode only 'WaitPrimaryMembers' and 'WaitPrimaryAndOverflowMembers' are supported """ fixed_order_agents: Optional[List[UpdateAnsweringRuleRequestQueueFixedOrderAgentsItem]] = None """ Information on a call forwarding rule """ hold_audio_interruption_mode: Optional[UpdateAnsweringRuleRequestQueueHoldAudioInterruptionMode] = None """ Connecting audio interruption mode """ hold_audio_interruption_period: Optional[int] = None """ Connecting audio interruption message period in seconds """ hold_time_expiration_action: Optional[UpdateAnsweringRuleRequestQueueHoldTimeExpirationAction] = 'Voicemail' """ Specifies the type of action to be taken after the hold time (waiting for an available call queue member) expires. If 'TransferToExtension' option is selected, the extension specified in `transfer` field is used. The default value is `Voicemail` """ agent_timeout: Optional[int] = None """ Maximum time in seconds to wait for a call queue member before trying the next member """ wrap_up_time: Optional[int] = None """ Minimum post-call wrap up time in seconds before agent status is automatically set; the value range is from 180 to 300 """ hold_time: Optional[int] = None """ Maximum hold time in seconds to wait for an available call queue member """ max_callers: Optional[int] = None """ Maximum count of callers on hold; the limitation is 25 callers """ max_callers_action: Optional[UpdateAnsweringRuleRequestQueueMaxCallersAction] = None """ Specifies the type of action to be taken if count of callers on hold exceeds the supported maximum """ unconditional_forwarding: Optional[List[UpdateAnsweringRuleRequestQueueUnconditionalForwardingItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleRequestVoicemailRecipient(DataClassJsonMixin): """ Recipient data """ uri: Optional[str] = None """ Link to a recipient extension resource """ id: Optional[int] = None """ Internal identifier of a recipient extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleRequestVoicemail(DataClassJsonMixin): """ Specifies whether to take a voicemail and who should do it """ enabled: Optional[bool] = None """ If 'True' then voicemails are allowed to be received """ recipient: Optional[UpdateAnsweringRuleRequestVoicemailRecipient] = None """ Recipient data """ class UpdateAnsweringRuleRequestGreetingsItemType(Enum): """ Type of a greeting, specifying the case when the greeting is played. """ Introductory = 'Introductory' Announcement = 'Announcement' ConnectingMessage = 'ConnectingMessage' ConnectingAudio = 'ConnectingAudio' Voicemail = 'Voicemail' Unavailable = 'Unavailable' InterruptPrompt = 'InterruptPrompt' HoldMusic = 'HoldMusic' Custom = 'Custom' Company = 'Company' BlockedCallersSpecific = 'BlockedCallersSpecific' BlockedCallersAll = 'BlockedCallersAll' BlockedNoCallerId = 'BlockedNoCallerId' BlockedPayPhones = 'BlockedPayPhones' StartRecording = 'StartRecording' StopRecording = 'StopRecording' AutomaticRecording = 'AutomaticRecording' class UpdateAnsweringRuleRequestGreetingsItemUsageType(Enum): """ Usage type of a greeting, specifying if the greeting is applied to user extension or department extension. Generated by Python OpenAPI Parser """ UserExtensionAnsweringRule = 'UserExtensionAnsweringRule' ExtensionAnsweringRule = 'ExtensionAnsweringRule' DepartmentExtensionAnsweringRule = 'DepartmentExtensionAnsweringRule' CompanyAnsweringRule = 'CompanyAnsweringRule' CompanyAfterHoursAnsweringRule = 'CompanyAfterHoursAnsweringRule' VoicemailExtensionAnsweringRule = 'VoicemailExtensionAnsweringRule' AnnouncementExtensionAnsweringRule = 'AnnouncementExtensionAnsweringRule' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleRequestGreetingsItemPreset(DataClassJsonMixin): uri: Optional[str] = None """ Link to a greeting resource """ id: Optional[str] = None """ Internal identifier of a greeting """ name: Optional[str] = None """ Name of a greeting """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleRequestGreetingsItemCustom(DataClassJsonMixin): uri: Optional[str] = None """ Link to a custom user greeting """ id: Optional[str] = None """ Internal identifier of a custom user greeting """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleRequestGreetingsItem(DataClassJsonMixin): type: Optional[UpdateAnsweringRuleRequestGreetingsItemType] = None """ Type of a greeting, specifying the case when the greeting is played. """ usage_type: Optional[UpdateAnsweringRuleRequestGreetingsItemUsageType] = None """ Usage type of a greeting, specifying if the greeting is applied to user extension or department extension. """ preset: Optional[UpdateAnsweringRuleRequestGreetingsItemPreset] = None custom: Optional[UpdateAnsweringRuleRequestGreetingsItemCustom] = None class UpdateAnsweringRuleRequestScreening(Enum): """ Call screening status. 'Off' - no call screening; 'NoCallerId' - if caller ID is missing, then callers are asked to say their name before connecting; 'UnknownCallerId' - if caller ID is not in contact list, then callers are asked to say their name before connecting; 'Always' - the callers are always asked to say their name before connecting. The default value is 'Off' Generated by Python OpenAPI Parser """ Off = 'Off' NoCallerId = 'NoCallerId' UnknownCallerId = 'UnknownCallerId' Always = 'Always' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleRequestTransferExtension(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an extension """ uri: Optional[str] = None """ Canonical URI of an extension """ extension_number: Optional[str] = None """ Number of department extension """ partner_id: Optional[str] = None """ For Partner Applications Internal identifier of an extension created by partner. The RingCentral supports the mapping of accounts and stores the corresponding account ID/extension ID for each partner ID of a client application. In request URIs partner IDs are accepted instead of regular RingCentral native IDs as path parameters using pid = XXX clause. Though in response URIs contain the corresponding account IDs and extension IDs. In all request and response bodies these values are reflected via partnerId attributes of account and extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleRequestTransfer(DataClassJsonMixin): """ Transfer settings applied for department (call queue) extension type, with 'TransferToExtension' call handling action Generated by Python OpenAPI Parser """ extension: Optional[UpdateAnsweringRuleRequestTransferExtension] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleRequest(DataClassJsonMixin): id: Optional[str] = None """ Identifier of an answering rule """ forwarding: Optional[UpdateAnsweringRuleRequestForwarding] = None """ Forwarding parameters. Returned if 'ForwardCalls' is specified in 'callHandlingAction'. These settings determine the forwarding numbers to which the call will be forwarded """ enabled: Optional[bool] = None """ Specifies if the rule is active or inactive. The default value is 'True' """ name: Optional[str] = None """ Name of an answering rule specified by user """ callers: Optional[List[UpdateAnsweringRuleRequestCallersItem]] = None """ Answering rule will be applied when calls are received from the specified caller(s) """ called_numbers: Optional[List[UpdateAnsweringRuleRequestCalledNumbersItem]] = None """ Answering rules are applied when calling to selected number(s) """ schedule: Optional[UpdateAnsweringRuleRequestSchedule] = None """ Schedule when an answering rule should be applied """ call_handling_action: Optional[UpdateAnsweringRuleRequestCallHandlingAction] = None """ Specifies how incoming calls are forwarded """ type: Optional[UpdateAnsweringRuleRequestType] = None """ Type of an answering rule """ unconditional_forwarding: Optional[UpdateAnsweringRuleRequestUnconditionalForwarding] = None """ Unconditional forwarding parameters. Returned if 'UnconditionalForwarding' is specified in 'callHandlingAction' """ queue: Optional[UpdateAnsweringRuleRequestQueue] = None """ Queue settings applied for department (call queue) extension type, with the 'AgentQueue' value specified as a call handling action """ voicemail: Optional[UpdateAnsweringRuleRequestVoicemail] = None """ Specifies whether to take a voicemail and who should do it """ greetings: Optional[List[UpdateAnsweringRuleRequestGreetingsItem]] = None """ Greetings applied for an answering rule; only predefined greetings can be applied, see Dictionary Greeting List """ screening: Optional[UpdateAnsweringRuleRequestScreening] = None """ Call screening status. 'Off' - no call screening; 'NoCallerId' - if caller ID is missing, then callers are asked to say their name before connecting; 'UnknownCallerId' - if caller ID is not in contact list, then callers are asked to say their name before connecting; 'Always' - the callers are always asked to say their name before connecting. The default value is 'Off' """ show_inactive_numbers: Optional[bool] = None """ Indicates whether inactive numbers should be returned or not """ transfer: Optional[UpdateAnsweringRuleRequestTransfer] = None """ Transfer settings applied for department (call queue) extension type, with 'TransferToExtension' call handling action """ class UpdateAnsweringRuleResponseType(Enum): """ Type of an answering rule """ BusinessHours = 'BusinessHours' AfterHours = 'AfterHours' Custom = 'Custom' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleResponseScheduleWeeklyRangesMondayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleResponseScheduleWeeklyRangesTuesdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleResponseScheduleWeeklyRangesWednesdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleResponseScheduleWeeklyRangesThursdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleResponseScheduleWeeklyRangesFridayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleResponseScheduleWeeklyRangesSaturdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleResponseScheduleWeeklyRangesSundayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleResponseScheduleWeeklyRanges(DataClassJsonMixin): """ Weekly schedule """ monday: Optional[List[UpdateAnsweringRuleResponseScheduleWeeklyRangesMondayItem]] = None """ Time intervals for a particular day """ tuesday: Optional[List[UpdateAnsweringRuleResponseScheduleWeeklyRangesTuesdayItem]] = None """ Time intervals for a particular day """ wednesday: Optional[List[UpdateAnsweringRuleResponseScheduleWeeklyRangesWednesdayItem]] = None """ Time intervals for a particular day """ thursday: Optional[List[UpdateAnsweringRuleResponseScheduleWeeklyRangesThursdayItem]] = None """ Time intervals for a particular day """ friday: Optional[List[UpdateAnsweringRuleResponseScheduleWeeklyRangesFridayItem]] = None """ Time intervals for a particular day """ saturday: Optional[List[UpdateAnsweringRuleResponseScheduleWeeklyRangesSaturdayItem]] = None """ Time intervals for a particular day """ sunday: Optional[List[UpdateAnsweringRuleResponseScheduleWeeklyRangesSundayItem]] = None """ Time intervals for a particular day """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleResponseScheduleRangesItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Starting datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), for example *2018-10-29T14:00:00*, *2018-10-29T14:00:00Z*, *2018-10-29T14:00:00+0100* """ to: Optional[str] = None """ Ending datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), for example *2018-10-29T14:00:00*, *2018-10-29T14:00:00Z*, *2018-10-29T14:00:00+0100* """ class UpdateAnsweringRuleResponseScheduleRef(Enum): """ The user's schedule specified for business hours or after hours; it can also be set/retrieved calling the corresponding method Generated by Python OpenAPI Parser """ BusinessHours = 'BusinessHours' AfterHours = 'AfterHours' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleResponseSchedule(DataClassJsonMixin): """ Schedule when an answering rule should be applied """ weekly_ranges: Optional[UpdateAnsweringRuleResponseScheduleWeeklyRanges] = None """ Weekly schedule """ ranges: Optional[List[UpdateAnsweringRuleResponseScheduleRangesItem]] = None """ Specific data ranges """ ref: Optional[UpdateAnsweringRuleResponseScheduleRef] = None """ The user's schedule specified for business hours or after hours; it can also be set/retrieved calling the corresponding method """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleResponseCalledNumbersItem(DataClassJsonMixin): phone_number: Optional[str] = None """ Called phone number """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleResponseCallersItem(DataClassJsonMixin): caller_id: Optional[str] = None """ Phone number of a caller """ name: Optional[str] = None """ Contact name of a caller """ class UpdateAnsweringRuleResponseCallHandlingAction(Enum): """ Specifies how incoming calls are forwarded """ ForwardCalls = 'ForwardCalls' UnconditionalForwarding = 'UnconditionalForwarding' AgentQueue = 'AgentQueue' TransferToExtension = 'TransferToExtension' TakeMessagesOnly = 'TakeMessagesOnly' PlayAnnouncementOnly = 'PlayAnnouncementOnly' SharedLines = 'SharedLines' class UpdateAnsweringRuleResponseForwardingRingingMode(Enum): """ Specifies the order in which forwarding numbers ring. 'Sequentially' means that forwarding numbers are ringing one at a time, in order of priority. 'Simultaneously' means that forwarding numbers are ring all at the same time Generated by Python OpenAPI Parser """ Sequentially = 'Sequentially' Simultaneously = 'Simultaneously' class UpdateAnsweringRuleResponseForwardingRulesItemForwardingNumbersItemLabel(Enum): """ Forwarding/Call flip number title """ Business_Mobile_Phone = 'Business Mobile Phone' class UpdateAnsweringRuleResponseForwardingRulesItemForwardingNumbersItemType(Enum): """ Type of a forwarding number """ Home = 'Home' Mobile = 'Mobile' Work = 'Work' PhoneLine = 'PhoneLine' Outage = 'Outage' Other = 'Other' BusinessMobilePhone = 'BusinessMobilePhone' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleResponseForwardingRulesItemForwardingNumbersItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a forwarding number """ uri: Optional[str] = None """ Canonical URI of a forwarding/call flip phone number """ phone_number: Optional[str] = None """ Forwarding/Call flip phone number """ label: Optional[UpdateAnsweringRuleResponseForwardingRulesItemForwardingNumbersItemLabel] = None """ Forwarding/Call flip number title """ type: Optional[UpdateAnsweringRuleResponseForwardingRulesItemForwardingNumbersItemType] = None """ Type of a forwarding number """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleResponseForwardingRulesItem(DataClassJsonMixin): index: Optional[int] = None """ Forwarding number (or group) ordinal """ ring_count: Optional[int] = None """ Number of rings for a forwarding number (or group) """ enabled: Optional[bool] = None """ Forwarding number status. Returned only if `showInactiveNumbers` is set to `true` """ forwarding_numbers: Optional[List[UpdateAnsweringRuleResponseForwardingRulesItemForwardingNumbersItem]] = None """ Forwarding number (or group) data """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleResponseForwarding(DataClassJsonMixin): """ Forwarding parameters. Returned if 'ForwardCalls' is specified in 'callHandlingAction'. These settings determine the forwarding numbers to which the call will be forwarded Generated by Python OpenAPI Parser """ notify_my_soft_phones: Optional[bool] = None """ Specifies if the user's softphone(s) are notified before forwarding the incoming call to desk phones and forwarding numbers """ notify_admin_soft_phones: Optional[bool] = None """ Specifies if the administrator's softphone is notified before forwarding the incoming call to desk phones and forwarding numbers. The default value is 'False' """ soft_phones_ring_count: Optional[int] = None """ Number of rings before forwarding starts """ ringing_mode: Optional[UpdateAnsweringRuleResponseForwardingRingingMode] = None """ Specifies the order in which forwarding numbers ring. 'Sequentially' means that forwarding numbers are ringing one at a time, in order of priority. 'Simultaneously' means that forwarding numbers are ring all at the same time """ rules: Optional[List[UpdateAnsweringRuleResponseForwardingRulesItem]] = None """ Information on a call forwarding rule """ mobile_timeout: Optional[bool] = None """ Specifies if mobile timeout is activated for the rule """ class UpdateAnsweringRuleResponseUnconditionalForwardingAction(Enum): """ Event that initiates forwarding to the specified phone number """ HoldTimeExpiration = 'HoldTimeExpiration' MaxCallers = 'MaxCallers' NoAnswer = 'NoAnswer' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleResponseUnconditionalForwarding(DataClassJsonMixin): """ Unconditional forwarding parameters. Returned if 'UnconditionalForwarding' is specified in 'callHandlingAction' Generated by Python OpenAPI Parser """ phone_number: Optional[str] = None """ Phone number to which the call is forwarded. In addition to common e.164 format, the following number patterns are supported: 11xxxxxxxxxxx, 444xxxxxxxxxxx, 616xxxxxxxxxxx; where xxxxxxxxxxx is a phone number in e.164 format (without '+' sign) """ action: Optional[UpdateAnsweringRuleResponseUnconditionalForwardingAction] = None """ Event that initiates forwarding to the specified phone number """ class UpdateAnsweringRuleResponseQueueTransferMode(Enum): """ Specifies how calls are transferred to group members """ Rotating = 'Rotating' Simultaneous = 'Simultaneous' FixedOrder = 'FixedOrder' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleResponseQueueTransferItemExtension(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an extension the call is transferred to """ name: Optional[str] = None """ Extension name """ extension_number: Optional[str] = None """ Extension number """ class UpdateAnsweringRuleResponseQueueTransferItemAction(Enum): """ Event that initiates transferring to the specified extension """ HoldTimeExpiration = 'HoldTimeExpiration' MaxCallers = 'MaxCallers' NoAnswer = 'NoAnswer' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleResponseQueueTransferItem(DataClassJsonMixin): extension: Optional[UpdateAnsweringRuleResponseQueueTransferItemExtension] = None action: Optional[UpdateAnsweringRuleResponseQueueTransferItemAction] = None """ Event that initiates transferring to the specified extension """ class UpdateAnsweringRuleResponseQueueNoAnswerAction(Enum): """ Specifies the type of action to be taken if: members are available but no one answers, or all members are busy/unavailable. This option is available for Business hours only. For simultaneous transfer mode only 'WaitPrimaryMembers' and 'WaitPrimaryAndOverflowMembers' are supported Generated by Python OpenAPI Parser """ WaitPrimaryMembers = 'WaitPrimaryMembers' WaitPrimaryAndOverflowMembers = 'WaitPrimaryAndOverflowMembers' Voicemail = 'Voicemail' TransferToExtension = 'TransferToExtension' UnconditionalForwarding = 'UnconditionalForwarding' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleResponseQueueFixedOrderAgentsItemExtension(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an extension """ uri: Optional[str] = None """ Canonical URI of an extension """ extension_number: Optional[str] = None """ Number of department extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleResponseQueueFixedOrderAgentsItem(DataClassJsonMixin): extension: Optional[UpdateAnsweringRuleResponseQueueFixedOrderAgentsItemExtension] = None index: Optional[int] = None """ Ordinal of an agent (call queue member) """ class UpdateAnsweringRuleResponseQueueHoldAudioInterruptionMode(Enum): """ Connecting audio interruption mode """ Never = 'Never' WhenMusicEnds = 'WhenMusicEnds' Periodically = 'Periodically' class UpdateAnsweringRuleResponseQueueHoldTimeExpirationAction(Enum): """ Specifies the type of action to be taken after the hold time (waiting for an available call queue member) expires. If 'TransferToExtension' option is selected, the extension specified in `transfer` field is used. The default value is `Voicemail` Generated by Python OpenAPI Parser """ TransferToExtension = 'TransferToExtension' UnconditionalForwarding = 'UnconditionalForwarding' Voicemail = 'Voicemail' class UpdateAnsweringRuleResponseQueueMaxCallersAction(Enum): """ Specifies the type of action to be taken if count of callers on hold exceeds the supported maximum Generated by Python OpenAPI Parser """ Voicemail = 'Voicemail' Announcement = 'Announcement' TransferToExtension = 'TransferToExtension' UnconditionalForwarding = 'UnconditionalForwarding' class UpdateAnsweringRuleResponseQueueUnconditionalForwardingItemAction(Enum): """ Event that initiates forwarding to the specified phone number """ HoldTimeExpiration = 'HoldTimeExpiration' MaxCallers = 'MaxCallers' NoAnswer = 'NoAnswer' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleResponseQueueUnconditionalForwardingItem(DataClassJsonMixin): phone_number: Optional[str] = None """ Phone number to which the call is forwarded. In addition to common e.164 format, the following number patterns are supported: 11xxxxxxxxxxx, 444xxxxxxxxxxx, 616xxxxxxxxxxx; where xxxxxxxxxxx is a phone number in e.164 format (without '+' sign) """ action: Optional[UpdateAnsweringRuleResponseQueueUnconditionalForwardingItemAction] = None """ Event that initiates forwarding to the specified phone number """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleResponseQueue(DataClassJsonMixin): """ Queue settings applied for department (call queue) extension type, with the 'AgentQueue' value specified as a call handling action Generated by Python OpenAPI Parser """ transfer_mode: Optional[UpdateAnsweringRuleResponseQueueTransferMode] = None """ Specifies how calls are transferred to group members """ transfer: Optional[List[UpdateAnsweringRuleResponseQueueTransferItem]] = None """ Call transfer information """ no_answer_action: Optional[UpdateAnsweringRuleResponseQueueNoAnswerAction] = None """ Specifies the type of action to be taken if: members are available but no one answers, or all members are busy/unavailable. This option is available for Business hours only. For simultaneous transfer mode only 'WaitPrimaryMembers' and 'WaitPrimaryAndOverflowMembers' are supported """ fixed_order_agents: Optional[List[UpdateAnsweringRuleResponseQueueFixedOrderAgentsItem]] = None """ Information on a call forwarding rule """ hold_audio_interruption_mode: Optional[UpdateAnsweringRuleResponseQueueHoldAudioInterruptionMode] = None """ Connecting audio interruption mode """ hold_audio_interruption_period: Optional[int] = None """ Connecting audio interruption message period in seconds """ hold_time_expiration_action: Optional[UpdateAnsweringRuleResponseQueueHoldTimeExpirationAction] = 'Voicemail' """ Specifies the type of action to be taken after the hold time (waiting for an available call queue member) expires. If 'TransferToExtension' option is selected, the extension specified in `transfer` field is used. The default value is `Voicemail` """ agent_timeout: Optional[int] = None """ Maximum time in seconds to wait for a call queue member before trying the next member """ wrap_up_time: Optional[int] = None """ Minimum post-call wrap up time in seconds before agent status is automatically set; the value range is from 180 to 300 """ hold_time: Optional[int] = None """ Maximum hold time in seconds to wait for an available call queue member """ max_callers: Optional[int] = None """ Maximum count of callers on hold; the limitation is 25 callers """ max_callers_action: Optional[UpdateAnsweringRuleResponseQueueMaxCallersAction] = None """ Specifies the type of action to be taken if count of callers on hold exceeds the supported maximum """ unconditional_forwarding: Optional[List[UpdateAnsweringRuleResponseQueueUnconditionalForwardingItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleResponseTransferExtension(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an extension """ uri: Optional[str] = None """ Canonical URI of an extension """ extension_number: Optional[str] = None """ Number of department extension """ partner_id: Optional[str] = None """ For Partner Applications Internal identifier of an extension created by partner. The RingCentral supports the mapping of accounts and stores the corresponding account ID/extension ID for each partner ID of a client application. In request URIs partner IDs are accepted instead of regular RingCentral native IDs as path parameters using pid = XXX clause. Though in response URIs contain the corresponding account IDs and extension IDs. In all request and response bodies these values are reflected via partnerId attributes of account and extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleResponseTransfer(DataClassJsonMixin): """ Transfer settings applied for department (call queue) extension type, with 'TransferToExtension' call handling action Generated by Python OpenAPI Parser """ extension: Optional[UpdateAnsweringRuleResponseTransferExtension] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleResponseVoicemailRecipient(DataClassJsonMixin): """ Recipient data """ uri: Optional[str] = None """ Link to a recipient extension resource """ id: Optional[int] = None """ Internal identifier of a recipient extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleResponseVoicemail(DataClassJsonMixin): """ Specifies whether to take a voicemail and who should do it """ enabled: Optional[bool] = None """ If 'True' then voicemails are allowed to be received """ recipient: Optional[UpdateAnsweringRuleResponseVoicemailRecipient] = None """ Recipient data """ class UpdateAnsweringRuleResponseGreetingsItemType(Enum): """ Type of a greeting, specifying the case when the greeting is played. """ Introductory = 'Introductory' Announcement = 'Announcement' ConnectingMessage = 'ConnectingMessage' ConnectingAudio = 'ConnectingAudio' Voicemail = 'Voicemail' Unavailable = 'Unavailable' InterruptPrompt = 'InterruptPrompt' HoldMusic = 'HoldMusic' Custom = 'Custom' Company = 'Company' BlockedCallersSpecific = 'BlockedCallersSpecific' BlockedCallersAll = 'BlockedCallersAll' BlockedNoCallerId = 'BlockedNoCallerId' BlockedPayPhones = 'BlockedPayPhones' StartRecording = 'StartRecording' StopRecording = 'StopRecording' AutomaticRecording = 'AutomaticRecording' class UpdateAnsweringRuleResponseGreetingsItemUsageType(Enum): """ Usage type of a greeting, specifying if the greeting is applied to user extension or department extension. Generated by Python OpenAPI Parser """ UserExtensionAnsweringRule = 'UserExtensionAnsweringRule' ExtensionAnsweringRule = 'ExtensionAnsweringRule' DepartmentExtensionAnsweringRule = 'DepartmentExtensionAnsweringRule' CompanyAnsweringRule = 'CompanyAnsweringRule' CompanyAfterHoursAnsweringRule = 'CompanyAfterHoursAnsweringRule' VoicemailExtensionAnsweringRule = 'VoicemailExtensionAnsweringRule' AnnouncementExtensionAnsweringRule = 'AnnouncementExtensionAnsweringRule' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleResponseGreetingsItemPreset(DataClassJsonMixin): uri: Optional[str] = None """ Link to a greeting resource """ id: Optional[str] = None """ Internal identifier of a greeting """ name: Optional[str] = None """ Name of a greeting """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleResponseGreetingsItemCustom(DataClassJsonMixin): uri: Optional[str] = None """ Link to a custom user greeting """ id: Optional[str] = None """ Internal identifier of a custom user greeting """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleResponseGreetingsItem(DataClassJsonMixin): type: Optional[UpdateAnsweringRuleResponseGreetingsItemType] = None """ Type of a greeting, specifying the case when the greeting is played. """ usage_type: Optional[UpdateAnsweringRuleResponseGreetingsItemUsageType] = None """ Usage type of a greeting, specifying if the greeting is applied to user extension or department extension. """ preset: Optional[UpdateAnsweringRuleResponseGreetingsItemPreset] = None custom: Optional[UpdateAnsweringRuleResponseGreetingsItemCustom] = None class UpdateAnsweringRuleResponseScreening(Enum): """ Call screening status. 'Off' - no call screening; 'NoCallerId' - if caller ID is missing, then callers are asked to say their name before connecting; 'UnknownCallerId' - if caller ID is not in contact list, then callers are asked to say their name before connecting; 'Always' - the callers are always asked to say their name before connecting. The default value is 'Off' Generated by Python OpenAPI Parser """ Off = 'Off' NoCallerId = 'NoCallerId' UnknownCallerId = 'UnknownCallerId' Always = 'Always' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleResponseSharedLines(DataClassJsonMixin): """ SharedLines call handling action settings """ timeout: Optional[int] = None """ Number of seconds to wait before forwarding unanswered calls. The value range is 10 - 80 """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleResponse(DataClassJsonMixin): uri: Optional[str] = None """ Canonical URI to an answering rule resource """ id: Optional[str] = None """ Internal identifier of an answering rule """ type: Optional[UpdateAnsweringRuleResponseType] = None """ Type of an answering rule """ name: Optional[str] = None """ Name of an answering rule specified by user """ enabled: Optional[bool] = None """ Specifies if an answering rule is active or inactive """ schedule: Optional[UpdateAnsweringRuleResponseSchedule] = None """ Schedule when an answering rule should be applied """ called_numbers: Optional[List[UpdateAnsweringRuleResponseCalledNumbersItem]] = None """ Answering rules are applied when calling to selected number(s) """ callers: Optional[List[UpdateAnsweringRuleResponseCallersItem]] = None """ Answering rules are applied when calls are received from specified caller(s) """ call_handling_action: Optional[UpdateAnsweringRuleResponseCallHandlingAction] = None """ Specifies how incoming calls are forwarded """ forwarding: Optional[UpdateAnsweringRuleResponseForwarding] = None """ Forwarding parameters. Returned if 'ForwardCalls' is specified in 'callHandlingAction'. These settings determine the forwarding numbers to which the call will be forwarded """ unconditional_forwarding: Optional[UpdateAnsweringRuleResponseUnconditionalForwarding] = None """ Unconditional forwarding parameters. Returned if 'UnconditionalForwarding' is specified in 'callHandlingAction' """ queue: Optional[UpdateAnsweringRuleResponseQueue] = None """ Queue settings applied for department (call queue) extension type, with the 'AgentQueue' value specified as a call handling action """ transfer: Optional[UpdateAnsweringRuleResponseTransfer] = None """ Transfer settings applied for department (call queue) extension type, with 'TransferToExtension' call handling action """ voicemail: Optional[UpdateAnsweringRuleResponseVoicemail] = None """ Specifies whether to take a voicemail and who should do it """ greetings: Optional[List[UpdateAnsweringRuleResponseGreetingsItem]] = None """ Greetings applied for an answering rule; only predefined greetings can be applied, see Dictionary Greeting List """ screening: Optional[UpdateAnsweringRuleResponseScreening] = None """ Call screening status. 'Off' - no call screening; 'NoCallerId' - if caller ID is missing, then callers are asked to say their name before connecting; 'UnknownCallerId' - if caller ID is not in contact list, then callers are asked to say their name before connecting; 'Always' - the callers are always asked to say their name before connecting. The default value is 'Off' """ shared_lines: Optional[UpdateAnsweringRuleResponseSharedLines] = None """ SharedLines call handling action settings """ class ListCompanyAnsweringRulesResponseRecordsItemType(Enum): """ Type of an answering rule, the default value is 'Custom' = ['BusinessHours', 'AfterHours', 'Custom'] Generated by Python OpenAPI Parser """ BusinessHours = 'BusinessHours' AfterHours = 'AfterHours' Custom = 'Custom' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCompanyAnsweringRulesResponseRecordsItemCalledNumbersItem(DataClassJsonMixin): phone_number: Optional[str] = None """ Called phone number """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCompanyAnsweringRulesResponseRecordsItemExtension(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCompanyAnsweringRulesResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an answering rule """ uri: Optional[str] = None """ Canonical URI of an answering rule """ enabled: Optional[bool] = True """ Specifies if the rule is active or inactive. The default value is 'True' """ type: Optional[ListCompanyAnsweringRulesResponseRecordsItemType] = None """ Type of an answering rule, the default value is 'Custom' = ['BusinessHours', 'AfterHours', 'Custom'] """ name: Optional[str] = None """ Name of an answering rule specified by user. Max number of symbols is 30. The default value is 'My Rule N' where 'N' is the first free number """ called_numbers: Optional[List[ListCompanyAnsweringRulesResponseRecordsItemCalledNumbersItem]] = None """ Answering rules are applied when calling to selected number(s) """ extension: Optional[ListCompanyAnsweringRulesResponseRecordsItemExtension] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCompanyAnsweringRulesResponsePaging(DataClassJsonMixin): """ Information on paging """ page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) """ per_page: Optional[int] = None """ Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty """ total_pages: Optional[int] = None """ The total number of pages in a dataset. May be omitted for some resources due to performance reasons """ total_elements: Optional[int] = None """ The total number of elements in a dataset. May be omitted for some resource due to performance reasons """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCompanyAnsweringRulesResponseNavigationFirstPage(DataClassJsonMixin): """ Canonical URI for the first page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCompanyAnsweringRulesResponseNavigationNextPage(DataClassJsonMixin): """ Canonical URI for the next page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCompanyAnsweringRulesResponseNavigationPreviousPage(DataClassJsonMixin): """ Canonical URI for the previous page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCompanyAnsweringRulesResponseNavigationLastPage(DataClassJsonMixin): """ Canonical URI for the last page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCompanyAnsweringRulesResponseNavigation(DataClassJsonMixin): """ Information on navigation """ first_page: Optional[ListCompanyAnsweringRulesResponseNavigationFirstPage] = None """ Canonical URI for the first page of the list """ next_page: Optional[ListCompanyAnsweringRulesResponseNavigationNextPage] = None """ Canonical URI for the next page of the list """ previous_page: Optional[ListCompanyAnsweringRulesResponseNavigationPreviousPage] = None """ Canonical URI for the previous page of the list """ last_page: Optional[ListCompanyAnsweringRulesResponseNavigationLastPage] = None """ Canonical URI for the last page of the list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCompanyAnsweringRulesResponse(DataClassJsonMixin): uri: Optional[str] = None """ Link to an answering rule resource """ records: Optional[List[ListCompanyAnsweringRulesResponseRecordsItem]] = None """ List of company answering rules """ paging: Optional[ListCompanyAnsweringRulesResponsePaging] = None """ Information on paging """ navigation: Optional[ListCompanyAnsweringRulesResponseNavigation] = None """ Information on navigation """ class CreateCompanyAnsweringRuleRequestType(Enum): """ Type of an answering rule, the default value is 'Custom' = ['BusinessHours', 'AfterHours', 'Custom'] Generated by Python OpenAPI Parser """ BusinessHours = 'BusinessHours' AfterHours = 'AfterHours' Custom = 'Custom' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateCompanyAnsweringRuleRequestCallersItem(DataClassJsonMixin): caller_id: Optional[str] = None """ Phone number of a caller """ name: Optional[str] = None """ Displayed name for a caller ID """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateCompanyAnsweringRuleRequestCalledNumbersItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an account phone number """ phone_number: Optional[str] = None """ Phone number of a callee """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateCompanyAnsweringRuleRequestScheduleWeeklyRangesMondayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateCompanyAnsweringRuleRequestScheduleWeeklyRangesTuesdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateCompanyAnsweringRuleRequestScheduleWeeklyRangesWednesdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateCompanyAnsweringRuleRequestScheduleWeeklyRangesThursdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateCompanyAnsweringRuleRequestScheduleWeeklyRangesFridayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateCompanyAnsweringRuleRequestScheduleWeeklyRangesSaturdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateCompanyAnsweringRuleRequestScheduleWeeklyRangesSundayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateCompanyAnsweringRuleRequestScheduleWeeklyRanges(DataClassJsonMixin): """ Weekly schedule. If specified, ranges cannot be specified """ monday: Optional[List[CreateCompanyAnsweringRuleRequestScheduleWeeklyRangesMondayItem]] = None """ Time interval for a particular day """ tuesday: Optional[List[CreateCompanyAnsweringRuleRequestScheduleWeeklyRangesTuesdayItem]] = None """ Time interval for a particular day """ wednesday: Optional[List[CreateCompanyAnsweringRuleRequestScheduleWeeklyRangesWednesdayItem]] = None """ Time interval for a particular day """ thursday: Optional[List[CreateCompanyAnsweringRuleRequestScheduleWeeklyRangesThursdayItem]] = None """ Time interval for a particular day """ friday: Optional[List[CreateCompanyAnsweringRuleRequestScheduleWeeklyRangesFridayItem]] = None """ Time interval for a particular day """ saturday: Optional[List[CreateCompanyAnsweringRuleRequestScheduleWeeklyRangesSaturdayItem]] = None """ Time interval for a particular day """ sunday: Optional[List[CreateCompanyAnsweringRuleRequestScheduleWeeklyRangesSundayItem]] = None """ Time interval for a particular day """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateCompanyAnsweringRuleRequestScheduleRangesItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Starting datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), for example *2018-10-29T14:00:00*, *2018-10-29T14:00:00Z*, *2018-10-29T14:00:00+0100* """ to: Optional[str] = None """ Ending datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), for example *2018-10-29T14:00:00*, *2018-10-29T14:00:00Z*, *2018-10-29T14:00:00+0100* """ class CreateCompanyAnsweringRuleRequestScheduleRef(Enum): """ Reference to Business Hours or After Hours schedule """ BusinessHours = 'BusinessHours' AfterHours = 'AfterHours' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateCompanyAnsweringRuleRequestSchedule(DataClassJsonMixin): """ Schedule when an answering rule should be applied """ weekly_ranges: Optional[CreateCompanyAnsweringRuleRequestScheduleWeeklyRanges] = None """ Weekly schedule. If specified, ranges cannot be specified """ ranges: Optional[List[CreateCompanyAnsweringRuleRequestScheduleRangesItem]] = None """ Specific data ranges. If specified, weeklyRanges cannot be specified """ ref: Optional[CreateCompanyAnsweringRuleRequestScheduleRef] = None """ Reference to Business Hours or After Hours schedule """ class CreateCompanyAnsweringRuleRequestCallHandlingAction(Enum): """ Specifies how incoming calls are forwarded. The default value is 'Operator' 'Operator' - play company greeting and forward to operator extension 'Disconnect' - play company greeting and disconnect 'Bypass' - bypass greeting to go to selected extension = ['Operator', 'Disconnect', 'Bypass'] Generated by Python OpenAPI Parser """ Operator = 'Operator' Disconnect = 'Disconnect' Bypass = 'Bypass' class CreateCompanyAnsweringRuleRequestGreetingsItemType(Enum): """ Type of a greeting, specifying the case when the greeting is played. """ Introductory = 'Introductory' Announcement = 'Announcement' ConnectingMessage = 'ConnectingMessage' ConnectingAudio = 'ConnectingAudio' Voicemail = 'Voicemail' Unavailable = 'Unavailable' InterruptPrompt = 'InterruptPrompt' HoldMusic = 'HoldMusic' Custom = 'Custom' Company = 'Company' BlockedCallersSpecific = 'BlockedCallersSpecific' BlockedCallersAll = 'BlockedCallersAll' BlockedNoCallerId = 'BlockedNoCallerId' BlockedPayPhones = 'BlockedPayPhones' StartRecording = 'StartRecording' StopRecording = 'StopRecording' AutomaticRecording = 'AutomaticRecording' class CreateCompanyAnsweringRuleRequestGreetingsItemUsageType(Enum): """ Usage type of a greeting, specifying if the greeting is applied to user extension or department extension. Generated by Python OpenAPI Parser """ UserExtensionAnsweringRule = 'UserExtensionAnsweringRule' ExtensionAnsweringRule = 'ExtensionAnsweringRule' DepartmentExtensionAnsweringRule = 'DepartmentExtensionAnsweringRule' CompanyAnsweringRule = 'CompanyAnsweringRule' CompanyAfterHoursAnsweringRule = 'CompanyAfterHoursAnsweringRule' VoicemailExtensionAnsweringRule = 'VoicemailExtensionAnsweringRule' AnnouncementExtensionAnsweringRule = 'AnnouncementExtensionAnsweringRule' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateCompanyAnsweringRuleRequestGreetingsItemPreset(DataClassJsonMixin): uri: Optional[str] = None """ Link to a greeting resource """ id: Optional[str] = None """ Internal identifier of a greeting """ name: Optional[str] = None """ Name of a greeting """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateCompanyAnsweringRuleRequestGreetingsItemCustom(DataClassJsonMixin): uri: Optional[str] = None """ Link to a custom user greeting """ id: Optional[str] = None """ Internal identifier of a custom user greeting """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateCompanyAnsweringRuleRequestGreetingsItem(DataClassJsonMixin): type: Optional[CreateCompanyAnsweringRuleRequestGreetingsItemType] = None """ Type of a greeting, specifying the case when the greeting is played. """ usage_type: Optional[CreateCompanyAnsweringRuleRequestGreetingsItemUsageType] = None """ Usage type of a greeting, specifying if the greeting is applied to user extension or department extension. """ preset: Optional[CreateCompanyAnsweringRuleRequestGreetingsItemPreset] = None custom: Optional[CreateCompanyAnsweringRuleRequestGreetingsItemCustom] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateCompanyAnsweringRuleRequest(DataClassJsonMixin): name: Optional[str] = None """ Name of an answering rule specified by user. Max number of symbols is 30. The default value is 'My Rule N' where 'N' is the first free number """ enabled: Optional[bool] = True """ Specifies if the rule is active or inactive. The default value is 'True' """ type: Optional[CreateCompanyAnsweringRuleRequestType] = None """ Type of an answering rule, the default value is 'Custom' = ['BusinessHours', 'AfterHours', 'Custom'] """ callers: Optional[List[CreateCompanyAnsweringRuleRequestCallersItem]] = None """ Answering rule will be applied when calls are received from the specified caller(s) """ called_numbers: Optional[List[CreateCompanyAnsweringRuleRequestCalledNumbersItem]] = None """ Answering rule will be applied when calling the specified number(s) """ schedule: Optional[CreateCompanyAnsweringRuleRequestSchedule] = None """ Schedule when an answering rule should be applied """ call_handling_action: Optional[CreateCompanyAnsweringRuleRequestCallHandlingAction] = None """ Specifies how incoming calls are forwarded. The default value is 'Operator' 'Operator' - play company greeting and forward to operator extension 'Disconnect' - play company greeting and disconnect 'Bypass' - bypass greeting to go to selected extension = ['Operator', 'Disconnect', 'Bypass'] """ extension: Optional[str] = None """ Extension to which the call is forwarded in 'Bypass' mode """ greetings: Optional[List[CreateCompanyAnsweringRuleRequestGreetingsItem]] = None """ Greetings applied for an answering rule; only predefined greetings can be applied, see Dictionary Greeting List """ class CreateCompanyAnsweringRuleResponseType(Enum): """ Type of an answering rule """ BusinessHours = 'BusinessHours' AfterHours = 'AfterHours' Custom = 'Custom' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateCompanyAnsweringRuleResponseCallersItem(DataClassJsonMixin): caller_id: Optional[str] = None """ Phone number of a caller """ name: Optional[str] = None """ Displayed name for a caller ID """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateCompanyAnsweringRuleResponseCalledNumbersItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an account phone number """ phone_number: Optional[str] = None """ Phone number of a callee """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateCompanyAnsweringRuleResponseScheduleWeeklyRangesMondayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateCompanyAnsweringRuleResponseScheduleWeeklyRangesTuesdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateCompanyAnsweringRuleResponseScheduleWeeklyRangesWednesdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateCompanyAnsweringRuleResponseScheduleWeeklyRangesThursdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateCompanyAnsweringRuleResponseScheduleWeeklyRangesFridayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateCompanyAnsweringRuleResponseScheduleWeeklyRangesSaturdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateCompanyAnsweringRuleResponseScheduleWeeklyRangesSundayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateCompanyAnsweringRuleResponseScheduleWeeklyRanges(DataClassJsonMixin): """ Weekly schedule. If specified, ranges cannot be specified """ monday: Optional[List[CreateCompanyAnsweringRuleResponseScheduleWeeklyRangesMondayItem]] = None """ Time interval for a particular day """ tuesday: Optional[List[CreateCompanyAnsweringRuleResponseScheduleWeeklyRangesTuesdayItem]] = None """ Time interval for a particular day """ wednesday: Optional[List[CreateCompanyAnsweringRuleResponseScheduleWeeklyRangesWednesdayItem]] = None """ Time interval for a particular day """ thursday: Optional[List[CreateCompanyAnsweringRuleResponseScheduleWeeklyRangesThursdayItem]] = None """ Time interval for a particular day """ friday: Optional[List[CreateCompanyAnsweringRuleResponseScheduleWeeklyRangesFridayItem]] = None """ Time interval for a particular day """ saturday: Optional[List[CreateCompanyAnsweringRuleResponseScheduleWeeklyRangesSaturdayItem]] = None """ Time interval for a particular day """ sunday: Optional[List[CreateCompanyAnsweringRuleResponseScheduleWeeklyRangesSundayItem]] = None """ Time interval for a particular day """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateCompanyAnsweringRuleResponseScheduleRangesItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Starting datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), for example *2018-10-29T14:00:00*, *2018-10-29T14:00:00Z*, *2018-10-29T14:00:00+0100* """ to: Optional[str] = None """ Ending datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), for example *2018-10-29T14:00:00*, *2018-10-29T14:00:00Z*, *2018-10-29T14:00:00+0100* """ class CreateCompanyAnsweringRuleResponseScheduleRef(Enum): """ Reference to Business Hours or After Hours schedule = ['BusinessHours', 'AfterHours'] """ BusinessHours = 'BusinessHours' AfterHours = 'AfterHours' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateCompanyAnsweringRuleResponseSchedule(DataClassJsonMixin): """ Schedule when an answering rule should be applied """ weekly_ranges: Optional[CreateCompanyAnsweringRuleResponseScheduleWeeklyRanges] = None """ Weekly schedule. If specified, ranges cannot be specified """ ranges: Optional[List[CreateCompanyAnsweringRuleResponseScheduleRangesItem]] = None """ Specific data ranges. If specified, weeklyRanges cannot be specified """ ref: Optional[CreateCompanyAnsweringRuleResponseScheduleRef] = None """ Reference to Business Hours or After Hours schedule = ['BusinessHours', 'AfterHours'] """ class CreateCompanyAnsweringRuleResponseCallHandlingAction(Enum): """ Specifies how incoming calls are forwarded. The default value is 'Operator' 'Operator' - play company greeting and forward to operator extension 'Disconnect' - play company greeting and disconnect 'Bypass' - bypass greeting to go to selected extension = ['Operator', 'Disconnect', 'Bypass'] Generated by Python OpenAPI Parser """ Operator = 'Operator' Disconnect = 'Disconnect' Bypass = 'Bypass' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateCompanyAnsweringRuleResponseExtension(DataClassJsonMixin): """ Extension to which the call is forwarded in 'Bypass' mode """ id: Optional[str] = None """ Internal identifier of an extension """ class CreateCompanyAnsweringRuleResponseGreetingsItemType(Enum): """ Type of a greeting, specifying the case when the greeting is played. """ Introductory = 'Introductory' Announcement = 'Announcement' ConnectingMessage = 'ConnectingMessage' ConnectingAudio = 'ConnectingAudio' Voicemail = 'Voicemail' Unavailable = 'Unavailable' InterruptPrompt = 'InterruptPrompt' HoldMusic = 'HoldMusic' Custom = 'Custom' Company = 'Company' BlockedCallersSpecific = 'BlockedCallersSpecific' BlockedCallersAll = 'BlockedCallersAll' BlockedNoCallerId = 'BlockedNoCallerId' BlockedPayPhones = 'BlockedPayPhones' StartRecording = 'StartRecording' StopRecording = 'StopRecording' AutomaticRecording = 'AutomaticRecording' class CreateCompanyAnsweringRuleResponseGreetingsItemUsageType(Enum): """ Usage type of a greeting, specifying if the greeting is applied to user extension or department extension. Generated by Python OpenAPI Parser """ UserExtensionAnsweringRule = 'UserExtensionAnsweringRule' ExtensionAnsweringRule = 'ExtensionAnsweringRule' DepartmentExtensionAnsweringRule = 'DepartmentExtensionAnsweringRule' CompanyAnsweringRule = 'CompanyAnsweringRule' CompanyAfterHoursAnsweringRule = 'CompanyAfterHoursAnsweringRule' VoicemailExtensionAnsweringRule = 'VoicemailExtensionAnsweringRule' AnnouncementExtensionAnsweringRule = 'AnnouncementExtensionAnsweringRule' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateCompanyAnsweringRuleResponseGreetingsItemPreset(DataClassJsonMixin): uri: Optional[str] = None """ Link to a greeting resource """ id: Optional[str] = None """ Internal identifier of a greeting """ name: Optional[str] = None """ Name of a greeting """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateCompanyAnsweringRuleResponseGreetingsItemCustom(DataClassJsonMixin): uri: Optional[str] = None """ Link to a custom user greeting """ id: Optional[str] = None """ Internal identifier of a custom user greeting """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateCompanyAnsweringRuleResponseGreetingsItem(DataClassJsonMixin): type: Optional[CreateCompanyAnsweringRuleResponseGreetingsItemType] = None """ Type of a greeting, specifying the case when the greeting is played. """ usage_type: Optional[CreateCompanyAnsweringRuleResponseGreetingsItemUsageType] = None """ Usage type of a greeting, specifying if the greeting is applied to user extension or department extension. """ preset: Optional[CreateCompanyAnsweringRuleResponseGreetingsItemPreset] = None custom: Optional[CreateCompanyAnsweringRuleResponseGreetingsItemCustom] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateCompanyAnsweringRuleResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an answering rule """ uri: Optional[str] = None """ Canonical URI of an answering rule """ enabled: Optional[bool] = True """ Specifies if the rule is active or inactive """ type: Optional[CreateCompanyAnsweringRuleResponseType] = 'Custom' """ Type of an answering rule """ name: Optional[str] = None """ Name of an answering rule specified by user. Max number of symbols is 30. The default value is 'My Rule N' where 'N' is the first free number """ callers: Optional[List[CreateCompanyAnsweringRuleResponseCallersItem]] = None """ Answering rule will be applied when calls are received from the specified caller(s) """ called_numbers: Optional[List[CreateCompanyAnsweringRuleResponseCalledNumbersItem]] = None """ Answering rule will be applied when calling the specified number(s) """ schedule: Optional[CreateCompanyAnsweringRuleResponseSchedule] = None """ Schedule when an answering rule should be applied """ call_handling_action: Optional[CreateCompanyAnsweringRuleResponseCallHandlingAction] = None """ Specifies how incoming calls are forwarded. The default value is 'Operator' 'Operator' - play company greeting and forward to operator extension 'Disconnect' - play company greeting and disconnect 'Bypass' - bypass greeting to go to selected extension = ['Operator', 'Disconnect', 'Bypass'] """ extension: Optional[CreateCompanyAnsweringRuleResponseExtension] = None """ Extension to which the call is forwarded in 'Bypass' mode """ greetings: Optional[List[CreateCompanyAnsweringRuleResponseGreetingsItem]] = None """ Greetings applied for an answering rule; only predefined greetings can be applied, see Dictionary Greeting List """ class ReadCompanyAnsweringRuleResponseType(Enum): """ Type of an answering rule """ BusinessHours = 'BusinessHours' AfterHours = 'AfterHours' Custom = 'Custom' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadCompanyAnsweringRuleResponseCallersItem(DataClassJsonMixin): caller_id: Optional[str] = None """ Phone number of a caller """ name: Optional[str] = None """ Displayed name for a caller ID """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadCompanyAnsweringRuleResponseCalledNumbersItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an account phone number """ phone_number: Optional[str] = None """ Phone number of a callee """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadCompanyAnsweringRuleResponseScheduleWeeklyRangesMondayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadCompanyAnsweringRuleResponseScheduleWeeklyRangesTuesdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadCompanyAnsweringRuleResponseScheduleWeeklyRangesWednesdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadCompanyAnsweringRuleResponseScheduleWeeklyRangesThursdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadCompanyAnsweringRuleResponseScheduleWeeklyRangesFridayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadCompanyAnsweringRuleResponseScheduleWeeklyRangesSaturdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadCompanyAnsweringRuleResponseScheduleWeeklyRangesSundayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadCompanyAnsweringRuleResponseScheduleWeeklyRanges(DataClassJsonMixin): """ Weekly schedule. If specified, ranges cannot be specified """ monday: Optional[List[ReadCompanyAnsweringRuleResponseScheduleWeeklyRangesMondayItem]] = None """ Time interval for a particular day """ tuesday: Optional[List[ReadCompanyAnsweringRuleResponseScheduleWeeklyRangesTuesdayItem]] = None """ Time interval for a particular day """ wednesday: Optional[List[ReadCompanyAnsweringRuleResponseScheduleWeeklyRangesWednesdayItem]] = None """ Time interval for a particular day """ thursday: Optional[List[ReadCompanyAnsweringRuleResponseScheduleWeeklyRangesThursdayItem]] = None """ Time interval for a particular day """ friday: Optional[List[ReadCompanyAnsweringRuleResponseScheduleWeeklyRangesFridayItem]] = None """ Time interval for a particular day """ saturday: Optional[List[ReadCompanyAnsweringRuleResponseScheduleWeeklyRangesSaturdayItem]] = None """ Time interval for a particular day """ sunday: Optional[List[ReadCompanyAnsweringRuleResponseScheduleWeeklyRangesSundayItem]] = None """ Time interval for a particular day """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadCompanyAnsweringRuleResponseScheduleRangesItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Starting datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), for example *2018-10-29T14:00:00*, *2018-10-29T14:00:00Z*, *2018-10-29T14:00:00+0100* """ to: Optional[str] = None """ Ending datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), for example *2018-10-29T14:00:00*, *2018-10-29T14:00:00Z*, *2018-10-29T14:00:00+0100* """ class ReadCompanyAnsweringRuleResponseScheduleRef(Enum): """ Reference to Business Hours or After Hours schedule = ['BusinessHours', 'AfterHours'] """ BusinessHours = 'BusinessHours' AfterHours = 'AfterHours' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadCompanyAnsweringRuleResponseSchedule(DataClassJsonMixin): """ Schedule when an answering rule should be applied """ weekly_ranges: Optional[ReadCompanyAnsweringRuleResponseScheduleWeeklyRanges] = None """ Weekly schedule. If specified, ranges cannot be specified """ ranges: Optional[List[ReadCompanyAnsweringRuleResponseScheduleRangesItem]] = None """ Specific data ranges. If specified, weeklyRanges cannot be specified """ ref: Optional[ReadCompanyAnsweringRuleResponseScheduleRef] = None """ Reference to Business Hours or After Hours schedule = ['BusinessHours', 'AfterHours'] """ class ReadCompanyAnsweringRuleResponseCallHandlingAction(Enum): """ Specifies how incoming calls are forwarded. The default value is 'Operator' 'Operator' - play company greeting and forward to operator extension 'Disconnect' - play company greeting and disconnect 'Bypass' - bypass greeting to go to selected extension = ['Operator', 'Disconnect', 'Bypass'] Generated by Python OpenAPI Parser """ Operator = 'Operator' Disconnect = 'Disconnect' Bypass = 'Bypass' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadCompanyAnsweringRuleResponseExtension(DataClassJsonMixin): """ Extension to which the call is forwarded in 'Bypass' mode """ id: Optional[str] = None """ Internal identifier of an extension """ class ReadCompanyAnsweringRuleResponseGreetingsItemType(Enum): """ Type of a greeting, specifying the case when the greeting is played. """ Introductory = 'Introductory' Announcement = 'Announcement' ConnectingMessage = 'ConnectingMessage' ConnectingAudio = 'ConnectingAudio' Voicemail = 'Voicemail' Unavailable = 'Unavailable' InterruptPrompt = 'InterruptPrompt' HoldMusic = 'HoldMusic' Custom = 'Custom' Company = 'Company' BlockedCallersSpecific = 'BlockedCallersSpecific' BlockedCallersAll = 'BlockedCallersAll' BlockedNoCallerId = 'BlockedNoCallerId' BlockedPayPhones = 'BlockedPayPhones' StartRecording = 'StartRecording' StopRecording = 'StopRecording' AutomaticRecording = 'AutomaticRecording' class ReadCompanyAnsweringRuleResponseGreetingsItemUsageType(Enum): """ Usage type of a greeting, specifying if the greeting is applied to user extension or department extension. Generated by Python OpenAPI Parser """ UserExtensionAnsweringRule = 'UserExtensionAnsweringRule' ExtensionAnsweringRule = 'ExtensionAnsweringRule' DepartmentExtensionAnsweringRule = 'DepartmentExtensionAnsweringRule' CompanyAnsweringRule = 'CompanyAnsweringRule' CompanyAfterHoursAnsweringRule = 'CompanyAfterHoursAnsweringRule' VoicemailExtensionAnsweringRule = 'VoicemailExtensionAnsweringRule' AnnouncementExtensionAnsweringRule = 'AnnouncementExtensionAnsweringRule' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadCompanyAnsweringRuleResponseGreetingsItemPreset(DataClassJsonMixin): uri: Optional[str] = None """ Link to a greeting resource """ id: Optional[str] = None """ Internal identifier of a greeting """ name: Optional[str] = None """ Name of a greeting """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadCompanyAnsweringRuleResponseGreetingsItemCustom(DataClassJsonMixin): uri: Optional[str] = None """ Link to a custom user greeting """ id: Optional[str] = None """ Internal identifier of a custom user greeting """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadCompanyAnsweringRuleResponseGreetingsItem(DataClassJsonMixin): type: Optional[ReadCompanyAnsweringRuleResponseGreetingsItemType] = None """ Type of a greeting, specifying the case when the greeting is played. """ usage_type: Optional[ReadCompanyAnsweringRuleResponseGreetingsItemUsageType] = None """ Usage type of a greeting, specifying if the greeting is applied to user extension or department extension. """ preset: Optional[ReadCompanyAnsweringRuleResponseGreetingsItemPreset] = None custom: Optional[ReadCompanyAnsweringRuleResponseGreetingsItemCustom] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadCompanyAnsweringRuleResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an answering rule """ uri: Optional[str] = None """ Canonical URI of an answering rule """ enabled: Optional[bool] = True """ Specifies if the rule is active or inactive """ type: Optional[ReadCompanyAnsweringRuleResponseType] = 'Custom' """ Type of an answering rule """ name: Optional[str] = None """ Name of an answering rule specified by user. Max number of symbols is 30. The default value is 'My Rule N' where 'N' is the first free number """ callers: Optional[List[ReadCompanyAnsweringRuleResponseCallersItem]] = None """ Answering rule will be applied when calls are received from the specified caller(s) """ called_numbers: Optional[List[ReadCompanyAnsweringRuleResponseCalledNumbersItem]] = None """ Answering rule will be applied when calling the specified number(s) """ schedule: Optional[ReadCompanyAnsweringRuleResponseSchedule] = None """ Schedule when an answering rule should be applied """ call_handling_action: Optional[ReadCompanyAnsweringRuleResponseCallHandlingAction] = None """ Specifies how incoming calls are forwarded. The default value is 'Operator' 'Operator' - play company greeting and forward to operator extension 'Disconnect' - play company greeting and disconnect 'Bypass' - bypass greeting to go to selected extension = ['Operator', 'Disconnect', 'Bypass'] """ extension: Optional[ReadCompanyAnsweringRuleResponseExtension] = None """ Extension to which the call is forwarded in 'Bypass' mode """ greetings: Optional[List[ReadCompanyAnsweringRuleResponseGreetingsItem]] = None """ Greetings applied for an answering rule; only predefined greetings can be applied, see Dictionary Greeting List """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyAnsweringRuleRequestCallersItem(DataClassJsonMixin): caller_id: Optional[str] = None """ Phone number of a caller """ name: Optional[str] = None """ Displayed name for a caller ID """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyAnsweringRuleRequestCalledNumbersItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an account phone number """ phone_number: Optional[str] = None """ Phone number of a callee """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyAnsweringRuleRequestScheduleWeeklyRangesMondayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyAnsweringRuleRequestScheduleWeeklyRangesTuesdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyAnsweringRuleRequestScheduleWeeklyRangesWednesdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyAnsweringRuleRequestScheduleWeeklyRangesThursdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyAnsweringRuleRequestScheduleWeeklyRangesFridayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyAnsweringRuleRequestScheduleWeeklyRangesSaturdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyAnsweringRuleRequestScheduleWeeklyRangesSundayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyAnsweringRuleRequestScheduleWeeklyRanges(DataClassJsonMixin): """ Weekly schedule. If specified, ranges cannot be specified """ monday: Optional[List[UpdateCompanyAnsweringRuleRequestScheduleWeeklyRangesMondayItem]] = None """ Time interval for a particular day """ tuesday: Optional[List[UpdateCompanyAnsweringRuleRequestScheduleWeeklyRangesTuesdayItem]] = None """ Time interval for a particular day """ wednesday: Optional[List[UpdateCompanyAnsweringRuleRequestScheduleWeeklyRangesWednesdayItem]] = None """ Time interval for a particular day """ thursday: Optional[List[UpdateCompanyAnsweringRuleRequestScheduleWeeklyRangesThursdayItem]] = None """ Time interval for a particular day """ friday: Optional[List[UpdateCompanyAnsweringRuleRequestScheduleWeeklyRangesFridayItem]] = None """ Time interval for a particular day """ saturday: Optional[List[UpdateCompanyAnsweringRuleRequestScheduleWeeklyRangesSaturdayItem]] = None """ Time interval for a particular day """ sunday: Optional[List[UpdateCompanyAnsweringRuleRequestScheduleWeeklyRangesSundayItem]] = None """ Time interval for a particular day """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyAnsweringRuleRequestScheduleRangesItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Starting datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), for example *2018-10-29T14:00:00*, *2018-10-29T14:00:00Z*, *2018-10-29T14:00:00+0100* """ to: Optional[str] = None """ Ending datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), for example *2018-10-29T14:00:00*, *2018-10-29T14:00:00Z*, *2018-10-29T14:00:00+0100* """ class UpdateCompanyAnsweringRuleRequestScheduleRef(Enum): """ Reference to Business Hours or After Hours schedule """ BusinessHours = 'BusinessHours' AfterHours = 'AfterHours' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyAnsweringRuleRequestSchedule(DataClassJsonMixin): """ Schedule when an answering rule should be applied """ weekly_ranges: Optional[UpdateCompanyAnsweringRuleRequestScheduleWeeklyRanges] = None """ Weekly schedule. If specified, ranges cannot be specified """ ranges: Optional[List[UpdateCompanyAnsweringRuleRequestScheduleRangesItem]] = None """ Specific data ranges. If specified, weeklyRanges cannot be specified """ ref: Optional[UpdateCompanyAnsweringRuleRequestScheduleRef] = None """ Reference to Business Hours or After Hours schedule """ class UpdateCompanyAnsweringRuleRequestCallHandlingAction(Enum): """ Specifies how incoming calls are forwarded. The default value is 'Operator' 'Operator' - play company greeting and forward to operator extension 'Disconnect' - play company greeting and disconnect 'Bypass' - bypass greeting to go to selected extension = ['Operator', 'Disconnect', 'Bypass'] Generated by Python OpenAPI Parser """ Operator = 'Operator' Disconnect = 'Disconnect' Bypass = 'Bypass' class UpdateCompanyAnsweringRuleRequestType(Enum): """ Type of an answering rule """ BusinessHours = 'BusinessHours' AfterHours = 'AfterHours' Custom = 'Custom' class UpdateCompanyAnsweringRuleRequestGreetingsItemType(Enum): """ Type of a greeting, specifying the case when the greeting is played. """ Introductory = 'Introductory' Announcement = 'Announcement' ConnectingMessage = 'ConnectingMessage' ConnectingAudio = 'ConnectingAudio' Voicemail = 'Voicemail' Unavailable = 'Unavailable' InterruptPrompt = 'InterruptPrompt' HoldMusic = 'HoldMusic' Custom = 'Custom' Company = 'Company' BlockedCallersSpecific = 'BlockedCallersSpecific' BlockedCallersAll = 'BlockedCallersAll' BlockedNoCallerId = 'BlockedNoCallerId' BlockedPayPhones = 'BlockedPayPhones' StartRecording = 'StartRecording' StopRecording = 'StopRecording' AutomaticRecording = 'AutomaticRecording' class UpdateCompanyAnsweringRuleRequestGreetingsItemUsageType(Enum): """ Usage type of a greeting, specifying if the greeting is applied to user extension or department extension. Generated by Python OpenAPI Parser """ UserExtensionAnsweringRule = 'UserExtensionAnsweringRule' ExtensionAnsweringRule = 'ExtensionAnsweringRule' DepartmentExtensionAnsweringRule = 'DepartmentExtensionAnsweringRule' CompanyAnsweringRule = 'CompanyAnsweringRule' CompanyAfterHoursAnsweringRule = 'CompanyAfterHoursAnsweringRule' VoicemailExtensionAnsweringRule = 'VoicemailExtensionAnsweringRule' AnnouncementExtensionAnsweringRule = 'AnnouncementExtensionAnsweringRule' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyAnsweringRuleRequestGreetingsItemPreset(DataClassJsonMixin): uri: Optional[str] = None """ Link to a greeting resource """ id: Optional[str] = None """ Internal identifier of a greeting """ name: Optional[str] = None """ Name of a greeting """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyAnsweringRuleRequestGreetingsItemCustom(DataClassJsonMixin): uri: Optional[str] = None """ Link to a custom user greeting """ id: Optional[str] = None """ Internal identifier of a custom user greeting """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyAnsweringRuleRequestGreetingsItem(DataClassJsonMixin): type: Optional[UpdateCompanyAnsweringRuleRequestGreetingsItemType] = None """ Type of a greeting, specifying the case when the greeting is played. """ usage_type: Optional[UpdateCompanyAnsweringRuleRequestGreetingsItemUsageType] = None """ Usage type of a greeting, specifying if the greeting is applied to user extension or department extension. """ preset: Optional[UpdateCompanyAnsweringRuleRequestGreetingsItemPreset] = None custom: Optional[UpdateCompanyAnsweringRuleRequestGreetingsItemCustom] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyAnsweringRuleRequest(DataClassJsonMixin): enabled: Optional[bool] = True """ Specifies if the rule is active or inactive. The default value is 'True' """ name: Optional[str] = None """ Name of an answering rule specified by user. Max number of symbols is 30. The default value is 'My Rule N' where 'N' is the first free number """ callers: Optional[List[UpdateCompanyAnsweringRuleRequestCallersItem]] = None """ Answering rule will be applied when calls are received from the specified caller(s) """ called_numbers: Optional[List[UpdateCompanyAnsweringRuleRequestCalledNumbersItem]] = None """ Answering rule will be applied when calling the specified number(s) """ schedule: Optional[UpdateCompanyAnsweringRuleRequestSchedule] = None """ Schedule when an answering rule should be applied """ call_handling_action: Optional[UpdateCompanyAnsweringRuleRequestCallHandlingAction] = None """ Specifies how incoming calls are forwarded. The default value is 'Operator' 'Operator' - play company greeting and forward to operator extension 'Disconnect' - play company greeting and disconnect 'Bypass' - bypass greeting to go to selected extension = ['Operator', 'Disconnect', 'Bypass'] """ type: Optional[UpdateCompanyAnsweringRuleRequestType] = 'Custom' """ Type of an answering rule """ extension: Optional[str] = None """ Internal identifier of the extension the call is forwarded to. Supported for 'Bypass' mode only (that should be specified in `callHandlingAction` field) """ greetings: Optional[List[UpdateCompanyAnsweringRuleRequestGreetingsItem]] = None """ Greetings applied for an answering rule; only predefined greetings can be applied, see Dictionary Greeting List """ class UpdateCompanyAnsweringRuleResponseType(Enum): """ Type of an answering rule """ BusinessHours = 'BusinessHours' AfterHours = 'AfterHours' Custom = 'Custom' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyAnsweringRuleResponseCallersItem(DataClassJsonMixin): caller_id: Optional[str] = None """ Phone number of a caller """ name: Optional[str] = None """ Displayed name for a caller ID """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyAnsweringRuleResponseCalledNumbersItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an account phone number """ phone_number: Optional[str] = None """ Phone number of a callee """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyAnsweringRuleResponseScheduleWeeklyRangesMondayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyAnsweringRuleResponseScheduleWeeklyRangesTuesdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyAnsweringRuleResponseScheduleWeeklyRangesWednesdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyAnsweringRuleResponseScheduleWeeklyRangesThursdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyAnsweringRuleResponseScheduleWeeklyRangesFridayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyAnsweringRuleResponseScheduleWeeklyRangesSaturdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyAnsweringRuleResponseScheduleWeeklyRangesSundayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyAnsweringRuleResponseScheduleWeeklyRanges(DataClassJsonMixin): """ Weekly schedule. If specified, ranges cannot be specified """ monday: Optional[List[UpdateCompanyAnsweringRuleResponseScheduleWeeklyRangesMondayItem]] = None """ Time interval for a particular day """ tuesday: Optional[List[UpdateCompanyAnsweringRuleResponseScheduleWeeklyRangesTuesdayItem]] = None """ Time interval for a particular day """ wednesday: Optional[List[UpdateCompanyAnsweringRuleResponseScheduleWeeklyRangesWednesdayItem]] = None """ Time interval for a particular day """ thursday: Optional[List[UpdateCompanyAnsweringRuleResponseScheduleWeeklyRangesThursdayItem]] = None """ Time interval for a particular day """ friday: Optional[List[UpdateCompanyAnsweringRuleResponseScheduleWeeklyRangesFridayItem]] = None """ Time interval for a particular day """ saturday: Optional[List[UpdateCompanyAnsweringRuleResponseScheduleWeeklyRangesSaturdayItem]] = None """ Time interval for a particular day """ sunday: Optional[List[UpdateCompanyAnsweringRuleResponseScheduleWeeklyRangesSundayItem]] = None """ Time interval for a particular day """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyAnsweringRuleResponseScheduleRangesItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Starting datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), for example *2018-10-29T14:00:00*, *2018-10-29T14:00:00Z*, *2018-10-29T14:00:00+0100* """ to: Optional[str] = None """ Ending datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), for example *2018-10-29T14:00:00*, *2018-10-29T14:00:00Z*, *2018-10-29T14:00:00+0100* """ class UpdateCompanyAnsweringRuleResponseScheduleRef(Enum): """ Reference to Business Hours or After Hours schedule = ['BusinessHours', 'AfterHours'] """ BusinessHours = 'BusinessHours' AfterHours = 'AfterHours' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyAnsweringRuleResponseSchedule(DataClassJsonMixin): """ Schedule when an answering rule should be applied """ weekly_ranges: Optional[UpdateCompanyAnsweringRuleResponseScheduleWeeklyRanges] = None """ Weekly schedule. If specified, ranges cannot be specified """ ranges: Optional[List[UpdateCompanyAnsweringRuleResponseScheduleRangesItem]] = None """ Specific data ranges. If specified, weeklyRanges cannot be specified """ ref: Optional[UpdateCompanyAnsweringRuleResponseScheduleRef] = None """ Reference to Business Hours or After Hours schedule = ['BusinessHours', 'AfterHours'] """ class UpdateCompanyAnsweringRuleResponseCallHandlingAction(Enum): """ Specifies how incoming calls are forwarded. The default value is 'Operator' 'Operator' - play company greeting and forward to operator extension 'Disconnect' - play company greeting and disconnect 'Bypass' - bypass greeting to go to selected extension = ['Operator', 'Disconnect', 'Bypass'] Generated by Python OpenAPI Parser """ Operator = 'Operator' Disconnect = 'Disconnect' Bypass = 'Bypass' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyAnsweringRuleResponseExtension(DataClassJsonMixin): """ Extension to which the call is forwarded in 'Bypass' mode """ id: Optional[str] = None """ Internal identifier of an extension """ class UpdateCompanyAnsweringRuleResponseGreetingsItemType(Enum): """ Type of a greeting, specifying the case when the greeting is played. """ Introductory = 'Introductory' Announcement = 'Announcement' ConnectingMessage = 'ConnectingMessage' ConnectingAudio = 'ConnectingAudio' Voicemail = 'Voicemail' Unavailable = 'Unavailable' InterruptPrompt = 'InterruptPrompt' HoldMusic = 'HoldMusic' Custom = 'Custom' Company = 'Company' BlockedCallersSpecific = 'BlockedCallersSpecific' BlockedCallersAll = 'BlockedCallersAll' BlockedNoCallerId = 'BlockedNoCallerId' BlockedPayPhones = 'BlockedPayPhones' StartRecording = 'StartRecording' StopRecording = 'StopRecording' AutomaticRecording = 'AutomaticRecording' class UpdateCompanyAnsweringRuleResponseGreetingsItemUsageType(Enum): """ Usage type of a greeting, specifying if the greeting is applied to user extension or department extension. Generated by Python OpenAPI Parser """ UserExtensionAnsweringRule = 'UserExtensionAnsweringRule' ExtensionAnsweringRule = 'ExtensionAnsweringRule' DepartmentExtensionAnsweringRule = 'DepartmentExtensionAnsweringRule' CompanyAnsweringRule = 'CompanyAnsweringRule' CompanyAfterHoursAnsweringRule = 'CompanyAfterHoursAnsweringRule' VoicemailExtensionAnsweringRule = 'VoicemailExtensionAnsweringRule' AnnouncementExtensionAnsweringRule = 'AnnouncementExtensionAnsweringRule' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyAnsweringRuleResponseGreetingsItemPreset(DataClassJsonMixin): uri: Optional[str] = None """ Link to a greeting resource """ id: Optional[str] = None """ Internal identifier of a greeting """ name: Optional[str] = None """ Name of a greeting """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyAnsweringRuleResponseGreetingsItemCustom(DataClassJsonMixin): uri: Optional[str] = None """ Link to a custom user greeting """ id: Optional[str] = None """ Internal identifier of a custom user greeting """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyAnsweringRuleResponseGreetingsItem(DataClassJsonMixin): type: Optional[UpdateCompanyAnsweringRuleResponseGreetingsItemType] = None """ Type of a greeting, specifying the case when the greeting is played. """ usage_type: Optional[UpdateCompanyAnsweringRuleResponseGreetingsItemUsageType] = None """ Usage type of a greeting, specifying if the greeting is applied to user extension or department extension. """ preset: Optional[UpdateCompanyAnsweringRuleResponseGreetingsItemPreset] = None custom: Optional[UpdateCompanyAnsweringRuleResponseGreetingsItemCustom] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyAnsweringRuleResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an answering rule """ uri: Optional[str] = None """ Canonical URI of an answering rule """ enabled: Optional[bool] = True """ Specifies if the rule is active or inactive """ type: Optional[UpdateCompanyAnsweringRuleResponseType] = 'Custom' """ Type of an answering rule """ name: Optional[str] = None """ Name of an answering rule specified by user. Max number of symbols is 30. The default value is 'My Rule N' where 'N' is the first free number """ callers: Optional[List[UpdateCompanyAnsweringRuleResponseCallersItem]] = None """ Answering rule will be applied when calls are received from the specified caller(s) """ called_numbers: Optional[List[UpdateCompanyAnsweringRuleResponseCalledNumbersItem]] = None """ Answering rule will be applied when calling the specified number(s) """ schedule: Optional[UpdateCompanyAnsweringRuleResponseSchedule] = None """ Schedule when an answering rule should be applied """ call_handling_action: Optional[UpdateCompanyAnsweringRuleResponseCallHandlingAction] = None """ Specifies how incoming calls are forwarded. The default value is 'Operator' 'Operator' - play company greeting and forward to operator extension 'Disconnect' - play company greeting and disconnect 'Bypass' - bypass greeting to go to selected extension = ['Operator', 'Disconnect', 'Bypass'] """ extension: Optional[UpdateCompanyAnsweringRuleResponseExtension] = None """ Extension to which the call is forwarded in 'Bypass' mode """ greetings: Optional[List[UpdateCompanyAnsweringRuleResponseGreetingsItem]] = None """ Greetings applied for an answering rule; only predefined greetings can be applied, see Dictionary Greeting List """ class ListStandardGreetingsType(Enum): Introductory = 'Introductory' Announcement = 'Announcement' ConnectingMessage = 'ConnectingMessage' ConnectingAudio = 'ConnectingAudio' Voicemail = 'Voicemail' Unavailable = 'Unavailable' HoldMusic = 'HoldMusic' Company = 'Company' class ListStandardGreetingsUsageType(Enum): UserExtensionAnsweringRule = 'UserExtensionAnsweringRule' ExtensionAnsweringRule = 'ExtensionAnsweringRule' DepartmentExtensionAnsweringRule = 'DepartmentExtensionAnsweringRule' CompanyAnsweringRule = 'CompanyAnsweringRule' CompanyAfterHoursAnsweringRule = 'CompanyAfterHoursAnsweringRule' VoicemailExtensionAnsweringRule = 'VoicemailExtensionAnsweringRule' AnnouncementExtensionAnsweringRule = 'AnnouncementExtensionAnsweringRule' SharedLinesGroupAnsweringRule = 'SharedLinesGroupAnsweringRule' class ListStandardGreetingsResponseRecordsItemUsageType(Enum): """ Usage type of a greeting, specifying if the greeting is applied for user extension or department extension. Generated by Python OpenAPI Parser """ UserExtensionAnsweringRule = 'UserExtensionAnsweringRule' ExtensionAnsweringRule = 'ExtensionAnsweringRule' DepartmentExtensionAnsweringRule = 'DepartmentExtensionAnsweringRule' BlockedCalls = 'BlockedCalls' CallRecording = 'CallRecording' CompanyAnsweringRule = 'CompanyAnsweringRule' CompanyAfterHoursAnsweringRule = 'CompanyAfterHoursAnsweringRule' LimitedExtensionAnsweringRule = 'LimitedExtensionAnsweringRule' VoicemailExtensionAnsweringRule = 'VoicemailExtensionAnsweringRule' AnnouncementExtensionAnsweringRule = 'AnnouncementExtensionAnsweringRule' SharedLinesGroupAnsweringRule = 'SharedLinesGroupAnsweringRule' class ListStandardGreetingsResponseRecordsItemType(Enum): """ Type of a greeting, specifying the case when the greeting is played. """ Introductory = 'Introductory' Announcement = 'Announcement' AutomaticRecording = 'AutomaticRecording' BlockedCallersAll = 'BlockedCallersAll' BlockedCallersSpecific = 'BlockedCallersSpecific' BlockedNoCallerId = 'BlockedNoCallerId' BlockedPayPhones = 'BlockedPayPhones' ConnectingMessage = 'ConnectingMessage' ConnectingAudio = 'ConnectingAudio' StartRecording = 'StartRecording' StopRecording = 'StopRecording' Voicemail = 'Voicemail' Unavailable = 'Unavailable' InterruptPrompt = 'InterruptPrompt' HoldMusic = 'HoldMusic' Company = 'Company' class ListStandardGreetingsResponseRecordsItemCategory(Enum): """ Category of a greeting, specifying data form. The category value 'None' specifies that greetings of a certain type ('Introductory', 'ConnectingAudio', etc.) are switched off for an extension = ['Music', 'Message', 'RingTones', 'None'] Generated by Python OpenAPI Parser """ Music = 'Music' Message = 'Message' RingTones = 'RingTones' None_ = 'None' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListStandardGreetingsResponseRecordsItemNavigationFirstPage(DataClassJsonMixin): """ Canonical URI for the first page of the list """ uri: Optional[str] = None
/ringcentral_async_client-1.0.3-py3-none-any.whl/ringcentral_async_client/_code_gen/model/_10.py
0.763836
0.180071
_10.py
pypi
from ..utils import datetime_decoder from ..utils import discriminator_decoder from dataclasses import dataclass from dataclasses import field from dataclasses_json.api import DataClassJsonMixin from dataclasses_json.api import LetterCase from dataclasses_json.api import dataclass_json from dataclasses_json.cfg import config from datetime import date from datetime import datetime from datetime import time from enum import Enum from typing import * @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetVersionsResponseApiVersionsItem(DataClassJsonMixin): uri: Optional[str] = None """ Canonical URI of API versions """ version_string: Optional[str] = None """ Version of the RingCentral REST API """ release_date: Optional[str] = None """ Release date of this version """ uri_string: Optional[str] = None """ URI part determining the current version """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetVersionsResponse(DataClassJsonMixin): """ Example: ```json { "application/json": { "uri": "https://platform.ringcentral.com/restapi", "apiVersions": [ { "uri": "https://platform.ringcentral.com/restapi/v1.0", "versionString": "1.0.34", "releaseDate": "2018-02-09T00:00:00.000Z", "uriString": "v1.0" } ], "serverVersion": "10.0.4.7854", "serverRevision": "32f2a96b769c" } } ``` Generated by Python OpenAPI Parser """ uri: Optional[str] = None """ Canonical URI of the API version """ api_versions: Optional[List[GetVersionsResponseApiVersionsItem]] = None """ Full API version information: uri, number, release date """ server_version: Optional[str] = None """ Server version """ server_revision: Optional[str] = None """ Server revision """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetVersionResponse(DataClassJsonMixin): """ Example: ```json { "application/json": { "uri": "https://platform.ringcentral.com/restapi/v1.0", "versionString": "1.0.34", "releaseDate": "2018-02-09T00:00:00.000Z", "uriString": "v1.0" } } ``` Generated by Python OpenAPI Parser """ uri: Optional[str] = None """ Canonical URI of the version info resource """ version_string: Optional[str] = None """ Version of the RingCentral REST API """ release_date: Optional[str] = None """ Release date of this version """ uri_string: Optional[str] = None """ URI part determining the current version """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UserCallLogResponseRecordsItemFromDevice(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a device """ uri: Optional[str] = None """ string to a device """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UserCallLogResponseRecordsItemFrom(DataClassJsonMixin): phone_number: Optional[str] = None """ Phone number of a party. Usually it is a plain number including country and area code like 18661234567. But sometimes it could be returned from database with some formatting applied, for example (866)123-4567. This property is filled in all cases where parties communicate by means of global phone numbers, for example when calling to direct numbers or sending/receiving SMS """ extension_number: Optional[str] = None """ Extension short number (usually 3 or 4 digits). This property is filled when parties communicate by means of short internal numbers, for example when calling to other extension or sending/receiving Company Pager message """ extension_id: Optional[str] = None """ Internal identifier of an extension """ location: Optional[str] = None """ Contains party location (city, state) if one can be determined from phoneNumber. This property is filled only when phoneNumber is not empty and server can calculate location information from it (for example, this information is unavailable for US toll-free numbers) """ name: Optional[str] = None """ Symbolic name associated with a party. If the phone does not belong to the known extension, only the location is returned, the name is not determined then """ device: Optional[UserCallLogResponseRecordsItemFromDevice] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UserCallLogResponseRecordsItemExtension(DataClassJsonMixin): id: Optional[int] = None """ Internal identifier of an extension """ uri: Optional[str] = None """ Canonical URI of an extension """ class UserCallLogResponseRecordsItemType(Enum): """ Call type """ Voice = 'Voice' Fax = 'Fax' class UserCallLogResponseRecordsItemTransport(Enum): """ For 'Detailed' view only. Call transport """ PSTN = 'PSTN' VoIP = 'VoIP' class UserCallLogResponseRecordsItemLegsItemAction(Enum): """ Action description of the call operation """ Unknown = 'Unknown' Phone_Call = 'Phone Call' Phone_Login = 'Phone Login' Incoming_Fax = 'Incoming Fax' Accept_Call = 'Accept Call' External_Application = 'External Application' FindMe = 'FindMe' FollowMe = 'FollowMe' Outgoing_Fax = 'Outgoing Fax' CallOut_CallMe = 'CallOut-CallMe' Call_Return = 'Call Return' Calling_Card = 'Calling Card' Monitoring = 'Monitoring' Ring_Directly = 'Ring Directly' RingOut_Web = 'RingOut Web' Text_Relay = 'Text Relay' VoIP_Call = 'VoIP Call' RingOut_PC = 'RingOut PC' RingMe = 'RingMe' Transfer = 'Transfer' OBJECT_411_Info = '411 Info' Emergency = 'Emergency' E911_Update = 'E911 Update' Support = 'Support' RingOut_Mobile = 'RingOut Mobile' MeetingsCall = 'MeetingsCall' SilentMonitoring = 'SilentMonitoring' class UserCallLogResponseRecordsItemLegsItemDirection(Enum): """ Call direction """ Inbound = 'Inbound' Outbound = 'Outbound' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UserCallLogResponseRecordsItemLegsItemBilling(DataClassJsonMixin): """ Billing information related to the call """ cost_included: Optional[float] = None """ Cost per minute, paid and already included in your RingCentral Plan. For example International Calls """ cost_purchased: Optional[float] = None """ Cost per minute, paid and not included in your RingCentral Plan """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UserCallLogResponseRecordsItemLegsItemDelegate(DataClassJsonMixin): """ Information on a delegate extension that actually implemented a call action. For Secretary call log the field is returned if the current extension implemented a call. For Boss call log the field contains information on a Secretary extension which actually implemented a call on behalf of the current extension Generated by Python OpenAPI Parser """ id: Optional[str] = None """ Internal identifier of a Secretary extension """ name: Optional[str] = None """ Custom name of a Secretary extension """ class UserCallLogResponseRecordsItemLegsItemLegType(Enum): """ Leg type """ SipForwarding = 'SipForwarding' ServiceMinus2 = 'ServiceMinus2' ServiceMinus3 = 'ServiceMinus3' PstnToSip = 'PstnToSip' Accept = 'Accept' FindMe = 'FindMe' FollowMe = 'FollowMe' TestCall = 'TestCall' FaxSent = 'FaxSent' CallBack = 'CallBack' CallingCard = 'CallingCard' RingDirectly = 'RingDirectly' RingOutWebToSubscriber = 'RingOutWebToSubscriber' RingOutWebToCaller = 'RingOutWebToCaller' SipToPstnMetered = 'SipToPstnMetered' RingOutClientToSubscriber = 'RingOutClientToSubscriber' RingOutClientToCaller = 'RingOutClientToCaller' RingMe = 'RingMe' TransferCall = 'TransferCall' SipToPstnUnmetered = 'SipToPstnUnmetered' RingOutDeviceToSubscriber = 'RingOutDeviceToSubscriber' RingOutDeviceToCaller = 'RingOutDeviceToCaller' RingOutOneLegToCaller = 'RingOutOneLegToCaller' ExtensionToExtension = 'ExtensionToExtension' CallPark = 'CallPark' PagingServer = 'PagingServer' Hunting = 'Hunting' OutgoingFreeSpDl = 'OutgoingFreeSpDl' ParkLocation = 'ParkLocation' ConferenceCall = 'ConferenceCall' MobileApp = 'MobileApp' Monitoring = 'Monitoring' MoveToConference = 'MoveToConference' Unknown = 'Unknown' class UserCallLogResponseRecordsItemLegsItemType(Enum): """ Call type """ Voice = 'Voice' Fax = 'Fax' class UserCallLogResponseRecordsItemLegsItemResult(Enum): """ Status description of the call operation """ Unknown = 'Unknown' Accepted = 'Accepted' CallConnected = 'Call connected' In_Progress = 'In Progress' Voicemail = 'Voicemail' Reply = 'Reply' Missed = 'Missed' Busy = 'Busy' Rejected = 'Rejected' No_Answer = 'No Answer' Hang_Up = 'Hang Up' Blocked = 'Blocked' SuspendedAccount = 'Suspended account' Call_Failed = 'Call Failed' Call_Failure = 'Call Failure' Internal_Error = 'Internal Error' IP_Phone_Offline = 'IP Phone Offline' No_Calling_Credit = 'No Calling Credit' Not_Allowed = 'Not Allowed' Restricted_Number = 'Restricted Number' Wrong_Number = 'Wrong Number' Answered_Not_Accepted = 'Answered Not Accepted' Stopped = 'Stopped' International_Disabled = 'International Disabled' International_Restricted = 'International Restricted' Abandoned = 'Abandoned' Declined = 'Declined' Received = 'Received' FaxOn_Demand = 'Fax on Demand' Partial_Receive = 'Partial Receive' Receive_Error = 'Receive Error' Fax_Receipt_Error = 'Fax Receipt Error' Sent = 'Sent' Fax_Partially_Sent = 'Fax Partially Sent' Send_Error = 'Send Error' Fax_Not_Sent = 'Fax Not Sent' Fax_Poor_Line = 'Fax Poor Line' class UserCallLogResponseRecordsItemLegsItemReason(Enum): """ Reason of a call result: * `Accepted` - The call was connected to and accepted by this number * `Connected` - The call was answered, but there was no response on how to handle the call (for example, a voice mail system answered the call and did not push "1" to accept) * `Line Busy` - The phone number you dialed was busy * `Not Answered` - The phone number you dialed was not answered * `No Answer` - You did not answer the call * `Hang Up` - The caller hung up before the call was answered * `Stopped` - This attempt was stopped because the call was answered by another phone * `Internal Error` - An internal error occurred when making the call. Please try again * `No Credit` - There was not enough Calling Credit on your account to make this call * `Restricted Number` - The number you dialed is restricted by RingCentral * `Wrong Number` - The number you dialed has either been disconnected or is not a valid phone number. Please check the number and try again * `International Disabled` - International calling is not enabled on your account. Contact customer service to activate International Calling * `International Restricted` - The country and/or area you attempted to call has been prohibited by your administrator * `Bad Number` - An error occurred when making the call. Please check the number before trying again * `Info 411 Restricted` - Calling to 411 Information Services is restricted * `Customer 611 Restricted` - 611 customer service is not supported. Please contact customer service at <(888) 555-1212> * `No Digital Line` - This DigitalLine was either not plugged in or did not have an internet connection * `Failed Try Again` - Call failed. Please try again * `Max Call Limit` - The number of simultaneous calls to your account has reached its limit * `Too Many Calls` - The number of simultaneous calls for per DigitalLine associated with Other Phone has reached its limit. Please contact customer service * `Calls Not Accepted` - Your account was not accepting calls at this time * `Number Not Allowed` - The number that was dialed to access your account is not allowed * `Number Blocked` - This number is in your Blocked Numbers list * `Number Disabled` - The phone number and/or area you attempted to call has been prohibited by your administrator * `Resource Error` - An error occurred when making the call. Please try again * `Call Loop` - A call loop occurred due to an incorrect call forwarding configuration. Please check that you are not forwarding calls back to your own account * `Fax Not Received` - An incoming fax could not be received because a proper connection with the sender's fax machine could not be established * `Fax Partially Sent` - The fax was only partially sent. Possible explanations include phone line quality to poor to maintain the connection or the call was dropped * `Fax Not Sent` - An attempt to send the fax was made, but could not connect with the receiving fax machine * `Fax Poor Line` - An attempt to send the fax was made, but the phone line quality was too poor to send the fax * `Fax Prepare Error` - An internal error occurred when preparing the fax. Please try again * `Fax Save Error` - An internal error occurred when saving the fax. Please try again * `Fax Send Error` - An error occurred when sending the fax. Please try again Generated by Python OpenAPI Parser """ Accepted = 'Accepted' Connected = 'Connected' Line_Busy = 'line Busy' Not_Answered = 'Not Answered' No_Answer = 'No Answer' Hang_Up = 'Hang Up' Stopped = 'Stopped' Internal_Error = 'Internal Error' No_Credit = 'No Credit' Restricted_Number = 'Restricted Number' Wrong_Number = 'Wrong Number' International_Disabled = 'International Disabled' International_Restricted = 'International Restricted' Bad_Number = 'Bad Number' Info_411_Restricted = 'Info 411 Restricted' Customer_611_Restricted = 'Customer 611 Restricted' No_Digital_Line = 'No Digital Line' Failed_Try_Again = 'Failed Try Again' Max_Call_Limit = 'Max Call Limit' Too_Many_Calls = 'Too Many Calls' Calls_Not_Accepted = 'Calls Not Accepted' Number_Not_Allowed = 'Number Not Allowed' Number_Blocked = 'Number Blocked' Number_Disabled = 'Number Disabled' Not_Allowed = 'Not Allowed' Resource_Error = 'Resource Error' Call_Loop = 'Call Loop' Fax_Not_Received = 'Fax Not Received' Fax_Partially_Sent = 'Fax Partially Sent' Fax_Not_Sent = 'Fax Not Sent' Fax_Poor_Line = 'Fax Poor Line' Fax_Prepare_Error = 'Fax Prepare Error' Fax_Save_Error = 'Fax Save Error' Fax_Send_Error = 'Fax Send Error' class UserCallLogResponseRecordsItemLegsItemTransport(Enum): """ Call transport """ PSTN = 'PSTN' VoIP = 'VoIP' class UserCallLogResponseRecordsItemLegsItemRecordingType(Enum): """ Indicates recording mode used """ Automatic = 'Automatic' OnDemand = 'OnDemand' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UserCallLogResponseRecordsItemLegsItemRecording(DataClassJsonMixin): """ Call recording data. Returned if the call is recorded """ id: Optional[str] = None """ Internal identifier of the call recording """ uri: Optional[str] = None """ Link to the call recording metadata resource """ type: Optional[UserCallLogResponseRecordsItemLegsItemRecordingType] = None """ Indicates recording mode used """ content_uri: Optional[str] = None """ Link to the call recording binary content """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UserCallLogResponseRecordsItemLegsItemMessage(DataClassJsonMixin): """ Linked message (Fax/Voicemail) """ id: Optional[str] = None """ Internal identifier of a message """ type: Optional[str] = None """ Type of a message """ uri: Optional[str] = None """ Link to a message resource """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UserCallLogResponseRecordsItemLegsItem(DataClassJsonMixin): action: Optional[UserCallLogResponseRecordsItemLegsItemAction] = None """ Action description of the call operation """ direction: Optional[UserCallLogResponseRecordsItemLegsItemDirection] = None """ Call direction """ billing: Optional[UserCallLogResponseRecordsItemLegsItemBilling] = None """ Billing information related to the call """ delegate: Optional[UserCallLogResponseRecordsItemLegsItemDelegate] = None """ Information on a delegate extension that actually implemented a call action. For Secretary call log the field is returned if the current extension implemented a call. For Boss call log the field contains information on a Secretary extension which actually implemented a call on behalf of the current extension """ extension_id: Optional[str] = None """ Internal identifier of an extension """ duration: Optional[int] = None """ Call duration in seconds """ extension: Optional[dict] = None """ Information on extension """ leg_type: Optional[UserCallLogResponseRecordsItemLegsItemLegType] = None """ Leg type """ start_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ The call start datetime in (ISO 8601)[https://en.wikipedia.org/wiki/ISO_8601] format including timezone, for example 2016-03-10T18:07:52.534Z """ type: Optional[UserCallLogResponseRecordsItemLegsItemType] = None """ Call type """ result: Optional[UserCallLogResponseRecordsItemLegsItemResult] = None """ Status description of the call operation """ reason: Optional[UserCallLogResponseRecordsItemLegsItemReason] = None """ Reason of a call result: * `Accepted` - The call was connected to and accepted by this number * `Connected` - The call was answered, but there was no response on how to handle the call (for example, a voice mail system answered the call and did not push "1" to accept) * `Line Busy` - The phone number you dialed was busy * `Not Answered` - The phone number you dialed was not answered * `No Answer` - You did not answer the call * `Hang Up` - The caller hung up before the call was answered * `Stopped` - This attempt was stopped because the call was answered by another phone * `Internal Error` - An internal error occurred when making the call. Please try again * `No Credit` - There was not enough Calling Credit on your account to make this call * `Restricted Number` - The number you dialed is restricted by RingCentral * `Wrong Number` - The number you dialed has either been disconnected or is not a valid phone number. Please check the number and try again * `International Disabled` - International calling is not enabled on your account. Contact customer service to activate International Calling * `International Restricted` - The country and/or area you attempted to call has been prohibited by your administrator * `Bad Number` - An error occurred when making the call. Please check the number before trying again * `Info 411 Restricted` - Calling to 411 Information Services is restricted * `Customer 611 Restricted` - 611 customer service is not supported. Please contact customer service at <(888) 555-1212> * `No Digital Line` - This DigitalLine was either not plugged in or did not have an internet connection * `Failed Try Again` - Call failed. Please try again * `Max Call Limit` - The number of simultaneous calls to your account has reached its limit * `Too Many Calls` - The number of simultaneous calls for per DigitalLine associated with Other Phone has reached its limit. Please contact customer service * `Calls Not Accepted` - Your account was not accepting calls at this time * `Number Not Allowed` - The number that was dialed to access your account is not allowed * `Number Blocked` - This number is in your Blocked Numbers list * `Number Disabled` - The phone number and/or area you attempted to call has been prohibited by your administrator * `Resource Error` - An error occurred when making the call. Please try again * `Call Loop` - A call loop occurred due to an incorrect call forwarding configuration. Please check that you are not forwarding calls back to your own account * `Fax Not Received` - An incoming fax could not be received because a proper connection with the sender's fax machine could not be established * `Fax Partially Sent` - The fax was only partially sent. Possible explanations include phone line quality to poor to maintain the connection or the call was dropped * `Fax Not Sent` - An attempt to send the fax was made, but could not connect with the receiving fax machine * `Fax Poor Line` - An attempt to send the fax was made, but the phone line quality was too poor to send the fax * `Fax Prepare Error` - An internal error occurred when preparing the fax. Please try again * `Fax Save Error` - An internal error occurred when saving the fax. Please try again * `Fax Send Error` - An error occurred when sending the fax. Please try again """ reason_description: Optional[str] = None from_: Optional[dict] = field(metadata=config(field_name='from'), default=None) """ Caller information """ to: Optional[dict] = None """ Callee information """ transport: Optional[UserCallLogResponseRecordsItemLegsItemTransport] = None """ Call transport """ recording: Optional[UserCallLogResponseRecordsItemLegsItemRecording] = None """ Call recording data. Returned if the call is recorded """ short_recording: Optional[bool] = None """ Indicates that the recording is too short and therefore wouldn't be returned. The flag is not returned if the value is false """ master: Optional[bool] = None """ Returned for 'Detailed' call log. Specifies if the leg is master-leg """ message: Optional[UserCallLogResponseRecordsItemLegsItemMessage] = None """ Linked message (Fax/Voicemail) """ telephony_session_id: Optional[str] = None """ Telephony identifier of a call session """ class UserCallLogResponseRecordsItemDirection(Enum): """ Call direction """ Inbound = 'Inbound' Outbound = 'Outbound' class UserCallLogResponseRecordsItemAction(Enum): """ Action description of the call operation """ Unknown = 'Unknown' Phone_Login = 'Phone Login' Calling_Card = 'Calling Card' VoIP_Call = 'VoIP Call' Phone_Call = 'Phone Call' Paging = 'Paging' Hunting = 'Hunting' Call_Park = 'Call Park' Monitoring = 'Monitoring' Text_Relay = 'Text Relay' External_Application = 'External Application' Park_Location = 'Park Location' CallOut_CallMe = 'CallOut-CallMe' Conference_Call = 'Conference Call' Move = 'Move' RC_Meetings = 'RC Meetings' Accept_Call = 'Accept Call' FindMe = 'FindMe' FollowMe = 'FollowMe' RingMe = 'RingMe' Transfer = 'Transfer' Call_Return = 'Call Return' Ring_Directly = 'Ring Directly' RingOut_Web = 'RingOut Web' RingOut_PC = 'RingOut PC' RingOut_Mobile = 'RingOut Mobile' Emergency = 'Emergency' E911_Update = 'E911 Update' Support = 'Support' Incoming_Fax = 'Incoming Fax' Outgoing_Fax = 'Outgoing Fax' class UserCallLogResponseRecordsItemResult(Enum): """ Status description of the call operation """ Unknown = 'Unknown' Accepted = 'Accepted' CallConnected = 'Call connected' In_Progress = 'In Progress' Voicemail = 'Voicemail' Reply = 'Reply' Missed = 'Missed' Busy = 'Busy' Rejected = 'Rejected' No_Answer = 'No Answer' Hang_Up = 'Hang Up' Blocked = 'Blocked' SuspendedAccount = 'Suspended account' Call_Failed = 'Call Failed' Call_Failure = 'Call Failure' Internal_Error = 'Internal Error' IP_Phone_Offline = 'IP Phone Offline' No_Calling_Credit = 'No Calling Credit' Not_Allowed = 'Not Allowed' Restricted_Number = 'Restricted Number' Wrong_Number = 'Wrong Number' Answered_Not_Accepted = 'Answered Not Accepted' Stopped = 'Stopped' International_Disabled = 'International Disabled' International_Restricted = 'International Restricted' Abandoned = 'Abandoned' Declined = 'Declined' Received = 'Received' FaxOn_Demand = 'Fax on Demand' Partial_Receive = 'Partial Receive' Receive_Error = 'Receive Error' Fax_Receipt_Error = 'Fax Receipt Error' Sent = 'Sent' Fax_Partially_Sent = 'Fax Partially Sent' Send_Error = 'Send Error' Fax_Not_Sent = 'Fax Not Sent' Fax_Poor_Line = 'Fax Poor Line' class UserCallLogResponseRecordsItemReason(Enum): """ Reason of a call result: * `Accepted` - The call was connected to and accepted by this number * `Connected` - The call was answered, but there was no response on how to handle the call (for example, a voice mail system answered the call and did not push "1" to accept) * `Line Busy` - The phone number you dialed was busy * `Not Answered` - The phone number you dialed was not answered * `No Answer` - You did not answer the call * `Hang Up` - The caller hung up before the call was answered * `Stopped` - This attempt was stopped because the call was answered by another phone * `Internal Error` - An internal error occurred when making the call. Please try again * `No Credit` - There was not enough Calling Credit on your account to make this call * `Restricted Number` - The number you dialed is restricted by RingCentral * `Wrong Number` - The number you dialed has either been disconnected or is not a valid phone number. Please check the number and try again * `International Disabled` - International calling is not enabled on your account. Contact customer service to activate International Calling * `International Restricted` - The country and/or area you attempted to call has been prohibited by your administrator * `Bad Number` - An error occurred when making the call. Please check the number before trying again * `Info 411 Restricted` - Calling to 411 Information Services is restricted * `Customer 611 Restricted` - 611 customer service is not supported. Please contact customer service at <(888) 555-1212> * `No Digital Line` - This DigitalLine was either not plugged in or did not have an internet connection * `Failed Try Again` - Call failed. Please try again * `Max Call Limit` - The number of simultaneous calls to your account has reached its limit * `Too Many Calls` - The number of simultaneous calls for per DigitalLine associated with Other Phone has reached its limit. Please contact customer service * `Calls Not Accepted` - Your account was not accepting calls at this time * `Number Not Allowed` - The number that was dialed to access your account is not allowed * `Number Blocked` - This number is in your Blocked Numbers list * `Number Disabled` - The phone number and/or area you attempted to call has been prohibited by your administrator * `Resource Error` - An error occurred when making the call. Please try again * `Call Loop` - A call loop occurred due to an incorrect call forwarding configuration. Please check that you are not forwarding calls back to your own account * `Fax Not Received` - An incoming fax could not be received because a proper connection with the sender's fax machine could not be established * `Fax Partially Sent` - The fax was only partially sent. Possible explanations include phone line quality to poor to maintain the connection or the call was dropped * `Fax Not Sent` - An attempt to send the fax was made, but could not connect with the receiving fax machine * `Fax Poor Line` - An attempt to send the fax was made, but the phone line quality was too poor to send the fax * `Fax Prepare Error` - An internal error occurred when preparing the fax. Please try again * `Fax Save Error` - An internal error occurred when saving the fax. Please try again * `Fax Send Error` - An error occurred when sending the fax. Please try again Generated by Python OpenAPI Parser """ Accepted = 'Accepted' Connected = 'Connected' Line_Busy = 'line Busy' Not_Answered = 'Not Answered' No_Answer = 'No Answer' Hang_Up = 'Hang Up' Stopped = 'Stopped' Internal_Error = 'Internal Error' No_Credit = 'No Credit' Restricted_Number = 'Restricted Number' Wrong_Number = 'Wrong Number' International_Disabled = 'International Disabled' International_Restricted = 'International Restricted' Bad_Number = 'Bad Number' Info_411_Restricted = 'Info 411 Restricted' Customer_611_Restricted = 'Customer 611 Restricted' No_Digital_Line = 'No Digital Line' Failed_Try_Again = 'Failed Try Again' Max_Call_Limit = 'Max Call Limit' Too_Many_Calls = 'Too Many Calls' Calls_Not_Accepted = 'Calls Not Accepted' Number_Not_Allowed = 'Number Not Allowed' Number_Blocked = 'Number Blocked' Number_Disabled = 'Number Disabled' Resource_Error = 'Resource Error' Call_Loop = 'Call Loop' Fax_Not_Received = 'Fax Not Received' Fax_Partially_Sent = 'Fax Partially Sent' Fax_Not_Sent = 'Fax Not Sent' Fax_Poor_Line = 'Fax Poor Line' Fax_Prepare_Error = 'Fax Prepare Error' Fax_Save_Error = 'Fax Save Error' Fax_Send_Error = 'Fax Send Error' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UserCallLogResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a cal log record """ uri: Optional[str] = None """ Canonical URI of a call log record """ session_id: Optional[str] = None """ Internal identifier of a call session """ telephony_session_id: Optional[str] = None """ Telephony identifier of a call session """ from_: Optional[UserCallLogResponseRecordsItemFrom] = field(metadata=config(field_name='from'), default=None) extension: Optional[UserCallLogResponseRecordsItemExtension] = None type: Optional[UserCallLogResponseRecordsItemType] = None """ Call type """ transport: Optional[UserCallLogResponseRecordsItemTransport] = None """ For 'Detailed' view only. Call transport """ legs: Optional[List[UserCallLogResponseRecordsItemLegsItem]] = None """ For 'Detailed' view only. Leg description """ billing: Optional[dict] = None """ Billing information related to the call """ direction: Optional[UserCallLogResponseRecordsItemDirection] = None """ Call direction """ message: Optional[dict] = None """ Linked message (Fax/Voicemail) """ start_time: Optional[str] = None """ The call start datetime in (ISO 8601)[https://en.wikipedia.org/wiki/ISO_8601] format including timezone, for example 2016-03-10T18:07:52.534Z """ delegate: Optional[dict] = None """ Information on a delegate extension that actually implemented a call action. For Secretary call log the field is returned if the current extension implemented a call. For Boss call log the field contains information on a Secretary extension which actually implemented a call on behalf of the current extension """ deleted: Optional[bool] = None """ Indicates whether the record is deleted. Returned for deleted records, for ISync requests """ duration: Optional[int] = None """ Call duration in seconds """ last_modified_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ For 'Detailed' view only. The datetime when the call log record was modified in (ISO 8601)[https://en.wikipedia.org/wiki/ISO_8601] format including timezone, for example 2016-03-10T18:07:52.534Z """ recording: Optional[dict] = None """ Call recording data. Returned if a call is recorded """ short_recording: Optional[bool] = None """ Indicates that the recording is too short and therefore wouldn't be returned. The flag is not returned if the value is false """ action: Optional[UserCallLogResponseRecordsItemAction] = None """ Action description of the call operation """ result: Optional[UserCallLogResponseRecordsItemResult] = None """ Status description of the call operation """ reason: Optional[UserCallLogResponseRecordsItemReason] = None """ Reason of a call result: * `Accepted` - The call was connected to and accepted by this number * `Connected` - The call was answered, but there was no response on how to handle the call (for example, a voice mail system answered the call and did not push "1" to accept) * `Line Busy` - The phone number you dialed was busy * `Not Answered` - The phone number you dialed was not answered * `No Answer` - You did not answer the call * `Hang Up` - The caller hung up before the call was answered * `Stopped` - This attempt was stopped because the call was answered by another phone * `Internal Error` - An internal error occurred when making the call. Please try again * `No Credit` - There was not enough Calling Credit on your account to make this call * `Restricted Number` - The number you dialed is restricted by RingCentral * `Wrong Number` - The number you dialed has either been disconnected or is not a valid phone number. Please check the number and try again * `International Disabled` - International calling is not enabled on your account. Contact customer service to activate International Calling * `International Restricted` - The country and/or area you attempted to call has been prohibited by your administrator * `Bad Number` - An error occurred when making the call. Please check the number before trying again * `Info 411 Restricted` - Calling to 411 Information Services is restricted * `Customer 611 Restricted` - 611 customer service is not supported. Please contact customer service at <(888) 555-1212> * `No Digital Line` - This DigitalLine was either not plugged in or did not have an internet connection * `Failed Try Again` - Call failed. Please try again * `Max Call Limit` - The number of simultaneous calls to your account has reached its limit * `Too Many Calls` - The number of simultaneous calls for per DigitalLine associated with Other Phone has reached its limit. Please contact customer service * `Calls Not Accepted` - Your account was not accepting calls at this time * `Number Not Allowed` - The number that was dialed to access your account is not allowed * `Number Blocked` - This number is in your Blocked Numbers list * `Number Disabled` - The phone number and/or area you attempted to call has been prohibited by your administrator * `Resource Error` - An error occurred when making the call. Please try again * `Call Loop` - A call loop occurred due to an incorrect call forwarding configuration. Please check that you are not forwarding calls back to your own account * `Fax Not Received` - An incoming fax could not be received because a proper connection with the sender's fax machine could not be established * `Fax Partially Sent` - The fax was only partially sent. Possible explanations include phone line quality to poor to maintain the connection or the call was dropped * `Fax Not Sent` - An attempt to send the fax was made, but could not connect with the receiving fax machine * `Fax Poor Line` - An attempt to send the fax was made, but the phone line quality was too poor to send the fax * `Fax Prepare Error` - An internal error occurred when preparing the fax. Please try again * `Fax Save Error` - An internal error occurred when saving the fax. Please try again * `Fax Send Error` - An error occurred when sending the fax. Please try again """ reason_description: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UserCallLogResponseNavigationFirstPage(DataClassJsonMixin): """ Canonical URI for the first page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UserCallLogResponseNavigation(DataClassJsonMixin): """ Information on navigation """ first_page: Optional[UserCallLogResponseNavigationFirstPage] = None """ Canonical URI for the first page of the list """ next_page: Optional[dict] = None """ Canonical URI for the next page of the list """ previous_page: Optional[dict] = None """ Canonical URI for the previous page of the list """ last_page: Optional[dict] = None """ Canonical URI for the last page of the list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UserCallLogResponsePaging(DataClassJsonMixin): """ Information on paging """ page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) """ per_page: Optional[int] = 100 """ Current page size, describes how many items are in each page. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty """ total_pages: Optional[int] = None """ The total number of pages in a dataset. May be omitted for some resources due to performance reasons """ total_elements: Optional[int] = None """ The total number of elements in a dataset. May be omitted for some resource due to performance reasons """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UserCallLogResponse(DataClassJsonMixin): """ Required Properties: - navigation - paging - records Generated by Python OpenAPI Parser """ records: List[UserCallLogResponseRecordsItem] """ List of call log records """ navigation: UserCallLogResponseNavigation """ Information on navigation """ paging: UserCallLogResponsePaging """ Information on paging """ class CompanyCallLogRecordTransport(Enum): """ Call transport """ PSTN = 'PSTN' VoIP = 'VoIP' class CompanyCallLogRecordType(Enum): """ Call type """ Voice = 'Voice' Fax = 'Fax' class CompanyCallLogRecordDirection(Enum): """ Call direction """ Inbound = 'Inbound' Outbound = 'Outbound' class CompanyCallLogRecordAction(Enum): """ Action description of the call operation """ Unknown = 'Unknown' Phone_Login = 'Phone Login' Calling_Card = 'Calling Card' VoIP_Call = 'VoIP Call' Phone_Call = 'Phone Call' Paging = 'Paging' Hunting = 'Hunting' Call_Park = 'Call Park' Monitoring = 'Monitoring' Text_Relay = 'Text Relay' External_Application = 'External Application' Park_Location = 'Park Location' CallOut_CallMe = 'CallOut-CallMe' Conference_Call = 'Conference Call' Move = 'Move' RC_Meetings = 'RC Meetings' Accept_Call = 'Accept Call' FindMe = 'FindMe' FollowMe = 'FollowMe' RingMe = 'RingMe' Transfer = 'Transfer' Call_Return = 'Call Return' Ring_Directly = 'Ring Directly' RingOut_Web = 'RingOut Web' RingOut_PC = 'RingOut PC' RingOut_Mobile = 'RingOut Mobile' Emergency = 'Emergency' E911_Update = 'E911 Update' Support = 'Support' Incoming_Fax = 'Incoming Fax' Outgoing_Fax = 'Outgoing Fax' class CompanyCallLogRecordResult(Enum): """ Status description of the call operation """ Unknown = 'Unknown' Accepted = 'Accepted' CallConnected = 'Call connected' In_Progress = 'In Progress' Voicemail = 'Voicemail' Reply = 'Reply' Missed = 'Missed' Busy = 'Busy' Rejected = 'Rejected' No_Answer = 'No Answer' Hang_Up = 'Hang Up' Blocked = 'Blocked' SuspendedAccount = 'Suspended account' Call_Failed = 'Call Failed' Call_Failure = 'Call Failure' Internal_Error = 'Internal Error' IP_Phone_Offline = 'IP Phone Offline' No_Calling_Credit = 'No Calling Credit' Restricted_Number = 'Restricted Number' Wrong_Number = 'Wrong Number' Answered_Not_Accepted = 'Answered Not Accepted' Stopped = 'Stopped' International_Disabled = 'International Disabled' International_Restricted = 'International Restricted' Abandoned = 'Abandoned' Declined = 'Declined' Received = 'Received' FaxOn_Demand = 'Fax on Demand' Partial_Receive = 'Partial Receive' Receive_Error = 'Receive Error' Fax_Receipt_Error = 'Fax Receipt Error' Sent = 'Sent' Fax_Partially_Sent = 'Fax Partially Sent' Send_Error = 'Send Error' Fax_Not_Sent = 'Fax Not Sent' Fax_Poor_Line = 'Fax Poor Line' class CompanyCallLogRecordReason(Enum): Accepted = 'Accepted' Connected = 'Connected' Line_Busy = 'line Busy' Not_Answered = 'Not Answered' No_Answer = 'No Answer' Hang_Up = 'Hang Up' Stopped = 'Stopped' Internal_Error = 'Internal Error' No_Credit = 'No Credit' Restricted_Number = 'Restricted Number' Wrong_Number = 'Wrong Number' International_Disabled = 'International Disabled' International_Restricted = 'International Restricted' Bad_Number = 'Bad Number' Info_411_Restricted = 'Info 411 Restricted' Customer_611_Restricted = 'Customer 611 Restricted' No_Digital_Line = 'No Digital Line' Failed_Try_Again = 'Failed Try Again' Max_Call_Limit = 'Max Call Limit' Too_Many_Calls = 'Too Many Calls' Calls_Not_Accepted = 'Calls Not Accepted' Number_Not_Allowed = 'Number Not Allowed' Number_Blocked = 'Number Blocked' Number_Disabled = 'Number Disabled' Resource_Error = 'Resource Error' Call_Loop = 'Call Loop' Fax_Not_Received = 'Fax Not Received' Fax_Partially_Sent = 'Fax Partially Sent' Fax_Not_Sent = 'Fax Not Sent' Fax_Poor_Line = 'Fax Poor Line' Fax_Prepare_Error = 'Fax Prepare Error' Fax_Save_Error = 'Fax Save Error' Fax_Send_Error = 'Fax Send Error' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CompanyCallLogRecord(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a cal log record """ uri: Optional[str] = None """ Canonical URI of a call log record """ session_id: Optional[str] = None """ Internal identifier of a call session """ extension: Optional[dict] = None telephony_session_id: Optional[str] = None """ Telephony identifier of a call session """ transport: Optional[CompanyCallLogRecordTransport] = None """ Call transport """ from_: Optional[dict] = field(metadata=config(field_name='from'), default=None) """ Caller information """ to: Optional[dict] = None """ Callee information """ type: Optional[CompanyCallLogRecordType] = None """ Call type """ direction: Optional[CompanyCallLogRecordDirection] = None """ Call direction """ message: Optional[dict] = None """ Linked message (Fax/Voicemail) """ delegate: Optional[dict] = None """ Information on a delegate extension that actually implemented a call action. For Secretary call log the field is returned if the current extension implemented a call. For Boss call log the field contains information on a Secretary extension which actually implemented a call on behalf of the current extension """ deleted: Optional[bool] = None """ Indicates whether the record is deleted. Returned for deleted records, for ISync requests """ action: Optional[CompanyCallLogRecordAction] = None """ Action description of the call operation """ result: Optional[CompanyCallLogRecordResult] = None """ Status description of the call operation """ reason: Optional[CompanyCallLogRecordReason] = None reason_description: Optional[str] = None start_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ The call start datetime in (ISO 8601)[https://en.wikipedia.org/wiki/ISO_8601] format including timezone, for example 2016-03-10T18:07:52.534Z """ duration: Optional[int] = None """ Call duration in seconds """ recording: Optional[dict] = None """ Call recording data. Returned if a call is recorded """ short_recording: Optional[bool] = None """ Indicates that the recording is too short and therefore wouldn't be returned. The flag is not returned if the value is false """ legs: Optional[list] = None """ For 'Detailed' view only. Leg description """ billing: Optional[dict] = None """ Billing information related to the call. Returned for 'Detailed' view only """ last_modified_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ For 'Detailed' view only. The datetime when the call log record was modified in (ISO 8601)[https://en.wikipedia.org/wiki/ISO_8601] format including timezone, for example 2016-03-10T18:07:52.534Z """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CompanyActiveCallsResponse(DataClassJsonMixin): """ Required Properties: - navigation - paging - records Generated by Python OpenAPI Parser """ records: list """ List of call log records """ navigation: dict """ Information on navigation """ paging: dict """ Information on paging """ uri: Optional[str] = None """ Link to the list of company active call records """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetCallRecordingResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a call recording """ content_uri: Optional[str] = None """ Link to a call recording binary content """ content_type: Optional[str] = None """ Call recording file format. Supported format is audio/x-wav """ duration: Optional[int] = None """ Recorded call duration """ class CallLogSyncSyncInfoSyncType(Enum): """ Type of synchronization """ FSync = 'FSync' ISync = 'ISync' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallLogSyncSyncInfo(DataClassJsonMixin): """ Sync information (type, token and time) """ sync_type: Optional[CallLogSyncSyncInfoSyncType] = None """ Type of synchronization """ sync_token: Optional[str] = None """ Synchronization token """ sync_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ The last synchronization datetime in (ISO 8601)[https://en.wikipedia.org/wiki/ISO_8601] format including timezone, for example 2016-03-10T18:07:52.534Z """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallLogSync(DataClassJsonMixin): uri: Optional[str] = None """ Link to the list of call log records with sync information """ records: Optional[list] = None """ List of call log records with synchronization information. For ISync the total number of returned records is limited to 250; this includes both new records and the old ones, specified by the recordCount parameter """ sync_info: Optional[CallLogSyncSyncInfo] = None """ Sync information (type, token and time) """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UserActiveCallsResponse(DataClassJsonMixin): """ Required Properties: - navigation - paging - records Generated by Python OpenAPI Parser """ records: list """ List of call log records """ navigation: dict """ Information on navigation """ paging: dict """ Information on paging """ uri: Optional[str] = None """ Link to the list of user active call records """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AccountCallLogResponse(DataClassJsonMixin): uri: Optional[str] = None """ Link to the list of company call log records """ records: Optional[list] = None """ List of call log records """ navigation: Optional[dict] = None """ Information on navigation """ paging: Optional[dict] = None """ Information on paging """ class AccountCallLogSyncResponseSyncInfoSyncType(Enum): """ Type of synchronization """ FSync = 'FSync' ISync = 'ISync' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AccountCallLogSyncResponseSyncInfo(DataClassJsonMixin): """ Sync information (type, token and time) """ sync_type: Optional[AccountCallLogSyncResponseSyncInfoSyncType] = None """ Type of synchronization """ sync_token: Optional[str] = None """ Synchronization token """ sync_time: Optional[str] = None """ Time of last synchronization in (ISO 8601)[https://en.wikipedia.org/wiki/ISO_8601] format including timezone, for example *2016-03-10T18:07:52.534Z* """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AccountCallLogSyncResponse(DataClassJsonMixin): uri: Optional[str] = None """ Link to account call log sync resource """ records: Optional[list] = None """ List of call log records with synchronization information. For 'ISync' the total number of returned records is limited to 250; this includes both new records and the old ones, specified by the recordCount parameter """ sync_info: Optional[AccountCallLogSyncResponseSyncInfo] = None """ Sync information (type, token and time) """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class FaxResponseFrom(DataClassJsonMixin): """ Sender information """ phone_number: Optional[str] = None name: Optional[str] = None location: Optional[str] = None class FaxResponseToItemMessageStatus(Enum): Sent = 'Sent' SendingFailed = 'SendingFailed' Queued = 'Queued' class FaxResponseToItemFaxErrorCode(Enum): Undefined = 'Undefined' NoFaxSendPermission = 'NoFaxSendPermission' NoInternationalPermission = 'NoInternationalPermission' NoFaxMachine = 'NoFaxMachine' NoAnswer = 'NoAnswer' LineBusy = 'LineBusy' CallerHungUp = 'CallerHungUp' NotEnoughCredits = 'NotEnoughCredits' SentPartially = 'SentPartially' InternationalCallingDisabled = 'InternationalCallingDisabled' DestinationCountryDisabled = 'DestinationCountryDisabled' UnknownCountryCode = 'UnknownCountryCode' NotAccepted = 'NotAccepted' InvalidNumber = 'InvalidNumber' CallDeclined = 'CallDeclined' TooManyCallsPerLine = 'TooManyCallsPerLine' CallFailed = 'CallFailed' RenderingFailed = 'RenderingFailed' TooManyPages = 'TooManyPages' ReturnToDBQueue = 'ReturnToDBQueue' NoCallTime = 'NoCallTime' WrongNumber = 'WrongNumber' ProhibitedNumber = 'ProhibitedNumber' InternalError = 'InternalError' FaxSendingProhibited = 'FaxSendingProhibited' ThePhoneIsBlacklisted = 'ThePhoneIsBlacklisted' UserNotFound = 'UserNotFound' ConvertError = 'ConvertError' DBGeneralError = 'DBGeneralError' SkypeBillingFailed = 'SkypeBillingFailed' AccountSuspended = 'AccountSuspended' ProhibitedDestination = 'ProhibitedDestination' InternationalDisabled = 'InternationalDisabled' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class FaxResponseToItem(DataClassJsonMixin): phone_number: Optional[str] = None name: Optional[str] = None location: Optional[str] = None message_status: Optional[FaxResponseToItemMessageStatus] = None fax_error_code: Optional[FaxResponseToItemFaxErrorCode] = None class FaxResponseReadStatus(Enum): """ Message read status """ Read = 'Read' Unread = 'Unread' class FaxResponsePriority(Enum): """ Message priority """ Normal = 'Normal' High = 'High' class FaxResponseAttachmentsItemType(Enum): """ Type of message attachment """ AudioRecording = 'AudioRecording' AudioTranscription = 'AudioTranscription' Text = 'Text' SourceDocument = 'SourceDocument' RenderedDocument = 'RenderedDocument' MmsAttachment = 'MmsAttachment' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class FaxResponseAttachmentsItem(DataClassJsonMixin): id: Optional[int] = None """ Internal identifier of a message attachment """ uri: Optional[str] = None """ Canonical URI of a message attachment """ type: Optional[FaxResponseAttachmentsItemType] = None """ Type of message attachment """ content_type: Optional[str] = None """ MIME type for a given attachment, for instance 'audio/wav' """ vm_duration: Optional[int] = None """ Voicemail only Duration of the voicemail in seconds """ filename: Optional[str] = None """ Name of a file attached """ size: Optional[int] = None """ Size of attachment in bytes """ class FaxResponseDirection(Enum): """ Message direction """ Inbound = 'Inbound' Outbound = 'Outbound' class FaxResponseAvailability(Enum): """ Message availability status. Message in 'Deleted' state is still preserved with all its attachments and can be restored. 'Purged' means that all attachments are already deleted and the message itself is about to be physically deleted shortly Generated by Python OpenAPI Parser """ Alive = 'Alive' Deleted = 'Deleted' Purged = 'Purged' class FaxResponseMessageStatus(Enum): """ Message status. 'Queued' - the message is queued for sending; 'Sent' - a message is successfully sent; 'SendingFailed' - a message sending attempt has failed; 'Received' - a message is received (inbound messages have this status by default) Generated by Python OpenAPI Parser """ Queued = 'Queued' Sent = 'Sent' SendingFailed = 'SendingFailed' Received = 'Received' class FaxResponseFaxResolution(Enum): """ Resolution of a fax message. ('High' for black and white image scanned at 200 dpi, 'Low' for black and white image scanned at 100 dpi) Generated by Python OpenAPI Parser """ High = 'High' Low = 'Low' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class FaxResponse(DataClassJsonMixin): id: Optional[int] = None """ Internal identifier of a message """ uri: Optional[str] = None """ Canonical URI of a message """ type: Optional[str] = None """ Message type - 'Fax' """ from_: Optional[FaxResponseFrom] = field(metadata=config(field_name='from'), default=None) """ Sender information """ to: Optional[List[FaxResponseToItem]] = None """ Recipient information """ creation_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Message creation datetime in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z """ read_status: Optional[FaxResponseReadStatus] = None """ Message read status """ priority: Optional[FaxResponsePriority] = None """ Message priority """ attachments: Optional[List[FaxResponseAttachmentsItem]] = None """ The list of message attachments """ direction: Optional[FaxResponseDirection] = None """ Message direction """ availability: Optional[FaxResponseAvailability] = None """ Message availability status. Message in 'Deleted' state is still preserved with all its attachments and can be restored. 'Purged' means that all attachments are already deleted and the message itself is about to be physically deleted shortly """ message_status: Optional[FaxResponseMessageStatus] = None """ Message status. 'Queued' - the message is queued for sending; 'Sent' - a message is successfully sent; 'SendingFailed' - a message sending attempt has failed; 'Received' - a message is received (inbound messages have this status by default) """ fax_resolution: Optional[FaxResponseFaxResolution] = None """ Resolution of a fax message. ('High' for black and white image scanned at 200 dpi, 'Low' for black and white image scanned at 100 dpi) """ fax_page_count: Optional[int] = None """ Page count in a fax message """ last_modified_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Datetime when the message was modified on server in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z """ cover_index: Optional[int] = None """ Cover page identifier. For the list of available cover page identifiers please call the Fax Cover Pages method """ cover_page_text: Optional[str] = None """ Cover page text, entered by the fax sender and printed on the cover page. Maximum length is limited to 1024 symbols """ class GetMessageInfoResponseAvailability(Enum): """ Message availability status. Message in 'Deleted' state is still preserved with all its attachments and can be restored. 'Purged' means that all attachments are already deleted and the message itself is about to be physically deleted shortly Generated by Python OpenAPI Parser """ Alive = 'Alive' Deleted = 'Deleted' Purged = 'Purged' class GetMessageInfoResponseDirection(Enum): """ Message direction. Note that for some message types not all directions are allowed. For example voicemail messages can be only inbound Generated by Python OpenAPI Parser """ Inbound = 'Inbound' Outbound = 'Outbound' class GetMessageInfoResponseFaxResolution(Enum): """ Fax only. Resolution of a fax message. 'High' for black and white image scanned at 200 dpi, 'Low' for black and white image scanned at 100 dpi Generated by Python OpenAPI Parser """ High = 'High' Low = 'Low' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetMessageInfoResponseFrom(DataClassJsonMixin): """ Sender information """ extension_number: Optional[str] = None """ Extension short number (usually 3 or 4 digits). This property is filled when parties communicate by means of short internal numbers, for example when calling to other extension or sending/receiving Company Pager message """ extension_id: Optional[str] = None """ Internal identifier of an extension """ location: Optional[str] = None """ Contains party location (city, state) if one can be determined from phoneNumber. This property is filled only when phoneNumber is not empty and server can calculate location information from it (for example, this information is unavailable for US toll-free numbers) """ name: Optional[str] = None """ Symbolic name associated with a party. If the phone does not belong to the known extension, only the location is returned, the name is not determined then """ phone_number: Optional[str] = None """ Phone number of a party. Usually it is a plain number including country and area code like 18661234567. But sometimes it could be returned from database with some formatting applied, for example (866)123-4567. This property is filled in all cases where parties communicate by means of global phone numbers, for example when calling to direct numbers or sending/receiving SMS """ class GetMessageInfoResponseMessageStatus(Enum): """ Message status. Different message types may have different allowed status values. For outbound faxes the aggregated message status is returned: If status for at least one recipient is 'Queued', then 'Queued' value is returned If status for at least one recipient is 'SendingFailed', then 'SendingFailed' value is returned In other cases Sent status is returned Generated by Python OpenAPI Parser """ Queued = 'Queued' Sent = 'Sent' Delivered = 'Delivered' DeliveryFailed = 'DeliveryFailed' SendingFailed = 'SendingFailed' Received = 'Received' class GetMessageInfoResponsePriority(Enum): """ Message priority """ Normal = 'Normal' High = 'High' class GetMessageInfoResponseReadStatus(Enum): """ Message read status """ Read = 'Read' Unread = 'Unread' class GetMessageInfoResponseToItemMessageStatus(Enum): """ Status of a message. Returned for outbound fax messages only """ Queued = 'Queued' Sent = 'Sent' Delivered = 'Delivered' DeliveryFailed = 'DeliveryFailed' SendingFailed = 'SendingFailed' Received = 'Received' class GetMessageInfoResponseToItemFaxErrorCode(Enum): """ Error code returned in case of fax sending failure. Returned if messageStatus value is 'SendingFailed'. Supported for fax messages only Generated by Python OpenAPI Parser """ AllLinesInUse = 'AllLinesInUse' Undefined = 'Undefined' NoFaxSendPermission = 'NoFaxSendPermission' NoInternationalPermission = 'NoInternationalPermission' NoFaxMachine = 'NoFaxMachine' NoAnswer = 'NoAnswer' LineBusy = 'LineBusy' CallerHungUp = 'CallerHungUp' NotEnoughCredits = 'NotEnoughCredits' SentPartially = 'SentPartially' InternationalCallingDisabled = 'InternationalCallingDisabled' DestinationCountryDisabled = 'DestinationCountryDisabled' UnknownCountryCode = 'UnknownCountryCode' NotAccepted = 'NotAccepted' InvalidNumber = 'InvalidNumber' CallDeclined = 'CallDeclined' TooManyCallsPerLine = 'TooManyCallsPerLine' CallFailed = 'CallFailed' RenderingFailed = 'RenderingFailed' TooManyPages = 'TooManyPages' ReturnToDBQueue = 'ReturnToDBQueue' NoCallTime = 'NoCallTime' WrongNumber = 'WrongNumber' ProhibitedNumber = 'ProhibitedNumber' InternalError = 'InternalError' FaxSendingProhibited = 'FaxSendingProhibited' ThePhoneIsBlacklisted = 'ThePhoneIsBlacklisted' UserNotFound = 'UserNotFound' ConvertError = 'ConvertError' DBGeneralError = 'DBGeneralError' SkypeBillingFailed = 'SkypeBillingFailed' AccountSuspended = 'AccountSuspended' ProhibitedDestination = 'ProhibitedDestination' InternationalDisabled = 'InternationalDisabled' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetMessageInfoResponseToItem(DataClassJsonMixin): extension_number: Optional[str] = None """ Extension short number (usually 3 or 4 digits). This property is filled when parties communicate by means of short internal numbers, for example when calling to other extension or sending/receiving Company Pager message """ extension_id: Optional[str] = None location: Optional[str] = None """ Contains party location (city, state) if one can be determined from phoneNumber. This property is filled only when phoneNumber is not empty and server can calculate location information from it (for example, this information is unavailable for US toll-free numbers) """ target: Optional[bool] = None """ 'True' specifies that message is sent exactly to this recipient. Returned in to field for group MMS. Useful if one extension has several phone numbers """ message_status: Optional[GetMessageInfoResponseToItemMessageStatus] = None """ Status of a message. Returned for outbound fax messages only """ fax_error_code: Optional[GetMessageInfoResponseToItemFaxErrorCode] = None """ Error code returned in case of fax sending failure. Returned if messageStatus value is 'SendingFailed'. Supported for fax messages only """ name: Optional[str] = None """ Symbolic name associated with a party. If the phone does not belong to the known extension, only the location is returned, the name is not determined then """ phone_number: Optional[str] = None """ Phone number of a party. Usually it is a plain number including country and area code like 18661234567. But sometimes it could be returned from database with some formatting applied, for example (866)123-4567. This property is filled in all cases where parties communicate by means of global phone numbers, for example when calling to direct numbers or sending/receiving SMS """ class GetMessageInfoResponseType(Enum): """ Message type """ Fax = 'Fax' SMS = 'SMS' VoiceMail = 'VoiceMail' Pager = 'Pager' Text = 'Text' class GetMessageInfoResponseVmTranscriptionStatus(Enum): """ Voicemail only. Status of voicemail to text transcription. If VoicemailToText feature is not activated for account, the 'NotAvailable' value is returned Generated by Python OpenAPI Parser """ NotAvailable = 'NotAvailable' InProgress = 'InProgress' TimedOut = 'TimedOut' Completed = 'Completed' CompletedPartially = 'CompletedPartially' Failed = 'Failed' Unknown = 'Unknown' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetMessageInfoResponse(DataClassJsonMixin): id: Optional[int] = None """ Internal identifier of a message """ uri: Optional[str] = None """ Canonical URI of a message """ attachments: Optional[list] = None """ The list of message attachments """ availability: Optional[GetMessageInfoResponseAvailability] = None """ Message availability status. Message in 'Deleted' state is still preserved with all its attachments and can be restored. 'Purged' means that all attachments are already deleted and the message itself is about to be physically deleted shortly """ conversation_id: Optional[int] = None """ SMS and Pager only. Identifier of a conversation the message belongs to """ conversation: Optional[dict] = None """ SMS and Pager only. Identifier of a conversation the message belongs to """ creation_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Message creation datetime in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z """ delivery_error_code: Optional[str] = None """ SMS only. Delivery error code returned by gateway """ direction: Optional[GetMessageInfoResponseDirection] = None """ Message direction. Note that for some message types not all directions are allowed. For example voicemail messages can be only inbound """ fax_page_count: Optional[int] = None """ Fax only. Page count in a fax message """ fax_resolution: Optional[GetMessageInfoResponseFaxResolution] = None """ Fax only. Resolution of a fax message. 'High' for black and white image scanned at 200 dpi, 'Low' for black and white image scanned at 100 dpi """ from_: Optional[GetMessageInfoResponseFrom] = field(metadata=config(field_name='from'), default=None) """ Sender information """ last_modified_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ The datetime when the message was modified on server in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z """ message_status: Optional[GetMessageInfoResponseMessageStatus] = None """ Message status. Different message types may have different allowed status values. For outbound faxes the aggregated message status is returned: If status for at least one recipient is 'Queued', then 'Queued' value is returned If status for at least one recipient is 'SendingFailed', then 'SendingFailed' value is returned In other cases Sent status is returned """ pg_to_department: Optional[bool] = None """ 'Pager' only. 'True' if at least one of the message recipients is 'Department' extension """ priority: Optional[GetMessageInfoResponsePriority] = None """ Message priority """ read_status: Optional[GetMessageInfoResponseReadStatus] = None """ Message read status """ sms_delivery_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ SMS only. The datetime when outbound SMS was delivered to recipient's handset in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z. It is filled only if the carrier sends a delivery receipt to RingCentral """ sms_sending_attempts_count: Optional[int] = None """ SMS only. Number of attempts made to send an outbound SMS to the gateway (if gateway is temporary unavailable) """ subject: Optional[str] = None """ Message subject. For SMS and Pager messages it replicates message text which is also returned as an attachment """ to: Optional[List[GetMessageInfoResponseToItem]] = None """ Recipient information """ type: Optional[GetMessageInfoResponseType] = None """ Message type """ vm_transcription_status: Optional[GetMessageInfoResponseVmTranscriptionStatus] = None """ Voicemail only. Status of voicemail to text transcription. If VoicemailToText feature is not activated for account, the 'NotAvailable' value is returned """ cover_index: Optional[int] = None """ Cover page identifier. For the list of available cover page identifiers please call the Fax Cover Pages method """ cover_page_text: Optional[str] = None """ Cover page text, entered by the fax sender and printed on the cover page. Maximum length is limited to 1024 symbols """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateInternalTextMessageRequestFrom(DataClassJsonMixin): """ Sender of a pager message. """ extension_id: Optional[str] = None """ Extension identifier Example: `123456789` """ extension_number: Optional[str] = None """ Extension number Example: `105` """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateInternalTextMessageRequest(DataClassJsonMixin): """ Required Properties: - text Generated by Python OpenAPI Parser """ text: str """ Text of a pager message. Max length is 1024 symbols (2-byte UTF-16 encoded). If a character is encoded in 4 bytes in UTF-16 it is treated as 2 characters, thus restricting the maximum message length to 512 symbols Example: `hello world` """ from_: Optional[CreateInternalTextMessageRequestFrom] = field(metadata=config(field_name='from'), default=None) """ Sender of a pager message. """ reply_on: Optional[int] = None """ Internal identifier of a message this message replies to """ to: Optional[List[dict]] = None """ Optional if replyOn parameter is specified. Receiver of a pager message. """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListFaxCoverPagesResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a fax cover page. The possible value range is 0-13 (for language setting en-US) and 0, 15-28 (for all other languages) """ name: Optional[str] = None """ Name of a fax cover page pattern """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListFaxCoverPagesResponseNavigationFirstPage(DataClassJsonMixin): """ Canonical URI for the first page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListFaxCoverPagesResponseNavigation(DataClassJsonMixin): """ Information on navigation """ first_page: Optional[ListFaxCoverPagesResponseNavigationFirstPage] = None """ Canonical URI for the first page of the list """ next_page: Optional[dict] = None """ Canonical URI for the next page of the list """ previous_page: Optional[dict] = None """ Canonical URI for the previous page of the list """ last_page: Optional[dict] = None """ Canonical URI for the last page of the list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListFaxCoverPagesResponsePaging(DataClassJsonMixin): """ Information on paging """ page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) """ per_page: Optional[int] = None """ Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty """ total_pages: Optional[int] = None """ The total number of pages in a dataset. May be omitted for some resources due to performance reasons """ total_elements: Optional[int] = None """ The total number of elements in a dataset. May be omitted for some resource due to performance reasons """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListFaxCoverPagesResponse(DataClassJsonMixin): uri: Optional[str] = None records: Optional[List[ListFaxCoverPagesResponseRecordsItem]] = None navigation: Optional[ListFaxCoverPagesResponseNavigation] = None """ Information on navigation """ paging: Optional[ListFaxCoverPagesResponsePaging] = None """ Information on paging """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetMessageList(DataClassJsonMixin): """ Required Properties: - navigation - paging - records Generated by Python OpenAPI Parser """ records: list """ List of records with message information """ navigation: dict """ Information on navigation """ paging: dict """ Information on paging """ uri: Optional[str] = None """ Link to the list of user messages """ class GetMessageMultiResponseItemBodyAvailability(Enum): """ Message availability status. Message in 'Deleted' state is still preserved with all its attachments and can be restored. 'Purged' means that all attachments are already deleted and the message itself is about to be physically deleted shortly Generated by Python OpenAPI Parser """ Alive = 'Alive' Deleted = 'Deleted' Purged = 'Purged' class GetMessageMultiResponseItemBodyDirection(Enum): """ Message direction. Note that for some message types not all directions are allowed. For example voicemail messages can be only inbound Generated by Python OpenAPI Parser """ Inbound = 'Inbound' Outbound = 'Outbound' class GetMessageMultiResponseItemBodyFaxResolution(Enum): """ Fax only. Resolution of a fax message. 'High' for black and white image scanned at 200 dpi, 'Low' for black and white image scanned at 100 dpi Generated by Python OpenAPI Parser """ High = 'High' Low = 'Low' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetMessageMultiResponseItemBodyFrom(DataClassJsonMixin): """ Sender information """ extension_number: Optional[str] = None extension_id: Optional[str] = None name: Optional[str] = None class GetMessageMultiResponseItemBodyMessageStatus(Enum): """ Message status. Different message types may have different allowed status values.For outbound faxes the aggregated message status is returned: If status for at least one recipient is 'Queued', then 'Queued' value is returned If status for at least one recipient is 'SendingFailed', then 'SendingFailed' value is returned In other cases Sent status is returned Generated by Python OpenAPI Parser """ Queued = 'Queued' Sent = 'Sent' Delivered = 'Delivered' DeliveryFailed = 'DeliveryFailed' SendingFailed = 'SendingFailed' Received = 'Received' class GetMessageMultiResponseItemBodyPriority(Enum): """ Message priority """ Normal = 'Normal' High = 'High' class GetMessageMultiResponseItemBodyReadStatus(Enum): """ Message read status """ Read = 'Read' Unread = 'Unread' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetMessageMultiResponseItemBodyToItem(DataClassJsonMixin): extension_number: Optional[str] = None extension_id: Optional[str] = None name: Optional[str] = None class GetMessageMultiResponseItemBodyType(Enum): """ Message type """ Fax = 'Fax' SMS = 'SMS' VoiceMail = 'VoiceMail' Pager = 'Pager' Text = 'Text' class GetMessageMultiResponseItemBodyVmTranscriptionStatus(Enum): """ Voicemail only. Status of voicemail to text transcription. If VoicemailToText feature is not activated for account, the 'NotAvailable' value is returned Generated by Python OpenAPI Parser """ NotAvailable = 'NotAvailable' InProgress = 'InProgress' TimedOut = 'TimedOut' Completed = 'Completed' CompletedPartially = 'CompletedPartially' Failed = 'Failed' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetMessageMultiResponseItemBody(DataClassJsonMixin): uri: Optional[str] = None """ Canonical URI of a message """ id: Optional[str] = None """ Internal identifier of a message """ attachments: Optional[list] = None """ The list of message attachments """ availability: Optional[GetMessageMultiResponseItemBodyAvailability] = None """ Message availability status. Message in 'Deleted' state is still preserved with all its attachments and can be restored. 'Purged' means that all attachments are already deleted and the message itself is about to be physically deleted shortly """ conversation_id: Optional[int] = None """ SMS and Pager only. Identifier of a conversation the message belongs to """ conversation: Optional[dict] = None """ SMS and Pager only. Identifier of a conversation the message belongs to """ creation_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Message creation datetime in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z """ delivery_error_code: Optional[str] = None """ SMS only. Delivery error code returned by gateway """ direction: Optional[GetMessageMultiResponseItemBodyDirection] = None """ Message direction. Note that for some message types not all directions are allowed. For example voicemail messages can be only inbound """ fax_page_count: Optional[int] = None """ Fax only. Page count in a fax message """ fax_resolution: Optional[GetMessageMultiResponseItemBodyFaxResolution] = None """ Fax only. Resolution of a fax message. 'High' for black and white image scanned at 200 dpi, 'Low' for black and white image scanned at 100 dpi """ from_: Optional[GetMessageMultiResponseItemBodyFrom] = field(metadata=config(field_name='from'), default=None) """ Sender information """ last_modified_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ The datetime when the message was modified on server in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z """ message_status: Optional[GetMessageMultiResponseItemBodyMessageStatus] = None """ Message status. Different message types may have different allowed status values.For outbound faxes the aggregated message status is returned: If status for at least one recipient is 'Queued', then 'Queued' value is returned If status for at least one recipient is 'SendingFailed', then 'SendingFailed' value is returned In other cases Sent status is returned """ pg_to_department: Optional[bool] = None """ 'Pager' only. 'True' if at least one of the message recipients is 'Department' extension """ priority: Optional[GetMessageMultiResponseItemBodyPriority] = None """ Message priority """ read_status: Optional[GetMessageMultiResponseItemBodyReadStatus] = None """ Message read status """ sms_delivery_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ SMS only. The datetime when outbound SMS was delivered to recipient's handset in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z. It is filled only if the carrier sends a delivery receipt to RingCentral """ sms_sending_attempts_count: Optional[int] = None """ SMS only. Number of attempts made to send an outbound SMS to the gateway (if gateway is temporary unavailable) """ subject: Optional[str] = None """ Message subject. For SMS and Pager messages it replicates message text which is also returned as an attachment """ to: Optional[List[GetMessageMultiResponseItemBodyToItem]] = None """ Recipient information """ type: Optional[GetMessageMultiResponseItemBodyType] = None """ Message type """ vm_transcription_status: Optional[GetMessageMultiResponseItemBodyVmTranscriptionStatus] = None """ Voicemail only. Status of voicemail to text transcription. If VoicemailToText feature is not activated for account, the 'NotAvailable' value is returned """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetMessageMultiResponseItem(DataClassJsonMixin): resource_id: Optional[str] = None """ Internal identifier of a resource """ status: Optional[int] = None """ Status code of resource retrieval """ body: Optional[GetMessageMultiResponseItemBody] = None class GetMessageSyncResponseSyncInfoSyncType(Enum): """ Type of synchronization """ FSync = 'FSync' ISync = 'ISync' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetMessageSyncResponseSyncInfo(DataClassJsonMixin): """ Sync type, token and time """ sync_type: Optional[GetMessageSyncResponseSyncInfoSyncType] = None """ Type of synchronization """ sync_token: Optional[str] = None """ Synchronization token """ sync_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Last synchronization datetime in ISO 8601 format including timezone, for example 2016-03-10T18:07:52.534Z """ older_records_exist: Optional[bool] = False @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetMessageSyncResponse(DataClassJsonMixin): """ Required Properties: - records - sync_info Generated by Python OpenAPI Parser """ records: list """ List of message records with synchronization information """ sync_info: GetMessageSyncResponseSyncInfo """ Sync type, token and time """ uri: Optional[str] = None """ Link to the message sync resource """ class UpdateMessageRequestReadStatus(Enum): """ Read status of a message to be changed. Multiple values are accepted """ Read = 'Read' Unread = 'Unread' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateMessageRequest(DataClassJsonMixin): read_status: Optional[UpdateMessageRequestReadStatus] = None """ Read status of a message to be changed. Multiple values are accepted """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class MessageStoreConfiguration(DataClassJsonMixin): retention_period: Optional[int] = None """ Retention policy setting, specifying how long to keep messages; the supported value range is 7-90 days """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class MakeRingOutRequestFrom(DataClassJsonMixin): """ Phone number of the caller. This number corresponds to the 1st leg of the RingOut call. This number can be one of user's configured forwarding numbers or arbitrary number Generated by Python OpenAPI Parser """ phone_number: Optional[str] = None """ Phone number in E.164 format """ forwarding_number_id: Optional[str] = None """ Internal identifier of a forwarding number; returned in response as an 'id' field value. Can be specified instead of the phoneNumber attribute """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class MakeRingOutRequestTo(DataClassJsonMixin): """ Phone number of the called party. This number corresponds to the 2nd leg of a RingOut call """ phone_number: Optional[str] = None """ Phone number in E.164 format """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class MakeRingOutRequestCountry(DataClassJsonMixin): """ Optional. Dialing plan country data. If not specified, then extension home country is applied by default Generated by Python OpenAPI Parser """ id: Optional[str] = None """ Dialing plan country identifier """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class MakeRingOutRequest(DataClassJsonMixin): """ Required Properties: - from_ - to Generated by Python OpenAPI Parser """ from_: MakeRingOutRequestFrom = field(metadata=config(field_name='from')) """ Phone number of the caller. This number corresponds to the 1st leg of the RingOut call. This number can be one of user's configured forwarding numbers or arbitrary number """ to: MakeRingOutRequestTo """ Phone number of the called party. This number corresponds to the 2nd leg of a RingOut call """ caller_id: Optional[dict] = None """ The number which will be displayed to the called party """ play_prompt: Optional[bool] = None """ The audio prompt that the calling party hears when the call is connected """ country: Optional[MakeRingOutRequestCountry] = None """ Optional. Dialing plan country data. If not specified, then extension home country is applied by default """ class GetRingOutStatusResponseStatusCallStatus(Enum): """ Status of a call """ Invalid = 'Invalid' Success = 'Success' InProgress = 'InProgress' Busy = 'Busy' NoAnswer = 'NoAnswer' Rejected = 'Rejected' GenericError = 'GenericError' Finished = 'Finished' InternationalDisabled = 'InternationalDisabled' DestinationBlocked = 'DestinationBlocked' NotEnoughFunds = 'NotEnoughFunds' NoSuchUser = 'NoSuchUser' class GetRingOutStatusResponseStatusCallerStatus(Enum): """ Status of a calling party """ Invalid = 'Invalid' Success = 'Success' InProgress = 'InProgress' Busy = 'Busy' NoAnswer = 'NoAnswer' Rejected = 'Rejected' GenericError = 'GenericError' Finished = 'Finished' InternationalDisabled = 'InternationalDisabled' DestinationBlocked = 'DestinationBlocked' NotEnoughFunds = 'NotEnoughFunds' NoSuchUser = 'NoSuchUser' class GetRingOutStatusResponseStatusCalleeStatus(Enum): """ Status of a called party """ Invalid = 'Invalid' Success = 'Success' InProgress = 'InProgress' Busy = 'Busy' NoAnswer = 'NoAnswer' Rejected = 'Rejected' GenericError = 'GenericError' Finished = 'Finished' InternationalDisabled = 'InternationalDisabled' DestinationBlocked = 'DestinationBlocked' NotEnoughFunds = 'NotEnoughFunds' NoSuchUser = 'NoSuchUser' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetRingOutStatusResponseStatus(DataClassJsonMixin): """ RingOut status information """ call_status: Optional[GetRingOutStatusResponseStatusCallStatus] = None """ Status of a call """ caller_status: Optional[GetRingOutStatusResponseStatusCallerStatus] = None """ Status of a calling party """ callee_status: Optional[GetRingOutStatusResponseStatusCalleeStatus] = None """ Status of a called party """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetRingOutStatusResponse(DataClassJsonMixin): id: Optional[int] = None """ Internal identifier of a RingOut call """ uri: Optional[str] = None status: Optional[GetRingOutStatusResponseStatus] = None """ RingOut status information """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetRingOutStatusResponseIntId(DataClassJsonMixin): id: Optional[int] = None """ Internal identifier of a RingOut call """ uri: Optional[str] = None status: Optional[dict] = None """ RingOut status information """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class FavoriteCollectionRecordsItem(DataClassJsonMixin): id: Optional[int] = None extension_id: Optional[str] = None account_id: Optional[str] = None contact_id: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class FavoriteCollection(DataClassJsonMixin): records: Optional[List[FavoriteCollectionRecordsItem]] = None class ContactListRecordsItemAvailability(Enum): """ This property has a special meaning only on Address Book Sync (e.g. a contact can be `Deleted`). For simple contact list reading it has always the default value - `Alive` Generated by Python OpenAPI Parser """ Alive = 'Alive' Deleted = 'Deleted' Purged = 'Purged' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ContactListRecordsItemBusinessAddress(DataClassJsonMixin): street: Optional[str] = None """ Street address Example: `20 Davis Dr.` """ city: Optional[str] = None """ City name Example: `Belmont` """ country: Optional[str] = None """ Country name """ state: Optional[str] = None """ State/province name Example: `CA` """ zip: Optional[str] = None """ Zip/Postal code Example: `94002` """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ContactListRecordsItem(DataClassJsonMixin): uri: Optional[str] = None """ Canonical URI of the contact Example: `https://platform.ringcentral.com/restapi/v1.0/account/230919004/extension/230919004/address-book/contact/623045004` """ availability: Optional[ContactListRecordsItemAvailability] = None """ This property has a special meaning only on Address Book Sync (e.g. a contact can be `Deleted`). For simple contact list reading it has always the default value - `Alive` """ email: Optional[str] = None """ Email of the contact Example: `charlie.williams@example.com` """ id: Optional[int] = None """ Internal identifier of the contact Example: `623045004` """ notes: Optional[str] = None """ Notes for the contact Example: `#1 Customer` """ company: Optional[str] = None """ Company name of the contact Example: `Example, Inc.` """ first_name: Optional[str] = None """ First name of the contact Example: `Charlie` """ last_name: Optional[str] = None """ Last name of the contact Example: `Williams` """ job_title: Optional[str] = None """ Job title of the contact Example: `CEO` """ birthday: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Date of birth of the contact """ web_page: Optional[str] = None """ The contact home page URL Example: `http://www.example.com` """ middle_name: Optional[str] = None """ Middle name of the contact Example: `J` """ nick_name: Optional[str] = None """ Nick name of the contact Example: `The Boss` """ email2: Optional[str] = None """ 2nd email of the contact Example: `charlie-example@gmail.com` """ email3: Optional[str] = None """ 3rd email of the contact Example: `theboss-example@hotmail.com` """ home_phone: Optional[str] = None """ Home phone number of the contact in e.164 (with "+") format Example: `+15551234567` """ home_phone2: Optional[str] = None """ 2nd home phone number of the contact in e.164 (with "+") format Example: `+15551234567` """ business_phone: Optional[str] = None """ Business phone of the contact in e.164 (with "+") format Example: `+15551234567` """ business_phone2: Optional[str] = None """ 2nd business phone of the contact in e.164 (with "+") format Example: `+15551234567` """ mobile_phone: Optional[str] = None """ Mobile phone of the contact in e.164 (with "+") format Example: `+15551234567` """ business_fax: Optional[str] = None """ Business fax number of the contact in e.164 (with "+") format Example: `+15551234567` """ company_phone: Optional[str] = None """ Company number of the contact in e.164 (with "+") format Example: `+15551234567` """ assistant_phone: Optional[str] = None """ Phone number of the contact assistant in e.164 (with "+") format Example: `+15551234567` """ car_phone: Optional[str] = None """ Car phone number of the contact in e.164 (with "+") format Example: `+15551234567` """ other_phone: Optional[str] = None """ Other phone number of the contact in e.164 (with "+") format Example: `+15551234567` """ other_fax: Optional[str] = None """ Other fax number of the contact in e.164 (with "+") format Example: `+15551234567` """ callback_phone: Optional[str] = None """ Callback phone number of the contact in e.164 (with "+") format Example: `+15551234567` """ business_address: Optional[ContactListRecordsItemBusinessAddress] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ContactListNavigationFirstPage(DataClassJsonMixin): """ Canonical URI for the first page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ContactListNavigation(DataClassJsonMixin): """ Information on navigation """ first_page: Optional[ContactListNavigationFirstPage] = None """ Canonical URI for the first page of the list """ next_page: Optional[dict] = None """ Canonical URI for the next page of the list """ previous_page: Optional[dict] = None """ Canonical URI for the previous page of the list """ last_page: Optional[dict] = None """ Canonical URI for the last page of the list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ContactListPaging(DataClassJsonMixin): """ Information on paging """ page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) """ per_page: Optional[int] = None """ Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty """ total_pages: Optional[int] = None """ The total number of pages in a dataset. May be omitted for some resources due to performance reasons """ total_elements: Optional[int] = None """ The total number of elements in a dataset. May be omitted for some resource due to performance reasons """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ContactListGroups(DataClassJsonMixin): """ Information on address book groups """ uri: Optional[str] = None """ Link to the list of address book groups """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ContactList(DataClassJsonMixin): uri: Optional[str] = None """ link to the list of user personal contacts """ records: Optional[List[ContactListRecordsItem]] = None """ List of personal contacts from the extension address book """ navigation: Optional[ContactListNavigation] = None """ Information on navigation """ paging: Optional[ContactListPaging] = None """ Information on paging """ groups: Optional[ContactListGroups] = None """ Information on address book groups """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class PersonalContactRequest(DataClassJsonMixin): first_name: Optional[str] = None """ First name of the contact Example: `Charlie` """ last_name: Optional[str] = None """ Last name of the contact Example: `Williams` """ middle_name: Optional[str] = None """ Middle name of the contact Example: `J` """ nick_name: Optional[str] = None """ Nick name of the contact Example: `The Boss` """ company: Optional[str] = None """ Company name of the contact Example: `Example, Inc.` """ job_title: Optional[str] = None """ Job title of the contact Example: `CEO` """ email: Optional[str] = None """ Email of the contact Example: `charlie.williams@example.com` """ email2: Optional[str] = None """ 2nd email of the contact Example: `charlie-example@gmail.com` """ email3: Optional[str] = None """ 3rd email of the contact Example: `theboss-example@hotmail.com` """ birthday: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Date of birth of the contact """ web_page: Optional[str] = None """ The contact home page URL Example: `http://www.example.com` """ notes: Optional[str] = None """ Notes for the contact Example: `#1 Customer` """ home_phone: Optional[str] = None """ Home phone number of the contact in e.164 (with "+") format Example: `+15551234567` """ home_phone2: Optional[str] = None """ 2nd home phone number of the contact in e.164 (with "+") format Example: `+15551234567` """ business_phone: Optional[str] = None """ Business phone of the contact in e.164 (with "+") format Example: `+15551234567` """ business_phone2: Optional[str] = None """ 2nd business phone of the contact in e.164 (with "+") format Example: `+15551234567` """ mobile_phone: Optional[str] = None """ Mobile phone of the contact in e.164 (with "+") format Example: `+15551234567` """ business_fax: Optional[str] = None """ Business fax number of the contact in e.164 (with "+") format Example: `+15551234567` """ company_phone: Optional[str] = None """ Company number of the contact in e.164 (with "+") format Example: `+15551234567` """ assistant_phone: Optional[str] = None """ Phone number of the contact assistant in e.164 (with "+") format Example: `+15551234567` """ car_phone: Optional[str] = None """ Car phone number of the contact in e.164 (with "+") format Example: `+15551234567` """ other_phone: Optional[str] = None """ Other phone number of the contact in e.164 (with "+") format Example: `+15551234567` """ other_fax: Optional[str] = None """ Other fax number of the contact in e.164 (with "+") format Example: `+15551234567` """ callback_phone: Optional[str] = None """ Callback phone number of the contact in e.164 (with "+") format Example: `+15551234567` """ class AddressBookSyncSyncInfoSyncType(Enum): FSync = 'FSync' ISync = 'ISync' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AddressBookSyncSyncInfo(DataClassJsonMixin): sync_type: Optional[AddressBookSyncSyncInfoSyncType] = None sync_token: Optional[str] = None sync_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) older_records_exist: Optional[bool] = False @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AddressBookSync(DataClassJsonMixin): uri: Optional[str] = None records: Optional[list] = None sync_info: Optional[AddressBookSyncSyncInfo] = None next_page_id: Optional[int] = None next_page_uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class FavoriteContactList(DataClassJsonMixin): uri: Optional[str] = None records: Optional[list] = None class SearchDirectoryEntriesRequestSearchFieldsItem(Enum): FirstName = 'firstName' LastName = 'lastName' ExtensionNumber = 'extensionNumber' PhoneNumber = 'phoneNumber' Email = 'email' JobTitle = 'jobTitle' Department = 'department' class SearchDirectoryEntriesRequestExtensionType(Enum): """ Type of extension to filter the contacts """ User = 'User' Department = 'Department' Announcement = 'Announcement' Voicemail = 'Voicemail' SharedLinesGroup = 'SharedLinesGroup' PagingOnly = 'PagingOnly' ParkLocation = 'ParkLocation' IvrMenu = 'IvrMenu' Limited = 'Limited' ApplicationExtension = 'ApplicationExtension' Site = 'Site' Bot = 'Bot' ProxyAdmin = 'ProxyAdmin' class SearchDirectoryEntriesRequestOrderByItemFieldName(Enum): """ Field name by which to sort the contacts """ FirstName = 'firstName' LastName = 'lastName' ExtensionNumber = 'extensionNumber' PhoneNumber = 'phoneNumber' Email = 'email' JobTitle = 'jobTitle' Department = 'department' class SearchDirectoryEntriesRequestOrderByItemDirection(Enum): """ Sorting direction """ Asc = 'Asc' Desc = 'Desc' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SearchDirectoryEntriesRequestOrderByItem(DataClassJsonMixin): index: Optional[int] = None """ Sorting priority index, starting from '1'. Optional if only one element in `orderBy` array is specified """ field_name: Optional[SearchDirectoryEntriesRequestOrderByItemFieldName] = None """ Field name by which to sort the contacts """ direction: Optional[SearchDirectoryEntriesRequestOrderByItemDirection] = None """ Sorting direction """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SearchDirectoryEntriesRequest(DataClassJsonMixin): search_string: Optional[str] = None """ String value to filter the contacts. The value specified is searched through the following fields: `firstName`, `lastName`, `extensionNumber`, `phoneNumber`, `email`, `jobTitle`, `department` """ search_fields: Optional[List[SearchDirectoryEntriesRequestSearchFieldsItem]] = field(default_factory=lambda: ['firstName', 'lastName', 'extensionNumber', 'phoneNumber', 'email']) show_federated: Optional[bool] = True """ If 'True' then contacts of all accounts in federation are returned. If 'False' then only contacts of the current account are returned, and account section is eliminated in this case """ extension_type: Optional[SearchDirectoryEntriesRequestExtensionType] = None """ Type of extension to filter the contacts """ order_by: Optional[List[SearchDirectoryEntriesRequestOrderByItem]] = None """ Sorting settings """ page: Optional[int] = None per_page: Optional[int] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class DirectoryResourcePaging(DataClassJsonMixin): page: Optional[int] = None total_pages: Optional[int] = None per_page: Optional[int] = None total_elements: Optional[int] = None page_start: Optional[int] = None page_end: Optional[int] = None class DirectoryResourceRecordsItemAccountMainNumberUsageType(Enum): """ Usage type of a phone number """ MobileNumber = 'MobileNumber' ContactNumber = 'ContactNumber' DirectNumber = 'DirectNumber' ForwardedNumber = 'ForwardedNumber' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class DirectoryResourceRecordsItemAccountMainNumber(DataClassJsonMixin): formatted_phone_number: Optional[str] = None phone_number: Optional[str] = None type: Optional[str] = None label: Optional[str] = None """ Custom user name of a phone number, if any """ usage_type: Optional[DirectoryResourceRecordsItemAccountMainNumberUsageType] = None """ Usage type of a phone number """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class DirectoryResourceRecordsItemAccount(DataClassJsonMixin): company_name: Optional[str] = None federated_name: Optional[str] = None id: Optional[str] = None main_number: Optional[DirectoryResourceRecordsItemAccountMainNumber] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class DirectoryResourceRecordsItemProfileImage(DataClassJsonMixin): etag: Optional[str] = None uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class DirectoryResourceRecordsItemSite(DataClassJsonMixin): id: Optional[str] = None name: Optional[str] = None code: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class DirectoryResourceRecordsItem(DataClassJsonMixin): account: Optional[DirectoryResourceRecordsItemAccount] = None department: Optional[str] = None email: Optional[str] = None extension_number: Optional[str] = None first_name: Optional[str] = None """ First name of a contact, for user extensions only """ last_name: Optional[str] = None """ Last name of a contact, for user extensions only """ name: Optional[str] = None """ Name of a contact, for non-user extensions """ id: Optional[str] = None job_title: Optional[str] = None phone_numbers: Optional[list] = None profile_image: Optional[DirectoryResourceRecordsItemProfileImage] = None site: Optional[DirectoryResourceRecordsItemSite] = None status: Optional[str] = None type: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class DirectoryResource(DataClassJsonMixin): paging: Optional[DirectoryResourcePaging] = None records: Optional[List[DirectoryResourceRecordsItem]] = None class ErrorResponseErrorsItemErrorCode(Enum): """ Code that characterizes this error. Code uniqly identifies the source of the error. """ ErrorCodeCode_ADG_000HttpStatus_503Description_ServiceTemporaryUnavailable = "ErrorCode{code='ADG-000', httpStatus=503, description='Service temporary unavailable.'}" ErrorCodeCode_ADG_010HttpStatus_503Description_FederationDataTemporaryUnavailable = "ErrorCode{code='ADG-010', httpStatus=503, description='Federation data temporary unavailable.'}" ErrorCodeCode_ADG_001HttpStatus_500Description_ServiceInternalError = "ErrorCode{code='ADG-001', httpStatus=500, description='Service internal error.'}" ErrorCodeCode_ADG_100HttpStatus_403Description_InsufficientPermissions = "ErrorCode{code='ADG-100', httpStatus=403, description='Insufficient permissions.'}" ErrorCodeCode_ADG_101HttpStatus_403Description_UnauthorizedAccess = "ErrorCode{code='ADG-101', httpStatus=403, description='Unauthorized access.'}" ErrorCodeCode_ADG_102HttpStatus_405Description_MethodNotAllowed = "ErrorCode{code='ADG-102', httpStatus=405, description='Method not allowed.'}" ErrorCodeCode_ADG_111HttpStatus_400Description_Need_Content_TypeHeader = "ErrorCode{code='ADG-111', httpStatus=400, description='Need Content-Type header.'}" ErrorCodeCode_ADG_112HttpStatus_400Description_RequestBodyIsInvalid = "ErrorCode{code='ADG-112', httpStatus=400, description='Request body is invalid.'}" ErrorCodeCode_ADG_121HttpStatus_400Description_ParameterParamNameIsInvalidAdditionalInfo = "ErrorCode{code='ADG-121', httpStatus=400, description='Parameter [${paramName}] is invalid. ${additionalInfo:-}'}" ErrorCodeCode_ADG_115HttpStatus_415Description_Unsupported_Media_Type = "ErrorCode{code='ADG-115', httpStatus=415, description='Unsupported Media Type.'}" ErrorCodeCode_ADG_105HttpStatus_404Description_CurrentAccountIsNotLinkedToAnyFederation = "ErrorCode{code='ADG-105', httpStatus=404, description='Current account is not linked to any federation.'}" ErrorCodeCode_ADG_107HttpStatus_404Description_AccountNotFound = "ErrorCode{code='ADG-107', httpStatus=404, description='Account not found.'}" ErrorCodeCode_ADG_122HttpStatus_404Description_ContactNotFound = "ErrorCode{code='ADG-122', httpStatus=404, description='Contact not found.'}" ErrorCodeCode_ADG_200HttpStatus_404Description_Invalid_URI = "ErrorCode{code=''ADG-200'', httpStatus=404, description=''Invalid URI''}" @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ErrorResponseErrorsItem(DataClassJsonMixin): """ Description of an error occurred during request processing. This data type can be used only in readonly mode, no writing is allowed Generated by Python OpenAPI Parser """ error_code: Optional[ErrorResponseErrorsItemErrorCode] = None """ Code that characterizes this error. Code uniqly identifies the source of the error. """ message: Optional[str] = None """ Message that describes the error. This message can be used in UI. """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ErrorResponse(DataClassJsonMixin): """ Format of response in case that any error occured during request processing """ errors: Optional[List[ErrorResponseErrorsItem]] = None """ Collection of all gathered errors """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class FederationResourceAccountsItem(DataClassJsonMixin): company_name: Optional[str] = None conflict_count: Optional[int] = None federated_name: Optional[str] = None id: Optional[str] = None link_creation_time: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class FederationResource(DataClassJsonMixin): accounts: Optional[List[FederationResourceAccountsItem]] = None creation_time: Optional[str] = None display_name: Optional[str] = None id: Optional[str] = None last_modified_time: Optional[str] = None class GetPresenceInfoDndStatus(Enum): """ Extended DnD (Do not Disturb) status. Cannot be set for Department/Announcement/Voicemail (Take Messages Only)/Fax User/Shared Lines Group/Paging Only Group/IVR Menu/Application Extension/Park Location extensions. The 'DoNotAcceptDepartmentCalls' and 'TakeDepartmentCallsOnly' values are applicable only for extensions - members of a Department; if these values are set for department outsiders, the 400 Bad Request error code is returned. The 'TakeDepartmentCallsOnly' status can be set through the old RingCentral user interface and is available for some migrated accounts only. Generated by Python OpenAPI Parser """ TakeAllCalls = 'TakeAllCalls' DoNotAcceptAnyCalls = 'DoNotAcceptAnyCalls' DoNotAcceptDepartmentCalls = 'DoNotAcceptDepartmentCalls' TakeDepartmentCallsOnly = 'TakeDepartmentCallsOnly' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetPresenceInfoExtension(DataClassJsonMixin): """ Information on extension, for which this presence data is returned """ id: Optional[int] = None """ Internal identifier of an extension """ uri: Optional[str] = None """ Canonical URI of an extension """ extension_number: Optional[str] = None """ Extension number (usually 3 or 4 digits) """ class GetPresenceInfoPresenceStatus(Enum): """ Aggregated presence status, calculated from a number of sources """ Offline = 'Offline' Busy = 'Busy' Available = 'Available' class GetPresenceInfoTelephonyStatus(Enum): """ Telephony presence status """ NoCall = 'NoCall' CallConnected = 'CallConnected' Ringing = 'Ringing' OnHold = 'OnHold' ParkedCall = 'ParkedCall' class GetPresenceInfoUserStatus(Enum): """ User-defined presence status (as previously published by the user) """ Offline = 'Offline' Busy = 'Busy' Available = 'Available' class GetPresenceInfoMeetingStatus(Enum): """ RingCentral Meetings presence """ Connected = 'Connected' Disconnected = 'Disconnected' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetPresenceInfo(DataClassJsonMixin): uri: Optional[str] = None """ Canonical URI of a presence info resource """ allow_see_my_presence: Optional[bool] = None """ If 'True' enables other extensions to see the extension presence status """ dnd_status: Optional[GetPresenceInfoDndStatus] = None """ Extended DnD (Do not Disturb) status. Cannot be set for Department/Announcement/Voicemail (Take Messages Only)/Fax User/Shared Lines Group/Paging Only Group/IVR Menu/Application Extension/Park Location extensions. The 'DoNotAcceptDepartmentCalls' and 'TakeDepartmentCallsOnly' values are applicable only for extensions - members of a Department; if these values are set for department outsiders, the 400 Bad Request error code is returned. The 'TakeDepartmentCallsOnly' status can be set through the old RingCentral user interface and is available for some migrated accounts only. """ extension: Optional[GetPresenceInfoExtension] = None """ Information on extension, for which this presence data is returned """ message: Optional[str] = None """ Custom status message (as previously published by user) """ pick_up_calls_on_hold: Optional[bool] = None """ If 'True' enables the extension user to pick up a monitored line on hold """ presence_status: Optional[GetPresenceInfoPresenceStatus] = None """ Aggregated presence status, calculated from a number of sources """ ring_on_monitored_call: Optional[bool] = None """ If 'True' enables to ring extension phone, if any user monitored by this extension is ringing """ telephony_status: Optional[GetPresenceInfoTelephonyStatus] = None """ Telephony presence status """ user_status: Optional[GetPresenceInfoUserStatus] = None """ User-defined presence status (as previously published by the user) """ meeting_status: Optional[GetPresenceInfoMeetingStatus] = None """ RingCentral Meetings presence """ active_calls: Optional[list] = None """ Information on active calls """ class PresenceInfoResourceUserStatus(Enum): Offline = 'Offline' Busy = 'Busy' Available = 'Available' class PresenceInfoResourceDndStatus(Enum): TakeAllCalls = 'TakeAllCalls' DoNotAcceptDepartmentCalls = 'DoNotAcceptDepartmentCalls' TakeDepartmentCallsOnly = 'TakeDepartmentCallsOnly' DoNotAcceptAnyCalls = 'DoNotAcceptAnyCalls' Unknown = 'Unknown' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class PresenceInfoResource(DataClassJsonMixin): user_status: Optional[PresenceInfoResourceUserStatus] = None dnd_status: Optional[PresenceInfoResourceDndStatus] = None message: Optional[str] = None allow_see_my_presence: Optional[bool] = False ring_on_monitored_call: Optional[bool] = False pick_up_calls_on_hold: Optional[bool] = False active_calls: Optional[list] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallQueueUpdatePresenceRecordsItemMember(DataClassJsonMixin): """ Call queue member information """ id: Optional[str] = None """ Internal identifier of an extension - queue member """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallQueueUpdatePresenceRecordsItem(DataClassJsonMixin): member: Optional[CallQueueUpdatePresenceRecordsItemMember] = None """ Call queue member information """ accept_current_queue_calls: Optional[bool] = None """ Call queue member availability for calls of this queue """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallQueueUpdatePresence(DataClassJsonMixin): records: Optional[List[CallQueueUpdatePresenceRecordsItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AccountPresenceInfoNavigationFirstPage(DataClassJsonMixin): """ Canonical URI for the first page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AccountPresenceInfoNavigation(DataClassJsonMixin): """ Information on navigation """ first_page: Optional[AccountPresenceInfoNavigationFirstPage] = None """ Canonical URI for the first page of the list """ next_page: Optional[dict] = None """ Canonical URI for the next page of the list """ previous_page: Optional[dict] = None """ Canonical URI for the previous page of the list """ last_page: Optional[dict] = None """ Canonical URI for the last page of the list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AccountPresenceInfoPaging(DataClassJsonMixin): """ Information on paging """ page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) """ per_page: Optional[int] = None """ Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty """ total_pages: Optional[int] = None """ The total number of pages in a dataset. May be omitted for some resources due to performance reasons """ total_elements: Optional[int] = None """ The total number of elements in a dataset. May be omitted for some resource due to performance reasons """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AccountPresenceInfo(DataClassJsonMixin): uri: Optional[str] = None """ Canonical URI of account presence resource """ records: Optional[list] = None """ List of Prompts """ navigation: Optional[AccountPresenceInfoNavigation] = None """ Information on navigation """ paging: Optional[AccountPresenceInfoPaging] = None """ Information on paging """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ExtensionCallQueuePresenceListRecordsItemCallQueue(DataClassJsonMixin): """ Call queue information """ id: Optional[str] = None """ Internal identifier of a call queue """ name: Optional[str] = None """ Name of a call queue """ extension_number: Optional[str] = None """ Extension number of a call queue """ editable_member_status: Optional[bool] = None """ Flag allow members to change their queue status """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ExtensionCallQueuePresenceListRecordsItem(DataClassJsonMixin): call_queue: Optional[ExtensionCallQueuePresenceListRecordsItemCallQueue] = None """ Call queue information """ accept_calls: Optional[bool] = None """ Call queue agent availability for calls of this queue """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ExtensionCallQueuePresenceList(DataClassJsonMixin): records: Optional[List[ExtensionCallQueuePresenceListRecordsItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ExtensionCallQueueUpdatePresenceListRecordsItemCallQueue(DataClassJsonMixin): """ Call queue information """ id: Optional[str] = None """ Internal identifier of a call queue """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ExtensionCallQueueUpdatePresenceListRecordsItem(DataClassJsonMixin): call_queue: Optional[ExtensionCallQueueUpdatePresenceListRecordsItemCallQueue] = None """ Call queue information """ accept_calls: Optional[bool] = None """ Call queue agent availability for calls of this queue """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ExtensionCallQueueUpdatePresenceList(DataClassJsonMixin): records: Optional[List[ExtensionCallQueueUpdatePresenceListRecordsItem]] = None class PresenceInfoResponseUserStatus(Enum): Offline = 'Offline' Busy = 'Busy' Available = 'Available' class PresenceInfoResponseDndStatus(Enum): TakeAllCalls = 'TakeAllCalls' DoNotAcceptDepartmentCalls = 'DoNotAcceptDepartmentCalls' TakeDepartmentCallsOnly = 'TakeDepartmentCallsOnly' DoNotAcceptAnyCalls = 'DoNotAcceptAnyCalls' Unknown = 'Unknown' class PresenceInfoResponseMeetingStatus(Enum): """ Meetings presence status """ Connected = 'Connected' Disconnected = 'Disconnected' class PresenceInfoResponseTelephonyStatus(Enum): """ Telephony presence status. Returned if telephony status is changed """ NoCall = 'NoCall' CallConnected = 'CallConnected' Ringing = 'Ringing' OnHold = 'OnHold' ParkedCall = 'ParkedCall' class PresenceInfoResponsePresenceStatus(Enum): """ Aggregated presence status, calculated from a number of sources """ Offline = 'Offline' Busy = 'Busy' Available = 'Available' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class PresenceInfoResponse(DataClassJsonMixin): uri: Optional[str] = None """ Link to the presence resource """ user_status: Optional[PresenceInfoResponseUserStatus] = None dnd_status: Optional[PresenceInfoResponseDndStatus] = None message: Optional[str] = None allow_see_my_presence: Optional[bool] = False ring_on_monitored_call: Optional[bool] = False pick_up_calls_on_hold: Optional[bool] = False active_calls: Optional[list] = None extension: Optional[dict] = None meeting_status: Optional[PresenceInfoResponseMeetingStatus] = None """ Meetings presence status """ telephony_status: Optional[PresenceInfoResponseTelephonyStatus] = None """ Telephony presence status. Returned if telephony status is changed """ presence_status: Optional[PresenceInfoResponsePresenceStatus] = None """ Aggregated presence status, calculated from a number of sources """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallQueuePresenceRecordsItemMemberSite(DataClassJsonMixin): """ Extension site """ id: Optional[str] = None """ Site extension identifier """ name: Optional[str] = None """ Site extension name """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallQueuePresenceRecordsItemMember(DataClassJsonMixin): """ Call queue member information """ id: Optional[str] = None """ Internal identifier of an extension """ name: Optional[str] = None """ Extension full name """ extension_number: Optional[str] = None """ Extension number """ site: Optional[CallQueuePresenceRecordsItemMemberSite] = None """ Extension site """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallQueuePresenceRecordsItem(DataClassJsonMixin): member: Optional[CallQueuePresenceRecordsItemMember] = None """ Call queue member information """ accept_queue_calls: Optional[bool] = None """ Private member telephony availability status applied to calls of all queues """ accept_current_queue_calls: Optional[bool] = None """ Call queue member availability in this particular queue """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallQueuePresence(DataClassJsonMixin): records: Optional[List[CallQueuePresenceRecordsItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GlipPersonInfo(DataClassJsonMixin): """ Required Properties: - id Generated by Python OpenAPI Parser """ id: str """ Internal identifier of a user """ first_name: Optional[str] = None """ First name of a user """ last_name: Optional[str] = None """ Last name of a user """ email: Optional[str] = None """ Email of a user """ avatar: Optional[str] = None """ Photo of a user """ company_id: Optional[str] = None """ Internal identifier of a company """ creation_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Time of creation in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format """ last_modified_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Time of the last modification in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GlipPostMembersIdsListBody(DataClassJsonMixin): """ Required Properties: - members Generated by Python OpenAPI Parser """ members: list """ Identifier(s) of chat members. """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GlipPatchPostBody(DataClassJsonMixin): text: Optional[str] = None """ Post text. """ class GlipPostsRecordsItemType(Enum): """ Type of a post """ TextMessage = 'TextMessage' PersonJoined = 'PersonJoined' PersonsAdded = 'PersonsAdded' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GlipPostsRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a post """ group_id: Optional[str] = None """ Internal identifier of a group a post belongs to """ type: Optional[GlipPostsRecordsItemType] = None """ Type of a post """ text: Optional[str] = None """ For 'TextMessage' post type only. Text of a message """ creator_id: Optional[str] = None """ Internal identifier of a user - author of a post """ added_person_ids: Optional[List[str]] = None """ For 'PersonsAdded' post type only. Identifiers of persons added to a group """ creation_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Post creation datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format """ last_modified_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Post last modification datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format """ attachments: Optional[list] = None """ List of posted attachments """ mentions: Optional[list] = None activity: Optional[str] = None """ Label of activity type """ title: Optional[str] = None """ Title of a message. (Can be set for bot's messages only) """ icon_uri: Optional[str] = None """ Link to an image used as an icon for this message """ icon_emoji: Optional[str] = None """ Emoji used as an icon for this message """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GlipPosts(DataClassJsonMixin): """ Required Properties: - records Generated by Python OpenAPI Parser """ records: List[GlipPostsRecordsItem] """ List of posts """ class GlipTaskInfoType(Enum): """ Type of a task """ Task = 'Task' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GlipTaskInfoCreator(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a user who created a note/task """ class GlipTaskInfoStatus(Enum): """ Status of task execution """ Pending = 'Pending' InProgress = 'InProgress' Completed = 'Completed' class GlipTaskInfoAssigneesItemStatus(Enum): """ Status of the task execution by assignee """ Pending = 'Pending' Completed = 'Completed' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GlipTaskInfoAssigneesItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an assignee """ status: Optional[GlipTaskInfoAssigneesItemStatus] = None """ Status of the task execution by assignee """ class GlipTaskInfoCompletenessCondition(Enum): """ Specifies how to determine task completeness """ Simple = 'Simple' AllAssignees = 'AllAssignees' Percentage = 'Percentage' class GlipTaskInfoColor(Enum): """ Font color of a post with the current task """ Black = 'Black' Red = 'Red' Orange = 'Orange' Yellow = 'Yellow' Green = 'Green' Blue = 'Blue' Purple = 'Purple' Magenta = 'Magenta' class GlipTaskInfoRecurrenceSchedule(Enum): """ Task recurrence settings. For non-periodic tasks the value is 'None' """ None_ = 'None' Daily = 'Daily' Weekdays = 'Weekdays' Weekly = 'Weekly' Monthly = 'Monthly' Yearly = 'Yearly' class GlipTaskInfoRecurrenceEndingCondition(Enum): """ Task ending condition """ None_ = 'None' Count = 'Count' Date = 'Date' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GlipTaskInfoRecurrence(DataClassJsonMixin): schedule: Optional[GlipTaskInfoRecurrenceSchedule] = None """ Task recurrence settings. For non-periodic tasks the value is 'None' """ ending_condition: Optional[GlipTaskInfoRecurrenceEndingCondition] = None """ Task ending condition """ ending_after: Optional[int] = None """ Count of iterations of periodic tasks """ ending_on: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ End date of periodic task """ class GlipTaskInfoAttachmentsItemType(Enum): """ Attachment type (currently only `File` value is supported). """ File = 'File' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GlipTaskInfoAttachmentsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a file """ type: Optional[GlipTaskInfoAttachmentsItemType] = None """ Attachment type (currently only `File` value is supported). """ name: Optional[str] = None """ Name of the attached file (including extension name). """ content_uri: Optional[str] = None """ Link to an attachment content """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GlipTaskInfo(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a task """ creation_time: Optional[str] = None """ Datetime of the task creation in UTC time zone. """ last_modified_time: Optional[str] = None """ Datetime of the last modification of the task in UTC time zone. """ type: Optional[GlipTaskInfoType] = None """ Type of a task """ creator: Optional[GlipTaskInfoCreator] = None chat_ids: Optional[List[str]] = None """ Chat IDs where the task is posted or shared. """ status: Optional[GlipTaskInfoStatus] = None """ Status of task execution """ subject: Optional[str] = None """ Name/subject of a task """ assignees: Optional[List[GlipTaskInfoAssigneesItem]] = None completeness_condition: Optional[GlipTaskInfoCompletenessCondition] = None """ Specifies how to determine task completeness """ completeness_percentage: Optional[int] = None """ Current completeness percentage of the task with the specified percentage completeness condition """ start_date: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Task start date """ due_date: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Task due date/time """ color: Optional[GlipTaskInfoColor] = None """ Font color of a post with the current task """ section: Optional[str] = None """ Task section to group/search by """ description: Optional[str] = None """ Task details """ recurrence: Optional[GlipTaskInfoRecurrence] = None attachments: Optional[List[GlipTaskInfoAttachmentsItem]] = None class GlipPreferencesInfoChatsLeftRailMode(Enum): SeparateAllChatTypes = 'SeparateAllChatTypes' SeparateConversationsAndTeams = 'SeparateConversationsAndTeams' CombineAllChatTypes = 'CombineAllChatTypes' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GlipPreferencesInfoChats(DataClassJsonMixin): max_count: Optional[int] = 10 left_rail_mode: Optional[GlipPreferencesInfoChatsLeftRailMode] = 'CombineAllChatTypes' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GlipPreferencesInfo(DataClassJsonMixin): chats: Optional[GlipPreferencesInfoChats] = None class UnifiedPresenceStatus(Enum): """ Aggregated presence status of the user """ Available = 'Available' Offline = 'Offline' DND = 'DND' Busy = 'Busy' class UnifiedPresenceGlipStatus(Enum): """ Glip connection status calculated from all user's apps. Returned always for the requester's extension; returned for another users if their glip visibility is set to 'Visible' Generated by Python OpenAPI Parser """ Offline = 'Offline' Online = 'Online' class UnifiedPresenceGlipVisibility(Enum): """ Visibility setting allowing other users to see the user's Glip presence status; returned only for requester's extension Generated by Python OpenAPI Parser """ Visible = 'Visible' Invisible = 'Invisible' class UnifiedPresenceGlipAvailability(Enum): """ Shows whether user wants to receive Glip notifications or not. """ Available = 'Available' DND = 'DND' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UnifiedPresenceGlip(DataClassJsonMixin): """ Returned if *Glip* feature is switched on """ status: Optional[UnifiedPresenceGlipStatus] = None """ Glip connection status calculated from all user's apps. Returned always for the requester's extension; returned for another users if their glip visibility is set to 'Visible' """ visibility: Optional[UnifiedPresenceGlipVisibility] = None """ Visibility setting allowing other users to see the user's Glip presence status; returned only for requester's extension """ availability: Optional[UnifiedPresenceGlipAvailability] = None """ Shows whether user wants to receive Glip notifications or not. """ class UnifiedPresenceTelephonyStatus(Enum): """ Telephony status calculated from all user's phone numbers. Returned always for the requester's extension; returned for another users if their telephony visibility is set to 'Visible' Generated by Python OpenAPI Parser """ NoCall = 'NoCall' Ringing = 'Ringing' CallConnected = 'CallConnected' OnHold = 'OnHold' ParkedCall = 'ParkedCall' class UnifiedPresenceTelephonyVisibility(Enum): """ Specifies if the user hardphone presence status is visible to other users; returned only for requester's extension Generated by Python OpenAPI Parser """ Visible = 'Visible' Invisible = 'Invisible' class UnifiedPresenceTelephonyAvailability(Enum): """ Telephony DND status. Returned if *DND* feature is switched on """ TakeAllCalls = 'TakeAllCalls' DoNotAcceptAnyCalls = 'DoNotAcceptAnyCalls' DoNotAcceptQueueCalls = 'DoNotAcceptQueueCalls' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UnifiedPresenceTelephony(DataClassJsonMixin): """ Returned if *BLF* feature is switched on """ status: Optional[UnifiedPresenceTelephonyStatus] = None """ Telephony status calculated from all user's phone numbers. Returned always for the requester's extension; returned for another users if their telephony visibility is set to 'Visible' """ visibility: Optional[UnifiedPresenceTelephonyVisibility] = None """ Specifies if the user hardphone presence status is visible to other users; returned only for requester's extension """ availability: Optional[UnifiedPresenceTelephonyAvailability] = None """ Telephony DND status. Returned if *DND* feature is switched on """ class UnifiedPresenceMeetingStatus(Enum): """ Meeting status calculated from all user`s meetings """ NoMeeting = 'NoMeeting' InMeeting = 'InMeeting' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UnifiedPresenceMeeting(DataClassJsonMixin): """ Returned if *Meetings* feature is switched on """ status: Optional[UnifiedPresenceMeetingStatus] = None """ Meeting status calculated from all user`s meetings """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UnifiedPresence(DataClassJsonMixin): status: Optional[UnifiedPresenceStatus] = None """ Aggregated presence status of the user """ glip: Optional[UnifiedPresenceGlip] = None """ Returned if *Glip* feature is switched on """ telephony: Optional[UnifiedPresenceTelephony] = None """ Returned if *BLF* feature is switched on """ meeting: Optional[UnifiedPresenceMeeting] = None """ Returned if *Meetings* feature is switched on """ class UpdateUnifiedPresenceGlipVisibility(Enum): """ Visibility setting allowing other users to see Glip presence status """ Visible = 'Visible' Invisible = 'Invisible' class UpdateUnifiedPresenceGlipAvailability(Enum): """ Availability setting specifing whether to receive Glip notifications or not """ Available = 'Available' DND = 'DND' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateUnifiedPresenceGlip(DataClassJsonMixin): visibility: Optional[UpdateUnifiedPresenceGlipVisibility] = None """ Visibility setting allowing other users to see Glip presence status """ availability: Optional[UpdateUnifiedPresenceGlipAvailability] = None """ Availability setting specifing whether to receive Glip notifications or not """ class UpdateUnifiedPresenceTelephonyAvailability(Enum): """ Telephony DND status """ TakeAllCalls = 'TakeAllCalls' DoNotAcceptAnyCalls = 'DoNotAcceptAnyCalls' DoNotAcceptQueueCalls = 'DoNotAcceptQueueCalls' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateUnifiedPresenceTelephony(DataClassJsonMixin): availability: Optional[UpdateUnifiedPresenceTelephonyAvailability] = None """ Telephony DND status """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateUnifiedPresence(DataClassJsonMixin): glip: Optional[UpdateUnifiedPresenceGlip] = None telephony: Optional[UpdateUnifiedPresenceTelephony] = None class GlipTeamInfoType(Enum): """ Type of a chat """ Team = 'Team' class GlipTeamInfoStatus(Enum): """ Team status """ Active = 'Active' Archived = 'Archived' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GlipTeamInfo(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a team """ type: Optional[GlipTeamInfoType] = None """ Type of a chat """ public: Optional[bool] = None """ Team access level """ name: Optional[str] = None """ Team name """ description: Optional[str] = None """ Team description """ status: Optional[GlipTeamInfoStatus] = None """ Team status """ creation_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Team creation datetime in ISO 8601 format """ last_modified_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Team last change datetime in ISO 8601 format """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GlipNoteInfoLastModifiedBy(DataClassJsonMixin): """ Note last modification information """ id: Optional[str] = None """ Internal identifier of the user who last updated the note """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GlipNoteInfoLockedBy(DataClassJsonMixin): """ Returned for the note being edited (locked) at the current moment. Information on the user editing the note Generated by Python OpenAPI Parser """ id: Optional[str] = None """ Internal identifier of the user editing the note """ class GlipNoteInfoStatus(Enum): """ Note publishing status. Any note is created in 'Draft' status. After it is posted it becomes 'Active' Generated by Python OpenAPI Parser """ Active = 'Active' Draft = 'Draft' class GlipNoteInfoType(Enum): Note = 'Note' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GlipNoteInfo(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a note """ title: Optional[str] = None """ Title of a note """ chat_ids: Optional[List[str]] = None """ Internal identifiers of the chat(s) where the note is posted or shared. """ preview: Optional[str] = None """ Preview of a note (first 150 characters of a body) """ creator: Optional[dict] = None """ Note creator information """ last_modified_by: Optional[GlipNoteInfoLastModifiedBy] = None """ Note last modification information """ locked_by: Optional[GlipNoteInfoLockedBy] = None """ Returned for the note being edited (locked) at the current moment. Information on the user editing the note """ status: Optional[GlipNoteInfoStatus] = None """ Note publishing status. Any note is created in 'Draft' status. After it is posted it becomes 'Active' """ creation_time: Optional[str] = None """ Creation time """ last_modified_time: Optional[str] = None """ Datetime of the note last update """ type: Optional[GlipNoteInfoType] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GlipTaskList(DataClassJsonMixin): records: Optional[list] = None class GlipEventCreateRecurrence(Enum): """ Event recurrence settings. For non-periodic events the value is 'None'. Must be greater or equal to event duration: 1- Day/Weekday; 7 - Week; 28 - Month; 365 - Year Generated by Python OpenAPI Parser """ None_ = 'None' Day = 'Day' Weekday = 'Weekday' Week = 'Week' Month = 'Month' Year = 'Year' class GlipEventCreateEndingOn(Enum): """ Iterations end datetime for periodic events. """ None_ = 'None' Count = 'Count' Date = 'Date' class GlipEventCreateColor(Enum): """ Color of Event title (including its presentation in Calendar) """ Black = 'Black' Red = 'Red' Orange = 'Orange' Yellow = 'Yellow' Green = 'Green' Blue = 'Blue' Purple = 'Purple' Magenta = 'Magenta' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GlipEventCreate(DataClassJsonMixin): """ Required Properties: - title - start_time - end_time Generated by Python OpenAPI Parser """ title: str """ Event title """ start_time: str """ Datetime of starting an event """ end_time: str """ Datetime of ending an event """ id: Optional[str] = None """ Internal identifier of an event """ creator_id: Optional[str] = None """ Internal identifier of a person created an event """ all_day: Optional[bool] = False """ Indicates whether event has some specific time slot or lasts for whole day(s) """ recurrence: Optional[GlipEventCreateRecurrence] = None """ Event recurrence settings. For non-periodic events the value is 'None'. Must be greater or equal to event duration: 1- Day/Weekday; 7 - Week; 28 - Month; 365 - Year """ ending_condition: Optional[str] = None """ Condition of ending """ ending_after: Optional[int] = None """ Count of iterations. For periodic events only. Value range is 1 - 10. Must be specified if 'endingCondition' is 'Count' """ ending_on: Optional[GlipEventCreateEndingOn] = 'None' """ Iterations end datetime for periodic events. """ color: Optional[GlipEventCreateColor] = 'Black' """ Color of Event title (including its presentation in Calendar) """ location: Optional[str] = None """ Event location """ description: Optional[str] = None """ Event details """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GlipNoteCreate(DataClassJsonMixin): """ Required Properties: - title Generated by Python OpenAPI Parser """ title: str """ Title of a note. Max allowed legth is 250 characters """ body: Optional[str] = None """ Contents of a note; HTML-markuped text. Max allowed length is 1048576 characters (1 Mb). """ class GlipCreateGroupType(Enum): """ Type of a group to be created. 'PrivateChat' is a group of 2 members. 'Team' is a chat of 1 and more participants, the membership can be modified in future. 'PersonalChat' is a private chat thread of a user Generated by Python OpenAPI Parser """ PrivateChat = 'PrivateChat' Team = 'Team' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GlipCreateGroup(DataClassJsonMixin): """ Required Properties: - type Generated by Python OpenAPI Parser """ type: GlipCreateGroupType """ Type of a group to be created. 'PrivateChat' is a group of 2 members. 'Team' is a chat of 1 and more participants, the membership can be modified in future. 'PersonalChat' is a private chat thread of a user """ is_public: Optional[bool] = None """ For 'Team' group type only. Team access level """ name: Optional[str] = None """ For 'Team' group type only. Team name """ description: Optional[str] = None """ For 'Team' group type only. Team description """ members: Optional[list] = None """ “List of glip members. For 'PrivateChat' group type 2 members only are supported” """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UnifiedPresenceListItem(DataClassJsonMixin): resource_id: Optional[str] = None """ Internal identifier of the resource """ status: Optional[int] = None """ Status code of resource retrieval """ body: Optional[dict] = None class GlipConversationInfoType(Enum): """ Type of a conversation """ Direct = 'Direct' Personal = 'Personal' Group = 'Group' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GlipConversationInfoMembersItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a user """ email: Optional[str] = None """ Email of a user """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GlipConversationInfo(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a conversation """ type: Optional[GlipConversationInfoType] = None """ Type of a conversation """ creation_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Conversation creation datetime in ISO 8601 format """ last_modified_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Conversation last change datetime in ISO 8601 format """ members: Optional[List[GlipConversationInfoMembersItem]] = None """ List of glip members """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GlipTeamsList(DataClassJsonMixin): """ Required Properties: - records Generated by Python OpenAPI Parser """ records: list """ List of teams """ class GlipChatsListWithoutNavigationRecordsItemType(Enum): """ Type of a chat """ Everyone = 'Everyone' Team = 'Team' Group = 'Group' Direct = 'Direct' Personal = 'Personal' class GlipChatsListWithoutNavigationRecordsItemStatus(Enum): """ For 'Team' chat type only. Team status. """ Active = 'Active' Archived = 'Archived' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GlipChatsListWithoutNavigationRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a chat """ type: Optional[GlipChatsListWithoutNavigationRecordsItemType] = None """ Type of a chat """ public: Optional[bool] = None """ For 'Team' chat type only. Team access level. """ name: Optional[str] = None """ For 'Team','Everyone' chats types only. Chat name. """ description: Optional[str] = None """ For 'Team','Everyone' chats types only. Chat description. """ status: Optional[GlipChatsListWithoutNavigationRecordsItemStatus] = None """ For 'Team' chat type only. Team status. """ creation_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Chat creation datetime in ISO 8601 format """ last_modified_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Chat last change datetime in ISO 8601 format """ members: Optional[list] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GlipChatsListWithoutNavigation(DataClassJsonMixin): """ Required Properties: - records Generated by Python OpenAPI Parser """ records: List[GlipChatsListWithoutNavigationRecordsItem] """ List of chats """ class GlipPostPostBodyAttachmentsItemType(Enum): """ Type of an attachment """ Event = 'Event' File = 'File' Note = 'Note' Task = 'Task' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GlipPostPostBodyAttachmentsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an attachment """ type: Optional[GlipPostPostBodyAttachmentsItemType] = None """ Type of an attachment """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GlipPostPostBody(DataClassJsonMixin): """ Required Properties: - text Generated by Python OpenAPI Parser """ text: str """ Post text. """ attachments: Optional[List[GlipPostPostBodyAttachmentsItem]] = None """ Identifier(s) of attachments. """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GlipUpdateTaskAssigneesItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an assignee """ class GlipUpdateTaskCompletenessCondition(Enum): Simple = 'Simple' AllAssignees = 'AllAssignees' Percentage = 'Percentage' class GlipUpdateTaskColor(Enum): Black = 'Black' Red = 'Red' Orange = 'Orange' Yellow = 'Yellow' Green = 'Green' Blue = 'Blue' Purple = 'Purple' Magenta = 'Magenta' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GlipUpdateTask(DataClassJsonMixin): subject: Optional[str] = None """ Task name/subject. Max allowed length is 250 characters. """ assignees: Optional[List[GlipUpdateTaskAssigneesItem]] = None completeness_condition: Optional[GlipUpdateTaskCompletenessCondition] = None start_date: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Task start date in UTC time zone """ due_date: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Task due date/time in UTC time zone """ color: Optional[GlipUpdateTaskColor] = None section: Optional[str] = None """ Task section to group/search by. Max allowed legth is 100 characters """ description: Optional[str] = None """ Task details. Max allowed legth is 102400 characters (100kB) """ recurrence: Optional[dict] = None attachments: Optional[List[dict]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GlipGroupList(DataClassJsonMixin): """ Required Properties: - records Generated by Python OpenAPI Parser """ records: list """ List of groups/teams/private chats """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateGlipConversationRequest(DataClassJsonMixin): """ Required Properties: - members Generated by Python OpenAPI Parser """ members: List[dict] """ List of glip members. The maximum supported number of IDs is 15. User's own ID is optional. If `members` section is omitted then 'Personal' chat will be returned """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GlipPostMembersListBody(DataClassJsonMixin): """ Required Properties: - members Generated by Python OpenAPI Parser """ members: List[dict] """ List of glip members """ class GlipCreateTaskCompletenessCondition(Enum): Simple = 'Simple' AllAssignees = 'AllAssignees' Percentage = 'Percentage' class GlipCreateTaskColor(Enum): Black = 'Black' Red = 'Red' Orange = 'Orange' Yellow = 'Yellow' Green = 'Green' Blue = 'Blue' Purple = 'Purple' Magenta = 'Magenta' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GlipCreateTask(DataClassJsonMixin): """ Required Properties: - subject - assignees Generated by Python OpenAPI Parser """ subject: str """ Task name/subject. Max allowed length is 250 characters. """ assignees: List[dict] completeness_condition: Optional[GlipCreateTaskCompletenessCondition] = 'Simple' start_date: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Task start date in UTC time zone. """ due_date: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Task due date/time in UTC time zone. """ color: Optional[GlipCreateTaskColor] = 'Black' section: Optional[str] = None """ Task section to group / search by. Max allowed legth is 100 characters. """ description: Optional[str] = None """ Task details. Max allowed legth is 102400 characters (100kB). """ recurrence: Optional[dict] = None attachments: Optional[List[dict]] = None class GlipCompleteTaskStatus(Enum): """ Completeness status. 'Mandatory' if `completenessCondition` is set to `Simple`, otherwise 'Optional' Generated by Python OpenAPI Parser """ Incomplete = 'Incomplete' Complete = 'Complete' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GlipCompleteTask(DataClassJsonMixin): status: Optional[GlipCompleteTaskStatus] = None """ Completeness status. 'Mandatory' if `completenessCondition` is set to `Simple`, otherwise 'Optional' """ assignees: Optional[List[dict]] = None completeness_percentage: Optional[int] = None """ Current completeness percentage of a task with the 'Percentage' completeness condition. 'Mandatory' if `completenessCondition` is set to `Percentage`, otherwise 'Optional' """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GlipConversationsList(DataClassJsonMixin): """ Required Properties: - records Generated by Python OpenAPI Parser """ records: list """ List of conversations """ class GlipEveryoneInfoType(Enum): """ Type of a chat """ Everyone = 'Everyone' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GlipEveryoneInfo(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a chat """ type: Optional[GlipEveryoneInfoType] = None """ Type of a chat """ name: Optional[str] = None """ Chat name """ description: Optional[str] = None """ Chat description """ creation_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Chat creation datetime in ISO 8601 format """ last_modified_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Chat last change datetime in ISO 8601 format """ class GlipCreatePostAttachmentsItemType(Enum): """ Type of attachment """ Card = 'Card' Event = 'Event' Note = 'Note' class GlipCreatePostAttachmentsItemRecurrence(Enum): """ Event recurrence settings. For non-periodic events the value is 'None'. Must be greater or equal to event duration: 1- Day/Weekday; 7 - Week; 28 - Month; 365 - Year Generated by Python OpenAPI Parser """ None_ = 'None' Day = 'Day' Weekday = 'Weekday' Week = 'Week' Month = 'Month' Year = 'Year' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GlipCreatePostAttachmentsItem(DataClassJsonMixin): type: Optional[GlipCreatePostAttachmentsItemType] = 'Card' """ Type of attachment """ title: Optional[str] = None """ Attachment title """ fallback: Optional[str] = None """ Default message returned in case the client does not support interactive messages """ color: Optional[str] = None """ Color of Event title, including its presentation in Calendar; or the color of the side border of an interactive message of a Card. The default color is 'Black' """ intro: Optional[str] = None """ Introductory text displayed directly above a message """ author: Optional[dict] = None """ Information about the author """ text: Optional[str] = None """ Text of attachment (up to 1000 chars), supports GlipDown """ image_uri: Optional[str] = None """ Link to an image displayed at the bottom of a message """ thumbnail_uri: Optional[str] = None """ Link to an image preview displayed to the right of a message (82x82) """ fields: Optional[list] = None """ Individual subsections within a message """ footnote: Optional[dict] = None """ Message footer information """ start_time: Optional[str] = None """ Datetime of starting an event """ end_time: Optional[str] = None """ Datetime of ending an event """ all_day: Optional[bool] = False """ Indicates whether an event has some specific time slot or lasts for the whole day(s) """ recurrence: Optional[GlipCreatePostAttachmentsItemRecurrence] = None """ Event recurrence settings. For non-periodic events the value is 'None'. Must be greater or equal to event duration: 1- Day/Weekday; 7 - Week; 28 - Month; 365 - Year """ ending_condition: Optional[str] = None """ Condition of ending an event """
/ringcentral_async_client-1.0.3-py3-none-any.whl/ringcentral_async_client/_code_gen/model/_1.py
0.857902
0.483892
_1.py
pypi
from ._11 import * @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionGrantsResponsePaging(DataClassJsonMixin): """ Information on paging """ page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) """ per_page: Optional[int] = None """ Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty """ total_pages: Optional[int] = None """ The total number of pages in a dataset. May be omitted for some resources due to performance reasons """ total_elements: Optional[int] = None """ The total number of elements in a dataset. May be omitted for some resource due to performance reasons """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionGrantsResponse(DataClassJsonMixin): """ Required Properties: - navigation - paging - records Generated by Python OpenAPI Parser """ records: List[ListExtensionGrantsResponseRecordsItem] """ List of extension grants with details """ navigation: ListExtensionGrantsResponseNavigation """ Information on navigation """ paging: ListExtensionGrantsResponsePaging """ Information on paging """ uri: Optional[str] = None """ Link to the list of extension grants """ class ListAutomaticLocationUpdatesUsersType(Enum): User = 'User' Limited = 'Limited' class ListAutomaticLocationUpdatesUsersResponseRecordsItemType(Enum): """ User extension type """ User = 'User' Limited = 'Limited' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAutomaticLocationUpdatesUsersResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a device """ full_name: Optional[str] = None """ User name """ extension_number: Optional[str] = None feature_enabled: Optional[bool] = None """ Specifies if Automatic Location Updates feature is enabled """ type: Optional[ListAutomaticLocationUpdatesUsersResponseRecordsItemType] = None """ User extension type """ site: Optional[str] = None """ Site data """ department: Optional[str] = None """ Department name """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAutomaticLocationUpdatesUsersResponseNavigationFirstPage(DataClassJsonMixin): """ Canonical URI for the first page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAutomaticLocationUpdatesUsersResponseNavigationNextPage(DataClassJsonMixin): """ Canonical URI for the next page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAutomaticLocationUpdatesUsersResponseNavigationPreviousPage(DataClassJsonMixin): """ Canonical URI for the previous page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAutomaticLocationUpdatesUsersResponseNavigationLastPage(DataClassJsonMixin): """ Canonical URI for the last page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAutomaticLocationUpdatesUsersResponseNavigation(DataClassJsonMixin): first_page: Optional[ListAutomaticLocationUpdatesUsersResponseNavigationFirstPage] = None """ Canonical URI for the first page of the list """ next_page: Optional[ListAutomaticLocationUpdatesUsersResponseNavigationNextPage] = None """ Canonical URI for the next page of the list """ previous_page: Optional[ListAutomaticLocationUpdatesUsersResponseNavigationPreviousPage] = None """ Canonical URI for the previous page of the list """ last_page: Optional[ListAutomaticLocationUpdatesUsersResponseNavigationLastPage] = None """ Canonical URI for the last page of the list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAutomaticLocationUpdatesUsersResponsePaging(DataClassJsonMixin): page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) """ per_page: Optional[int] = None """ Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty """ total_pages: Optional[int] = None """ The total number of pages in a dataset. May be omitted for some resources due to performance reasons """ total_elements: Optional[int] = None """ The total number of elements in a dataset. May be omitted for some resource due to performance reasons """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAutomaticLocationUpdatesUsersResponse(DataClassJsonMixin): uri: Optional[str] = None """ Link to the users list resource """ records: Optional[List[ListAutomaticLocationUpdatesUsersResponseRecordsItem]] = None navigation: Optional[ListAutomaticLocationUpdatesUsersResponseNavigation] = None paging: Optional[ListAutomaticLocationUpdatesUsersResponsePaging] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AssignMultipleAutomaticaLocationUpdatesUsersRequest(DataClassJsonMixin): enabled_user_ids: Optional[List[str]] = None disabled_user_ids: Optional[List[str]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListWirelessPointsResponseRecordsItemSite(DataClassJsonMixin): """ Site data (internal identifier and custom name of a site) """ id: Optional[str] = None """ Internal identifier of a site """ uri: Optional[str] = None """ Link to a site resource """ name: Optional[str] = None """ Name of a site """ code: Optional[str] = None """ Site code value. Returned only if specified """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListWirelessPointsResponseRecordsItemEmergencyAddress(DataClassJsonMixin): """ Emergency address assigned to the wireless point. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned Generated by Python OpenAPI Parser """ country: Optional[str] = None """ Country name """ country_id: Optional[str] = None """ Internal identifier of a country """ country_iso_code: Optional[str] = None """ ISO code of a country """ country_name: Optional[str] = None """ Full name of a country """ customer_name: Optional[str] = None """ Customer name """ state: Optional[str] = None """ State/Province name. Mandatory for the USA, the UK and Canada """ state_id: Optional[str] = None """ Internal identifier of a state """ state_iso_code: Optional[str] = None """ ISO code of a state """ state_name: Optional[str] = None """ Full name of a state """ city: Optional[str] = None """ City name """ street: Optional[str] = None """ First line address """ street2: Optional[str] = None """ Second line address (apartment, suite, unit, building, floor, etc.) """ zip: Optional[str] = None """ Postal (Zip) code """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListWirelessPointsResponseRecordsItemEmergencyLocation(DataClassJsonMixin): """ Emergency response location information """ id: Optional[str] = None """ Internal identifier of an emergency response location """ name: Optional[str] = None """ Emergency response location name """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListWirelessPointsResponseRecordsItem(DataClassJsonMixin): uri: Optional[str] = None """ Link to the wireless point resource """ id: Optional[str] = None """ Internal identifier of a wireless point """ bssid: Optional[str] = None """ Unique 48-bit identifier of the wireless access point complying with MAC address conventions """ name: Optional[str] = None """ Wireless access point name """ site: Optional[ListWirelessPointsResponseRecordsItemSite] = None """ Site data (internal identifier and custom name of a site) """ emergency_address: Optional[ListWirelessPointsResponseRecordsItemEmergencyAddress] = None """ Emergency address assigned to the wireless point. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ emergency_location: Optional[ListWirelessPointsResponseRecordsItemEmergencyLocation] = None """ Emergency response location information """ emergency_location_id: Optional[str] = None """ Deprecated. Emergency response location (address) internal identifier. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListWirelessPointsResponseNavigationFirstPage(DataClassJsonMixin): """ Canonical URI for the first page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListWirelessPointsResponseNavigationNextPage(DataClassJsonMixin): """ Canonical URI for the next page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListWirelessPointsResponseNavigationPreviousPage(DataClassJsonMixin): """ Canonical URI for the previous page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListWirelessPointsResponseNavigationLastPage(DataClassJsonMixin): """ Canonical URI for the last page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListWirelessPointsResponseNavigation(DataClassJsonMixin): """ Information on navigation """ first_page: Optional[ListWirelessPointsResponseNavigationFirstPage] = None """ Canonical URI for the first page of the list """ next_page: Optional[ListWirelessPointsResponseNavigationNextPage] = None """ Canonical URI for the next page of the list """ previous_page: Optional[ListWirelessPointsResponseNavigationPreviousPage] = None """ Canonical URI for the previous page of the list """ last_page: Optional[ListWirelessPointsResponseNavigationLastPage] = None """ Canonical URI for the last page of the list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListWirelessPointsResponsePaging(DataClassJsonMixin): """ Information on paging """ page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) """ per_page: Optional[int] = None """ Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty """ total_pages: Optional[int] = None """ The total number of pages in a dataset. May be omitted for some resources due to performance reasons """ total_elements: Optional[int] = None """ The total number of elements in a dataset. May be omitted for some resource due to performance reasons """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListWirelessPointsResponse(DataClassJsonMixin): uri: Optional[str] = None """ Link to the wireless point list resource """ records: Optional[List[ListWirelessPointsResponseRecordsItem]] = None """ List of wireless points with assigned emergency addresses """ navigation: Optional[ListWirelessPointsResponseNavigation] = None """ Information on navigation """ paging: Optional[ListWirelessPointsResponsePaging] = None """ Information on paging """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateWirelessPointRequestSite(DataClassJsonMixin): """ Site data. If multi-site feature is turned on for the account, then internal identifier of a site must be specified. To assign the wireless point to the main site (company) set site ID to `main-site` Generated by Python OpenAPI Parser """ id: Optional[str] = None """ Internal identifier of a site """ uri: Optional[str] = None """ Link to a site resource """ name: Optional[str] = None """ Name of a site """ code: Optional[str] = None """ Site code value. Returned only if specified """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateWirelessPointRequestEmergencyAddress(DataClassJsonMixin): """ Emergency address information. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned Generated by Python OpenAPI Parser """ country: Optional[str] = None """ Country name """ country_id: Optional[str] = None """ Internal identifier of a country """ country_iso_code: Optional[str] = None """ ISO code of a country """ country_name: Optional[str] = None """ Full name of a country """ customer_name: Optional[str] = None """ Customer name """ state: Optional[str] = None """ State/Province name. Mandatory for the USA, the UK and Canada """ state_id: Optional[str] = None """ Internal identifier of a state """ state_iso_code: Optional[str] = None """ ISO code of a state """ state_name: Optional[str] = None """ Full name of a state """ city: Optional[str] = None """ City name """ street: Optional[str] = None """ First line address """ street2: Optional[str] = None """ Second line address (apartment, suite, unit, building, floor, etc.) """ zip: Optional[str] = None """ Postal (Zip) code """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateWirelessPointRequestEmergencyLocation(DataClassJsonMixin): """ Emergency response location information """ id: Optional[str] = None """ Internal identifier of an emergency response location """ name: Optional[str] = None """ Emergency response location name """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateWirelessPointRequest(DataClassJsonMixin): """ Required Properties: - bssid - name - emergency_address Generated by Python OpenAPI Parser """ bssid: str """ Unique 48-bit identifier of wireless access point complying with MAC address conventions. The Mask is XX:XX:XX:XX:XX:XX, where X can be a symbol in the range of 0-9 or A-F """ name: str """ Wireless access point name """ emergency_address: CreateWirelessPointRequestEmergencyAddress """ Emergency address information. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ site: Optional[CreateWirelessPointRequestSite] = None """ Site data. If multi-site feature is turned on for the account, then internal identifier of a site must be specified. To assign the wireless point to the main site (company) set site ID to `main-site` """ emergency_location_id: Optional[str] = None """ Deprecated. Internal identifier of the emergency response location (address). Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ emergency_location: Optional[CreateWirelessPointRequestEmergencyLocation] = None """ Emergency response location information """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateWirelessPointResponseSite(DataClassJsonMixin): """ Site data (internal identifier and custom name of a site) """ id: Optional[str] = None """ Internal identifier of a site """ uri: Optional[str] = None """ Link to a site resource """ name: Optional[str] = None """ Name of a site """ code: Optional[str] = None """ Site code value. Returned only if specified """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateWirelessPointResponseEmergencyAddress(DataClassJsonMixin): """ Emergency address assigned to the wireless point. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned Generated by Python OpenAPI Parser """ country: Optional[str] = None """ Country name """ country_id: Optional[str] = None """ Internal identifier of a country """ country_iso_code: Optional[str] = None """ ISO code of a country """ country_name: Optional[str] = None """ Full name of a country """ customer_name: Optional[str] = None """ Customer name """ state: Optional[str] = None """ State/Province name. Mandatory for the USA, the UK and Canada """ state_id: Optional[str] = None """ Internal identifier of a state """ state_iso_code: Optional[str] = None """ ISO code of a state """ state_name: Optional[str] = None """ Full name of a state """ city: Optional[str] = None """ City name """ street: Optional[str] = None """ First line address """ street2: Optional[str] = None """ Second line address (apartment, suite, unit, building, floor, etc.) """ zip: Optional[str] = None """ Postal (Zip) code """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateWirelessPointResponseEmergencyLocation(DataClassJsonMixin): """ Emergency response location information """ id: Optional[str] = None """ Internal identifier of an emergency response location """ name: Optional[str] = None """ Emergency response location name """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateWirelessPointResponse(DataClassJsonMixin): uri: Optional[str] = None """ Link to the wireless point resource """ id: Optional[str] = None """ Internal identifier of a wireless point """ bssid: Optional[str] = None """ Unique 48-bit identifier of the wireless access point complying with MAC address conventions """ name: Optional[str] = None """ Wireless access point name """ site: Optional[CreateWirelessPointResponseSite] = None """ Site data (internal identifier and custom name of a site) """ emergency_address: Optional[CreateWirelessPointResponseEmergencyAddress] = None """ Emergency address assigned to the wireless point. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ emergency_location: Optional[CreateWirelessPointResponseEmergencyLocation] = None """ Emergency response location information """ emergency_location_id: Optional[str] = None """ Deprecated. Emergency response location (address) internal identifier. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadWirelessPointResponseSite(DataClassJsonMixin): """ Site data (internal identifier and custom name of a site) """ id: Optional[str] = None """ Internal identifier of a site """ uri: Optional[str] = None """ Link to a site resource """ name: Optional[str] = None """ Name of a site """ code: Optional[str] = None """ Site code value. Returned only if specified """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadWirelessPointResponseEmergencyAddress(DataClassJsonMixin): """ Emergency address assigned to the wireless point. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned Generated by Python OpenAPI Parser """ country: Optional[str] = None """ Country name """ country_id: Optional[str] = None """ Internal identifier of a country """ country_iso_code: Optional[str] = None """ ISO code of a country """ country_name: Optional[str] = None """ Full name of a country """ customer_name: Optional[str] = None """ Customer name """ state: Optional[str] = None """ State/Province name. Mandatory for the USA, the UK and Canada """ state_id: Optional[str] = None """ Internal identifier of a state """ state_iso_code: Optional[str] = None """ ISO code of a state """ state_name: Optional[str] = None """ Full name of a state """ city: Optional[str] = None """ City name """ street: Optional[str] = None """ First line address """ street2: Optional[str] = None """ Second line address (apartment, suite, unit, building, floor, etc.) """ zip: Optional[str] = None """ Postal (Zip) code """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadWirelessPointResponseEmergencyLocation(DataClassJsonMixin): """ Emergency response location information """ id: Optional[str] = None """ Internal identifier of an emergency response location """ name: Optional[str] = None """ Emergency response location name """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadWirelessPointResponse(DataClassJsonMixin): uri: Optional[str] = None """ Link to the wireless point resource """ id: Optional[str] = None """ Internal identifier of a wireless point """ bssid: Optional[str] = None """ Unique 48-bit identifier of the wireless access point complying with MAC address conventions """ name: Optional[str] = None """ Wireless access point name """ site: Optional[ReadWirelessPointResponseSite] = None """ Site data (internal identifier and custom name of a site) """ emergency_address: Optional[ReadWirelessPointResponseEmergencyAddress] = None """ Emergency address assigned to the wireless point. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ emergency_location: Optional[ReadWirelessPointResponseEmergencyLocation] = None """ Emergency response location information """ emergency_location_id: Optional[str] = None """ Deprecated. Emergency response location (address) internal identifier. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateWirelessPointRequestSite(DataClassJsonMixin): """ Site data. If multi-site feature is turned on for the account, then internal identifier of a site must be specified. To assign the wireless point to the main site (company) set site ID to `main-site` Generated by Python OpenAPI Parser """ id: Optional[str] = None """ Internal identifier of a site """ uri: Optional[str] = None """ Link to a site resource """ name: Optional[str] = None """ Name of a site """ code: Optional[str] = None """ Site code value. Returned only if specified """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateWirelessPointRequestEmergencyAddress(DataClassJsonMixin): """ Emergency address information. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned Generated by Python OpenAPI Parser """ country: Optional[str] = None """ Country name """ country_id: Optional[str] = None """ Internal identifier of a country """ country_iso_code: Optional[str] = None """ ISO code of a country """ country_name: Optional[str] = None """ Full name of a country """ customer_name: Optional[str] = None """ Customer name """ state: Optional[str] = None """ State/Province name. Mandatory for the USA, the UK and Canada """ state_id: Optional[str] = None """ Internal identifier of a state """ state_iso_code: Optional[str] = None """ ISO code of a state """ state_name: Optional[str] = None """ Full name of a state """ city: Optional[str] = None """ City name """ street: Optional[str] = None """ First line address """ street2: Optional[str] = None """ Second line address (apartment, suite, unit, building, floor, etc.) """ zip: Optional[str] = None """ Postal (Zip) code """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateWirelessPointRequestEmergencyLocation(DataClassJsonMixin): """ Emergency response location information """ id: Optional[str] = None """ Internal identifier of an emergency response location """ name: Optional[str] = None """ Emergency response location name """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateWirelessPointRequest(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a wireless point """ bssid: Optional[str] = None """ Unique 48-bit identifier of wireless access point complying with MAC address conventions. Mask: XX:XX:XX:XX:XX:XX, where X can be a symbol in the range of 0-9 or A-F """ name: Optional[str] = None """ Wireless access point name """ site: Optional[UpdateWirelessPointRequestSite] = None """ Site data. If multi-site feature is turned on for the account, then internal identifier of a site must be specified. To assign the wireless point to the main site (company) set site ID to `main-site` """ emergency_address: Optional[UpdateWirelessPointRequestEmergencyAddress] = None """ Emergency address information. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ emergency_location_id: Optional[str] = None """ Deprecated. Internal identifier of the emergency response location (address). Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ emergency_location: Optional[UpdateWirelessPointRequestEmergencyLocation] = None """ Emergency response location information """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateWirelessPointResponseSite(DataClassJsonMixin): """ Site data (internal identifier and custom name of a site) """ id: Optional[str] = None """ Internal identifier of a site """ uri: Optional[str] = None """ Link to a site resource """ name: Optional[str] = None """ Name of a site """ code: Optional[str] = None """ Site code value. Returned only if specified """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateWirelessPointResponseEmergencyAddress(DataClassJsonMixin): """ Emergency address assigned to the wireless point. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned Generated by Python OpenAPI Parser """ country: Optional[str] = None """ Country name """ country_id: Optional[str] = None """ Internal identifier of a country """ country_iso_code: Optional[str] = None """ ISO code of a country """ country_name: Optional[str] = None """ Full name of a country """ customer_name: Optional[str] = None """ Customer name """ state: Optional[str] = None """ State/Province name. Mandatory for the USA, the UK and Canada """ state_id: Optional[str] = None """ Internal identifier of a state """ state_iso_code: Optional[str] = None """ ISO code of a state """ state_name: Optional[str] = None """ Full name of a state """ city: Optional[str] = None """ City name """ street: Optional[str] = None """ First line address """ street2: Optional[str] = None """ Second line address (apartment, suite, unit, building, floor, etc.) """ zip: Optional[str] = None """ Postal (Zip) code """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateWirelessPointResponseEmergencyLocation(DataClassJsonMixin): """ Emergency response location information """ id: Optional[str] = None """ Internal identifier of an emergency response location """ name: Optional[str] = None """ Emergency response location name """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateWirelessPointResponse(DataClassJsonMixin): uri: Optional[str] = None """ Link to the wireless point resource """ id: Optional[str] = None """ Internal identifier of a wireless point """ bssid: Optional[str] = None """ Unique 48-bit identifier of the wireless access point complying with MAC address conventions """ name: Optional[str] = None """ Wireless access point name """ site: Optional[UpdateWirelessPointResponseSite] = None """ Site data (internal identifier and custom name of a site) """ emergency_address: Optional[UpdateWirelessPointResponseEmergencyAddress] = None """ Emergency address assigned to the wireless point. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ emergency_location: Optional[UpdateWirelessPointResponseEmergencyLocation] = None """ Emergency response location information """ emergency_location_id: Optional[str] = None """ Deprecated. Emergency response location (address) internal identifier. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListNetworksResponseRecordsItemSite(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a site """ uri: Optional[str] = None """ Link to a site resource """ name: Optional[str] = None """ Name of a site """ code: Optional[str] = None """ Site code value. Returned only if specified """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListNetworksResponseRecordsItemPublicIpRangesItem(DataClassJsonMixin): id: Optional[str] = None start_ip: Optional[str] = None end_ip: Optional[str] = None matched: Optional[bool] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListNetworksResponseRecordsItemPrivateIpRangesItemEmergencyAddress(DataClassJsonMixin): """ Emergency address information. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned Generated by Python OpenAPI Parser """ country: Optional[str] = None """ Country name """ country_id: Optional[str] = None """ Internal identifier of a country """ country_iso_code: Optional[str] = None """ ISO code of a country """ country_name: Optional[str] = None """ Full name of a country """ customer_name: Optional[str] = None """ Customer name """ state: Optional[str] = None """ State/Province name. Mandatory for the USA, the UK and Canada """ state_id: Optional[str] = None """ Internal identifier of a state """ state_iso_code: Optional[str] = None """ ISO code of a state """ state_name: Optional[str] = None """ Full name of a state """ city: Optional[str] = None """ City name """ street: Optional[str] = None """ First line address """ street2: Optional[str] = None """ Second line address (apartment, suite, unit, building, floor, etc.) """ zip: Optional[str] = None """ Postal (Zip) code """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListNetworksResponseRecordsItemPrivateIpRangesItem(DataClassJsonMixin): id: Optional[str] = None start_ip: Optional[str] = None end_ip: Optional[str] = None name: Optional[str] = None """ Network name """ emergency_address: Optional[ListNetworksResponseRecordsItemPrivateIpRangesItemEmergencyAddress] = None """ Emergency address information. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ emergency_location_id: Optional[str] = None """ Emergency response location (address) internal identifier. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ matched: Optional[bool] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListNetworksResponseRecordsItemEmergencyLocation(DataClassJsonMixin): """ Emergency response location information """ id: Optional[str] = None """ Internal identifier of an emergency response location """ name: Optional[str] = None """ Emergency response location name """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListNetworksResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a network """ uri: Optional[str] = None """ Link to a network resource """ name: Optional[str] = None site: Optional[ListNetworksResponseRecordsItemSite] = None public_ip_ranges: Optional[List[ListNetworksResponseRecordsItemPublicIpRangesItem]] = None private_ip_ranges: Optional[List[ListNetworksResponseRecordsItemPrivateIpRangesItem]] = None emergency_location: Optional[ListNetworksResponseRecordsItemEmergencyLocation] = None """ Emergency response location information """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListNetworksResponseNavigationFirstPage(DataClassJsonMixin): """ Canonical URI for the first page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListNetworksResponseNavigationNextPage(DataClassJsonMixin): """ Canonical URI for the next page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListNetworksResponseNavigationPreviousPage(DataClassJsonMixin): """ Canonical URI for the previous page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListNetworksResponseNavigationLastPage(DataClassJsonMixin): """ Canonical URI for the last page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListNetworksResponseNavigation(DataClassJsonMixin): first_page: Optional[ListNetworksResponseNavigationFirstPage] = None """ Canonical URI for the first page of the list """ next_page: Optional[ListNetworksResponseNavigationNextPage] = None """ Canonical URI for the next page of the list """ previous_page: Optional[ListNetworksResponseNavigationPreviousPage] = None """ Canonical URI for the previous page of the list """ last_page: Optional[ListNetworksResponseNavigationLastPage] = None """ Canonical URI for the last page of the list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListNetworksResponsePaging(DataClassJsonMixin): page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) """ per_page: Optional[int] = None """ Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty """ total_pages: Optional[int] = None """ The total number of pages in a dataset. May be omitted for some resources due to performance reasons """ total_elements: Optional[int] = None """ The total number of elements in a dataset. May be omitted for some resource due to performance reasons """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListNetworksResponse(DataClassJsonMixin): uri: Optional[str] = None """ Link to a networks resource """ records: Optional[List[ListNetworksResponseRecordsItem]] = None navigation: Optional[ListNetworksResponseNavigation] = None paging: Optional[ListNetworksResponsePaging] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateNetworkRequestSite(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a site """ uri: Optional[str] = None """ Link to a site resource """ name: Optional[str] = None """ Name of a site """ code: Optional[str] = None """ Site code value. Returned only if specified """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateNetworkRequestPublicIpRangesItem(DataClassJsonMixin): id: Optional[str] = None start_ip: Optional[str] = None end_ip: Optional[str] = None matched: Optional[bool] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateNetworkRequestPrivateIpRangesItemEmergencyAddress(DataClassJsonMixin): """ Emergency address information. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned Generated by Python OpenAPI Parser """ country: Optional[str] = None """ Country name """ country_id: Optional[str] = None """ Internal identifier of a country """ country_iso_code: Optional[str] = None """ ISO code of a country """ country_name: Optional[str] = None """ Full name of a country """ customer_name: Optional[str] = None """ Customer name """ state: Optional[str] = None """ State/Province name. Mandatory for the USA, the UK and Canada """ state_id: Optional[str] = None """ Internal identifier of a state """ state_iso_code: Optional[str] = None """ ISO code of a state """ state_name: Optional[str] = None """ Full name of a state """ city: Optional[str] = None """ City name """ street: Optional[str] = None """ First line address """ street2: Optional[str] = None """ Second line address (apartment, suite, unit, building, floor, etc.) """ zip: Optional[str] = None """ Postal (Zip) code """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateNetworkRequestPrivateIpRangesItem(DataClassJsonMixin): id: Optional[str] = None start_ip: Optional[str] = None end_ip: Optional[str] = None name: Optional[str] = None """ Network name """ emergency_address: Optional[CreateNetworkRequestPrivateIpRangesItemEmergencyAddress] = None """ Emergency address information. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ emergency_location_id: Optional[str] = None """ Emergency response location (address) internal identifier. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateNetworkRequestEmergencyLocation(DataClassJsonMixin): """ Emergency response location information """ id: Optional[str] = None """ Internal identifier of an emergency response location """ name: Optional[str] = None """ Emergency response location name """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateNetworkRequest(DataClassJsonMixin): name: Optional[str] = None site: Optional[CreateNetworkRequestSite] = None public_ip_ranges: Optional[List[CreateNetworkRequestPublicIpRangesItem]] = None private_ip_ranges: Optional[List[CreateNetworkRequestPrivateIpRangesItem]] = None emergency_location: Optional[CreateNetworkRequestEmergencyLocation] = None """ Emergency response location information """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateNetworkResponseSite(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a site """ uri: Optional[str] = None """ Link to a site resource """ name: Optional[str] = None """ Name of a site """ code: Optional[str] = None """ Site code value. Returned only if specified """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateNetworkResponsePublicIpRangesItem(DataClassJsonMixin): id: Optional[str] = None start_ip: Optional[str] = None end_ip: Optional[str] = None matched: Optional[bool] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateNetworkResponsePrivateIpRangesItemEmergencyAddress(DataClassJsonMixin): """ Emergency address information. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned Generated by Python OpenAPI Parser """ country: Optional[str] = None """ Country name """ country_id: Optional[str] = None """ Internal identifier of a country """ country_iso_code: Optional[str] = None """ ISO code of a country """ country_name: Optional[str] = None """ Full name of a country """ customer_name: Optional[str] = None """ Customer name """ state: Optional[str] = None """ State/Province name. Mandatory for the USA, the UK and Canada """ state_id: Optional[str] = None """ Internal identifier of a state """ state_iso_code: Optional[str] = None """ ISO code of a state """ state_name: Optional[str] = None """ Full name of a state """ city: Optional[str] = None """ City name """ street: Optional[str] = None """ First line address """ street2: Optional[str] = None """ Second line address (apartment, suite, unit, building, floor, etc.) """ zip: Optional[str] = None """ Postal (Zip) code """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateNetworkResponsePrivateIpRangesItem(DataClassJsonMixin): id: Optional[str] = None start_ip: Optional[str] = None end_ip: Optional[str] = None name: Optional[str] = None """ Network name """ emergency_address: Optional[CreateNetworkResponsePrivateIpRangesItemEmergencyAddress] = None """ Emergency address information. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ emergency_location_id: Optional[str] = None """ Emergency response location (address) internal identifier. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ matched: Optional[bool] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateNetworkResponseEmergencyLocation(DataClassJsonMixin): """ Emergency response location information """ id: Optional[str] = None """ Internal identifier of an emergency response location """ name: Optional[str] = None """ Emergency response location name """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateNetworkResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a network """ uri: Optional[str] = None """ Link to a network resource """ name: Optional[str] = None site: Optional[CreateNetworkResponseSite] = None public_ip_ranges: Optional[List[CreateNetworkResponsePublicIpRangesItem]] = None private_ip_ranges: Optional[List[CreateNetworkResponsePrivateIpRangesItem]] = None emergency_location: Optional[CreateNetworkResponseEmergencyLocation] = None """ Emergency response location information """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadNetworkResponseSite(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a site """ uri: Optional[str] = None """ Link to a site resource """ name: Optional[str] = None """ Name of a site """ code: Optional[str] = None """ Site code value. Returned only if specified """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadNetworkResponsePublicIpRangesItem(DataClassJsonMixin): id: Optional[str] = None start_ip: Optional[str] = None end_ip: Optional[str] = None matched: Optional[bool] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadNetworkResponsePrivateIpRangesItemEmergencyAddress(DataClassJsonMixin): """ Emergency address information. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned Generated by Python OpenAPI Parser """ country: Optional[str] = None """ Country name """ country_id: Optional[str] = None """ Internal identifier of a country """ country_iso_code: Optional[str] = None """ ISO code of a country """ country_name: Optional[str] = None """ Full name of a country """ customer_name: Optional[str] = None """ Customer name """ state: Optional[str] = None """ State/Province name. Mandatory for the USA, the UK and Canada """ state_id: Optional[str] = None """ Internal identifier of a state """ state_iso_code: Optional[str] = None """ ISO code of a state """ state_name: Optional[str] = None """ Full name of a state """ city: Optional[str] = None """ City name """ street: Optional[str] = None """ First line address """ street2: Optional[str] = None """ Second line address (apartment, suite, unit, building, floor, etc.) """ zip: Optional[str] = None """ Postal (Zip) code """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadNetworkResponsePrivateIpRangesItem(DataClassJsonMixin): id: Optional[str] = None start_ip: Optional[str] = None end_ip: Optional[str] = None name: Optional[str] = None """ Network name """ emergency_address: Optional[ReadNetworkResponsePrivateIpRangesItemEmergencyAddress] = None """ Emergency address information. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ emergency_location_id: Optional[str] = None """ Emergency response location (address) internal identifier. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ matched: Optional[bool] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadNetworkResponseEmergencyLocation(DataClassJsonMixin): """ Emergency response location information """ id: Optional[str] = None """ Internal identifier of an emergency response location """ name: Optional[str] = None """ Emergency response location name """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadNetworkResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a network """ uri: Optional[str] = None """ Link to a network resource """ name: Optional[str] = None site: Optional[ReadNetworkResponseSite] = None public_ip_ranges: Optional[List[ReadNetworkResponsePublicIpRangesItem]] = None private_ip_ranges: Optional[List[ReadNetworkResponsePrivateIpRangesItem]] = None emergency_location: Optional[ReadNetworkResponseEmergencyLocation] = None """ Emergency response location information """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateNetworkRequestSite(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a site """ uri: Optional[str] = None """ Link to a site resource """ name: Optional[str] = None """ Name of a site """ code: Optional[str] = None """ Site code value. Returned only if specified """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateNetworkRequestPublicIpRangesItem(DataClassJsonMixin): id: Optional[str] = None start_ip: Optional[str] = None end_ip: Optional[str] = None matched: Optional[bool] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateNetworkRequestPrivateIpRangesItemEmergencyAddress(DataClassJsonMixin): """ Emergency address information. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned Generated by Python OpenAPI Parser """ country: Optional[str] = None """ Country name """ country_id: Optional[str] = None """ Internal identifier of a country """ country_iso_code: Optional[str] = None """ ISO code of a country """ country_name: Optional[str] = None """ Full name of a country """ customer_name: Optional[str] = None """ Customer name """ state: Optional[str] = None """ State/Province name. Mandatory for the USA, the UK and Canada """ state_id: Optional[str] = None """ Internal identifier of a state """ state_iso_code: Optional[str] = None """ ISO code of a state """ state_name: Optional[str] = None """ Full name of a state """ city: Optional[str] = None """ City name """ street: Optional[str] = None """ First line address """ street2: Optional[str] = None """ Second line address (apartment, suite, unit, building, floor, etc.) """ zip: Optional[str] = None """ Postal (Zip) code """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateNetworkRequestPrivateIpRangesItem(DataClassJsonMixin): id: Optional[str] = None start_ip: Optional[str] = None end_ip: Optional[str] = None name: Optional[str] = None """ Network name """ emergency_address: Optional[UpdateNetworkRequestPrivateIpRangesItemEmergencyAddress] = None """ Emergency address information. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ emergency_location_id: Optional[str] = None """ Emergency response location (address) internal identifier. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateNetworkRequestEmergencyLocation(DataClassJsonMixin): """ Emergency response location information """ id: Optional[str] = None """ Internal identifier of an emergency response location """ name: Optional[str] = None """ Emergency response location name """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateNetworkRequest(DataClassJsonMixin): name: Optional[str] = None site: Optional[UpdateNetworkRequestSite] = None public_ip_ranges: Optional[List[UpdateNetworkRequestPublicIpRangesItem]] = None private_ip_ranges: Optional[List[UpdateNetworkRequestPrivateIpRangesItem]] = None emergency_location: Optional[UpdateNetworkRequestEmergencyLocation] = None """ Emergency response location information """ class ListDevicesAutomaticLocationUpdatesResponseRecordsItemType(Enum): """ Device type """ HardPhone = 'HardPhone' SoftPhone = 'SoftPhone' OtherPhone = 'OtherPhone' class ListDevicesAutomaticLocationUpdatesResponseRecordsItemModelFeaturesItem(Enum): BLA = 'BLA' Intercom = 'Intercom' Paging = 'Paging' HELD = 'HELD' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListDevicesAutomaticLocationUpdatesResponseRecordsItemModel(DataClassJsonMixin): """ HardPhone model information """ id: Optional[str] = None """ Device model identifier """ name: Optional[str] = None """ Device name """ features: Optional[List[ListDevicesAutomaticLocationUpdatesResponseRecordsItemModelFeaturesItem]] = None """ Device feature or multiple features supported """ class ListDevicesAutomaticLocationUpdatesResponseRecordsItemPhoneLinesItemLineType(Enum): Unknown = 'Unknown' Standalone = 'Standalone' StandaloneFree = 'StandaloneFree' BlaPrimary = 'BlaPrimary' BlaSecondary = 'BlaSecondary' BLF = 'BLF' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListDevicesAutomaticLocationUpdatesResponseRecordsItemPhoneLinesItemPhoneInfo(DataClassJsonMixin): id: Optional[int] = None """ Internal identifier of a phone number """ phone_number: Optional[str] = None """ Phone number """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListDevicesAutomaticLocationUpdatesResponseRecordsItemPhoneLinesItem(DataClassJsonMixin): line_type: Optional[ListDevicesAutomaticLocationUpdatesResponseRecordsItemPhoneLinesItemLineType] = None phone_info: Optional[ListDevicesAutomaticLocationUpdatesResponseRecordsItemPhoneLinesItemPhoneInfo] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListDevicesAutomaticLocationUpdatesResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a device """ type: Optional[ListDevicesAutomaticLocationUpdatesResponseRecordsItemType] = 'HardPhone' """ Device type """ serial: Optional[str] = None """ Serial number for HardPhone (is returned only when the phone is shipped and provisioned) """ feature_enabled: Optional[bool] = None """ Specifies if Automatic Location Updates feature is enabled """ name: Optional[str] = None """ Device name """ model: Optional[ListDevicesAutomaticLocationUpdatesResponseRecordsItemModel] = None """ HardPhone model information """ site: Optional[str] = None """ Site data """ phone_lines: Optional[List[ListDevicesAutomaticLocationUpdatesResponseRecordsItemPhoneLinesItem]] = None """ Phone lines information """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListDevicesAutomaticLocationUpdatesResponseNavigationFirstPage(DataClassJsonMixin): """ Canonical URI for the first page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListDevicesAutomaticLocationUpdatesResponseNavigationNextPage(DataClassJsonMixin): """ Canonical URI for the next page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListDevicesAutomaticLocationUpdatesResponseNavigationPreviousPage(DataClassJsonMixin): """ Canonical URI for the previous page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListDevicesAutomaticLocationUpdatesResponseNavigationLastPage(DataClassJsonMixin): """ Canonical URI for the last page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListDevicesAutomaticLocationUpdatesResponseNavigation(DataClassJsonMixin): first_page: Optional[ListDevicesAutomaticLocationUpdatesResponseNavigationFirstPage] = None """ Canonical URI for the first page of the list """ next_page: Optional[ListDevicesAutomaticLocationUpdatesResponseNavigationNextPage] = None """ Canonical URI for the next page of the list """ previous_page: Optional[ListDevicesAutomaticLocationUpdatesResponseNavigationPreviousPage] = None """ Canonical URI for the previous page of the list """ last_page: Optional[ListDevicesAutomaticLocationUpdatesResponseNavigationLastPage] = None """ Canonical URI for the last page of the list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListDevicesAutomaticLocationUpdatesResponsePaging(DataClassJsonMixin): page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) """ per_page: Optional[int] = None """ Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty """ total_pages: Optional[int] = None """ The total number of pages in a dataset. May be omitted for some resources due to performance reasons """ total_elements: Optional[int] = None """ The total number of elements in a dataset. May be omitted for some resource due to performance reasons """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListDevicesAutomaticLocationUpdatesResponse(DataClassJsonMixin): uri: Optional[str] = None """ Link to devices resource """ records: Optional[List[ListDevicesAutomaticLocationUpdatesResponseRecordsItem]] = None """ List of users' devices with the current status of Emergency Address Auto Update Feature """ navigation: Optional[ListDevicesAutomaticLocationUpdatesResponseNavigation] = None paging: Optional[ListDevicesAutomaticLocationUpdatesResponsePaging] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AssignMultipleDevicesAutomaticLocationUpdatesRequest(DataClassJsonMixin): enabled_device_ids: Optional[List[str]] = None disabled_device_ids: Optional[List[str]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAccountSwitchesResponseRecordsItemSite(DataClassJsonMixin): """ Site data """ id: Optional[str] = None """ Internal identifier of a site. The company identifier value is 'main-site' """ name: Optional[str] = None """ Name of a site """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAccountSwitchesResponseRecordsItemEmergencyAddress(DataClassJsonMixin): """ Emergency address assigned to the switch. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned Generated by Python OpenAPI Parser """ country: Optional[str] = None """ Country name """ country_id: Optional[str] = None """ Internal identifier of a country """ country_iso_code: Optional[str] = None """ ISO code of a country """ country_name: Optional[str] = None """ Full name of a country """ customer_name: Optional[str] = None """ Customer name """ state: Optional[str] = None """ State/Province name. Mandatory for the USA, the UK and Canada """ state_id: Optional[str] = None """ Internal identifier of a state """ state_iso_code: Optional[str] = None """ ISO code of a state """ state_name: Optional[str] = None """ Full name of a state """ city: Optional[str] = None """ City name """ street: Optional[str] = None """ First line address """ street2: Optional[str] = None """ Second line address (apartment, suite, unit, building, floor, etc.) """ zip: Optional[str] = None """ Postal (Zip) code """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAccountSwitchesResponseRecordsItemEmergencyLocation(DataClassJsonMixin): """ Emergency response location information """ id: Optional[str] = None """ Internal identifier of an emergency response location """ name: Optional[str] = None """ Emergency response location name """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAccountSwitchesResponseRecordsItem(DataClassJsonMixin): uri: Optional[str] = None """ Link to the network switch resource """ id: Optional[str] = None """ Internal identifier of a network switch """ chassis_id: Optional[str] = None """ Unique identifier of a network switch """ name: Optional[str] = None """ Name of a network switch """ site: Optional[ListAccountSwitchesResponseRecordsItemSite] = None """ Site data """ emergency_address: Optional[ListAccountSwitchesResponseRecordsItemEmergencyAddress] = None """ Emergency address assigned to the switch. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ emergency_location_id: Optional[str] = None """ Deprecated. Emergency response location (address) internal identifier. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ emergency_location: Optional[ListAccountSwitchesResponseRecordsItemEmergencyLocation] = None """ Emergency response location information """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAccountSwitchesResponseNavigationFirstPage(DataClassJsonMixin): """ Canonical URI for the first page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAccountSwitchesResponseNavigationNextPage(DataClassJsonMixin): """ Canonical URI for the next page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAccountSwitchesResponseNavigationPreviousPage(DataClassJsonMixin): """ Canonical URI for the previous page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAccountSwitchesResponseNavigationLastPage(DataClassJsonMixin): """ Canonical URI for the last page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAccountSwitchesResponseNavigation(DataClassJsonMixin): first_page: Optional[ListAccountSwitchesResponseNavigationFirstPage] = None """ Canonical URI for the first page of the list """ next_page: Optional[ListAccountSwitchesResponseNavigationNextPage] = None """ Canonical URI for the next page of the list """ previous_page: Optional[ListAccountSwitchesResponseNavigationPreviousPage] = None """ Canonical URI for the previous page of the list """ last_page: Optional[ListAccountSwitchesResponseNavigationLastPage] = None """ Canonical URI for the last page of the list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAccountSwitchesResponsePaging(DataClassJsonMixin): page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) """ per_page: Optional[int] = None """ Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty """ total_pages: Optional[int] = None """ The total number of pages in a dataset. May be omitted for some resources due to performance reasons """ total_elements: Optional[int] = None """ The total number of elements in a dataset. May be omitted for some resource due to performance reasons """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAccountSwitchesResponse(DataClassJsonMixin): uri: Optional[str] = None """ Link to the switches list resource """ records: Optional[List[ListAccountSwitchesResponseRecordsItem]] = None """ Switches map """ navigation: Optional[ListAccountSwitchesResponseNavigation] = None paging: Optional[ListAccountSwitchesResponsePaging] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSwitchRequestSite(DataClassJsonMixin): """ Site data """ id: Optional[str] = None """ Internal identifier of a site. The company identifier value is 'main-site' """ name: Optional[str] = None """ Name of a site """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSwitchRequestEmergencyAddress(DataClassJsonMixin): """ Emergency address assigned to the switch. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned Generated by Python OpenAPI Parser """ country: Optional[str] = None """ Country name """ country_id: Optional[str] = None """ Internal identifier of a country """ country_iso_code: Optional[str] = None """ ISO code of a country """ country_name: Optional[str] = None """ Full name of a country """ customer_name: Optional[str] = None """ Customer name """ state: Optional[str] = None """ State/Province name. Mandatory for the USA, the UK and Canada """ state_id: Optional[str] = None """ Internal identifier of a state """ state_iso_code: Optional[str] = None """ ISO code of a state """ state_name: Optional[str] = None """ Full name of a state """ city: Optional[str] = None """ City name """ street: Optional[str] = None """ First line address """ street2: Optional[str] = None """ Second line address (apartment, suite, unit, building, floor, etc.) """ zip: Optional[str] = None """ Postal (Zip) code """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSwitchRequestEmergencyLocation(DataClassJsonMixin): """ Emergency response location information """ id: Optional[str] = None """ Internal identifier of an emergency response location """ name: Optional[str] = None """ Emergency response location name """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSwitchRequest(DataClassJsonMixin): """ Required Properties: - chassis_id Generated by Python OpenAPI Parser """ chassis_id: str """ Unique identifier of a network switch. The supported formats are: XX:XX:XX:XX:XX:XX (symbols 0-9 and A-F) for MAC address and X.X.X.X for IP address (symbols 0-255) """ name: Optional[str] = None """ Name of a network switch """ site: Optional[CreateSwitchRequestSite] = None """ Site data """ emergency_address: Optional[CreateSwitchRequestEmergencyAddress] = None """ Emergency address assigned to the switch. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ emergency_location_id: Optional[str] = None """ Deprecated. Emergency response location (address) internal identifier. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ emergency_location: Optional[CreateSwitchRequestEmergencyLocation] = None """ Emergency response location information """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSwitchResponseSite(DataClassJsonMixin): """ Site data """ id: Optional[str] = None """ Internal identifier of a site. The company identifier value is 'main-site' """ name: Optional[str] = None """ Name of a site """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSwitchResponseEmergencyAddress(DataClassJsonMixin): """ Emergency address assigned to the switch. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned Generated by Python OpenAPI Parser """ country: Optional[str] = None """ Country name """ country_id: Optional[str] = None """ Internal identifier of a country """ country_iso_code: Optional[str] = None """ ISO code of a country """ country_name: Optional[str] = None """ Full name of a country """ customer_name: Optional[str] = None """ Customer name """ state: Optional[str] = None """ State/Province name. Mandatory for the USA, the UK and Canada """ state_id: Optional[str] = None """ Internal identifier of a state """ state_iso_code: Optional[str] = None """ ISO code of a state """ state_name: Optional[str] = None """ Full name of a state """ city: Optional[str] = None """ City name """ street: Optional[str] = None """ First line address """ street2: Optional[str] = None """ Second line address (apartment, suite, unit, building, floor, etc.) """ zip: Optional[str] = None """ Postal (Zip) code """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSwitchResponseEmergencyLocation(DataClassJsonMixin): """ Emergency response location information """ id: Optional[str] = None """ Internal identifier of an emergency response location """ name: Optional[str] = None """ Emergency response location name """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSwitchResponse(DataClassJsonMixin): uri: Optional[str] = None """ Link to the network switch resource """ id: Optional[str] = None """ Internal identifier of a network switch """ chassis_id: Optional[str] = None """ Unique identifier of a network switch """ name: Optional[str] = None """ Name of a network switch """ site: Optional[CreateSwitchResponseSite] = None """ Site data """ emergency_address: Optional[CreateSwitchResponseEmergencyAddress] = None """ Emergency address assigned to the switch. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ emergency_location_id: Optional[str] = None """ Deprecated. Emergency response location (address) internal identifier. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ emergency_location: Optional[CreateSwitchResponseEmergencyLocation] = None """ Emergency response location information """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadSwitchResponseSite(DataClassJsonMixin): """ Site data """ id: Optional[str] = None """ Internal identifier of a site. The company identifier value is 'main-site' """ name: Optional[str] = None """ Name of a site """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadSwitchResponseEmergencyAddress(DataClassJsonMixin): """ Emergency address assigned to the switch. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned Generated by Python OpenAPI Parser """ country: Optional[str] = None """ Country name """ country_id: Optional[str] = None """ Internal identifier of a country """ country_iso_code: Optional[str] = None """ ISO code of a country """ country_name: Optional[str] = None """ Full name of a country """ customer_name: Optional[str] = None """ Customer name """ state: Optional[str] = None """ State/Province name. Mandatory for the USA, the UK and Canada """ state_id: Optional[str] = None """ Internal identifier of a state """ state_iso_code: Optional[str] = None """ ISO code of a state """ state_name: Optional[str] = None """ Full name of a state """ city: Optional[str] = None """ City name """ street: Optional[str] = None """ First line address """ street2: Optional[str] = None """ Second line address (apartment, suite, unit, building, floor, etc.) """ zip: Optional[str] = None """ Postal (Zip) code """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadSwitchResponseEmergencyLocation(DataClassJsonMixin): """ Emergency response location information """ id: Optional[str] = None """ Internal identifier of an emergency response location """ name: Optional[str] = None """ Emergency response location name """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadSwitchResponse(DataClassJsonMixin): uri: Optional[str] = None """ Link to the network switch resource """ id: Optional[str] = None """ Internal identifier of a network switch """ chassis_id: Optional[str] = None """ Unique identifier of a network switch """ name: Optional[str] = None """ Name of a network switch """ site: Optional[ReadSwitchResponseSite] = None """ Site data """ emergency_address: Optional[ReadSwitchResponseEmergencyAddress] = None """ Emergency address assigned to the switch. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ emergency_location_id: Optional[str] = None """ Deprecated. Emergency response location (address) internal identifier. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ emergency_location: Optional[ReadSwitchResponseEmergencyLocation] = None """ Emergency response location information """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateSwitchRequestSite(DataClassJsonMixin): """ Site data """ id: Optional[str] = None """ Internal identifier of a site. The company identifier value is 'main-site' """ name: Optional[str] = None """ Name of a site """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateSwitchRequestEmergencyAddress(DataClassJsonMixin): """ Emergency address assigned to the switch. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned Generated by Python OpenAPI Parser """ country: Optional[str] = None """ Country name """ country_id: Optional[str] = None """ Internal identifier of a country """ country_iso_code: Optional[str] = None """ ISO code of a country """ country_name: Optional[str] = None """ Full name of a country """ customer_name: Optional[str] = None """ Customer name """ state: Optional[str] = None """ State/Province name. Mandatory for the USA, the UK and Canada """ state_id: Optional[str] = None """ Internal identifier of a state """ state_iso_code: Optional[str] = None """ ISO code of a state """ state_name: Optional[str] = None """ Full name of a state """ city: Optional[str] = None """ City name """ street: Optional[str] = None """ First line address """ street2: Optional[str] = None """ Second line address (apartment, suite, unit, building, floor, etc.) """ zip: Optional[str] = None """ Postal (Zip) code """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateSwitchRequestEmergencyLocation(DataClassJsonMixin): """ Emergency response location information """ id: Optional[str] = None """ Internal identifier of an emergency response location """ name: Optional[str] = None """ Emergency response location name """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateSwitchRequest(DataClassJsonMixin): id: Optional[str] = None """ internal identifier of a switch """ chassis_id: Optional[str] = None """ Unique identifier of a network switch. The supported formats are: XX:XX:XX:XX:XX:XX (symbols 0-9 and A-F) for MAC address and X.X.X.X for IP address (symbols 0-255) """ name: Optional[str] = None """ Name of a network switch """ site: Optional[UpdateSwitchRequestSite] = None """ Site data """ emergency_address: Optional[UpdateSwitchRequestEmergencyAddress] = None """ Emergency address assigned to the switch. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ emergency_location_id: Optional[str] = None """ Deprecated. Emergency response location (address) internal identifier. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ emergency_location: Optional[UpdateSwitchRequestEmergencyLocation] = None """ Emergency response location information """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateSwitchResponseSite(DataClassJsonMixin): """ Site data """ id: Optional[str] = None """ Internal identifier of a site. The company identifier value is 'main-site' """ name: Optional[str] = None """ Name of a site """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateSwitchResponseEmergencyAddress(DataClassJsonMixin): """ Emergency address assigned to the switch. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned Generated by Python OpenAPI Parser """ country: Optional[str] = None """ Country name """ country_id: Optional[str] = None """ Internal identifier of a country """ country_iso_code: Optional[str] = None """ ISO code of a country """ country_name: Optional[str] = None """ Full name of a country """ customer_name: Optional[str] = None """ Customer name """ state: Optional[str] = None """ State/Province name. Mandatory for the USA, the UK and Canada """ state_id: Optional[str] = None """ Internal identifier of a state """ state_iso_code: Optional[str] = None """ ISO code of a state """ state_name: Optional[str] = None """ Full name of a state """ city: Optional[str] = None """ City name """ street: Optional[str] = None """ First line address """ street2: Optional[str] = None """ Second line address (apartment, suite, unit, building, floor, etc.) """ zip: Optional[str] = None """ Postal (Zip) code """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateSwitchResponseEmergencyLocation(DataClassJsonMixin): """ Emergency response location information """ id: Optional[str] = None """ Internal identifier of an emergency response location """ name: Optional[str] = None """ Emergency response location name """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateSwitchResponse(DataClassJsonMixin): uri: Optional[str] = None """ Link to the network switch resource """ id: Optional[str] = None """ Internal identifier of a network switch """ chassis_id: Optional[str] = None """ Unique identifier of a network switch """ name: Optional[str] = None """ Name of a network switch """ site: Optional[UpdateSwitchResponseSite] = None """ Site data """ emergency_address: Optional[UpdateSwitchResponseEmergencyAddress] = None """ Emergency address assigned to the switch. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ emergency_location_id: Optional[str] = None """ Deprecated. Emergency response location (address) internal identifier. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ emergency_location: Optional[UpdateSwitchResponseEmergencyLocation] = None """ Emergency response location information """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateMultipleSwitchesRequestRecordsItemSite(DataClassJsonMixin): """ Site data """ id: Optional[str] = None """ Internal identifier of a site. The company identifier value is 'main-site' """ name: Optional[str] = None """ Name of a site """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateMultipleSwitchesRequestRecordsItemEmergencyAddress(DataClassJsonMixin): """ Emergency address assigned to the switch. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned Generated by Python OpenAPI Parser """ country: Optional[str] = None """ Country name """ country_id: Optional[str] = None """ Internal identifier of a country """ country_iso_code: Optional[str] = None """ ISO code of a country """ country_name: Optional[str] = None """ Full name of a country """ customer_name: Optional[str] = None """ Customer name """ state: Optional[str] = None """ State/Province name. Mandatory for the USA, the UK and Canada """ state_id: Optional[str] = None """ Internal identifier of a state """ state_iso_code: Optional[str] = None """ ISO code of a state """ state_name: Optional[str] = None """ Full name of a state """ city: Optional[str] = None """ City name """ street: Optional[str] = None """ First line address """ street2: Optional[str] = None """ Second line address (apartment, suite, unit, building, floor, etc.) """ zip: Optional[str] = None """ Postal (Zip) code """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateMultipleSwitchesRequestRecordsItemEmergencyLocation(DataClassJsonMixin): """ Emergency response location information """ id: Optional[str] = None """ Internal identifier of an emergency response location """ name: Optional[str] = None """ Emergency response location name """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateMultipleSwitchesRequestRecordsItem(DataClassJsonMixin): """ Required Properties: - chassis_id Generated by Python OpenAPI Parser """ chassis_id: str """ Unique identifier of a network switch. The supported formats are: XX:XX:XX:XX:XX:XX (symbols 0-9 and A-F) for MAC address and X.X.X.X for IP address (symbols 0-255) """ name: Optional[str] = None """ Name of a network switch """ site: Optional[CreateMultipleSwitchesRequestRecordsItemSite] = None """ Site data """ emergency_address: Optional[CreateMultipleSwitchesRequestRecordsItemEmergencyAddress] = None """ Emergency address assigned to the switch. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ emergency_location_id: Optional[str] = None """ Deprecated. Emergency response location (address) internal identifier. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ emergency_location: Optional[CreateMultipleSwitchesRequestRecordsItemEmergencyLocation] = None """ Emergency response location information """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateMultipleSwitchesRequest(DataClassJsonMixin): records: Optional[List[CreateMultipleSwitchesRequestRecordsItem]] = None class CreateMultipleSwitchesResponseTaskStatus(Enum): """ Status of a task """ Accepted = 'Accepted' Failed = 'Failed' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateMultipleSwitchesResponseTask(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a task for multiple switches creation """ status: Optional[CreateMultipleSwitchesResponseTaskStatus] = None """ Status of a task """ creation_time: Optional[str] = None """ Task creation time """ last_modified_time: Optional[str] = None """ Time of the task latest modification """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateMultipleSwitchesResponse(DataClassJsonMixin): """ Information on the task for multiple switches creation """ task: Optional[CreateMultipleSwitchesResponseTask] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateMultipleSwitchesRequestRecordsItemSite(DataClassJsonMixin): """ Site data """ id: Optional[str] = None """ Internal identifier of a site. The company identifier value is 'main-site' """ name: Optional[str] = None """ Name of a site """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateMultipleSwitchesRequestRecordsItemEmergencyAddress(DataClassJsonMixin): """ Emergency address assigned to the switch. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned Generated by Python OpenAPI Parser """ country: Optional[str] = None """ Country name """ country_id: Optional[str] = None """ Internal identifier of a country """ country_iso_code: Optional[str] = None """ ISO code of a country """ country_name: Optional[str] = None """ Full name of a country """ customer_name: Optional[str] = None """ Customer name """ state: Optional[str] = None """ State/Province name. Mandatory for the USA, the UK and Canada """ state_id: Optional[str] = None """ Internal identifier of a state """ state_iso_code: Optional[str] = None """ ISO code of a state """ state_name: Optional[str] = None """ Full name of a state """ city: Optional[str] = None """ City name """ street: Optional[str] = None """ First line address """ street2: Optional[str] = None """ Second line address (apartment, suite, unit, building, floor, etc.) """ zip: Optional[str] = None """ Postal (Zip) code """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateMultipleSwitchesRequestRecordsItemEmergencyLocation(DataClassJsonMixin): """ Emergency response location information """ id: Optional[str] = None """ Internal identifier of an emergency response location """ name: Optional[str] = None """ Emergency response location name """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateMultipleSwitchesRequestRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ internal identifier of a switch """ chassis_id: Optional[str] = None """ Unique identifier of a network switch. The supported formats are: XX:XX:XX:XX:XX:XX (symbols 0-9 and A-F) for MAC address and X.X.X.X for IP address (symbols 0-255) """ name: Optional[str] = None """ Name of a network switch """ site: Optional[UpdateMultipleSwitchesRequestRecordsItemSite] = None """ Site data """ emergency_address: Optional[UpdateMultipleSwitchesRequestRecordsItemEmergencyAddress] = None """ Emergency address assigned to the switch. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ emergency_location_id: Optional[str] = None """ Deprecated. Emergency response location (address) internal identifier. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ emergency_location: Optional[UpdateMultipleSwitchesRequestRecordsItemEmergencyLocation] = None """ Emergency response location information """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateMultipleSwitchesRequest(DataClassJsonMixin): records: Optional[List[UpdateMultipleSwitchesRequestRecordsItem]] = None class UpdateMultipleSwitchesResponseTaskStatus(Enum): """ Status of a task """ Accepted = 'Accepted' Failed = 'Failed' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateMultipleSwitchesResponseTask(DataClassJsonMixin): """ Information on the task for multiple switches update """ id: Optional[str] = None """ Internal identifier of a task for multiple switches creation """ status: Optional[UpdateMultipleSwitchesResponseTaskStatus] = None """ Status of a task """ creation_time: Optional[str] = None """ Task creation time """ last_modified_time: Optional[str] = None """ Time of the task latest modification """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateMultipleSwitchesResponse(DataClassJsonMixin): task: Optional[UpdateMultipleSwitchesResponseTask] = None """ Information on the task for multiple switches update """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateMultipleWirelessPointsRequestRecordsItemSite(DataClassJsonMixin): """ Site data. If multi-site feature is turned on for the account, then internal identifier of a site must be specified. To assign the wireless point to the main site (company) set site ID to `main-site` Generated by Python OpenAPI Parser """ id: Optional[str] = None """ Internal identifier of a site """ uri: Optional[str] = None """ Link to a site resource """ name: Optional[str] = None """ Name of a site """ code: Optional[str] = None """ Site code value. Returned only if specified """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateMultipleWirelessPointsRequestRecordsItemEmergencyAddress(DataClassJsonMixin): """ Emergency address information. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned Generated by Python OpenAPI Parser """ country: Optional[str] = None """ Country name """ country_id: Optional[str] = None """ Internal identifier of a country """ country_iso_code: Optional[str] = None """ ISO code of a country """ country_name: Optional[str] = None """ Full name of a country """ customer_name: Optional[str] = None """ Customer name """ state: Optional[str] = None """ State/Province name. Mandatory for the USA, the UK and Canada """ state_id: Optional[str] = None """ Internal identifier of a state """ state_iso_code: Optional[str] = None """ ISO code of a state """ state_name: Optional[str] = None """ Full name of a state """ city: Optional[str] = None """ City name """ street: Optional[str] = None """ First line address """ street2: Optional[str] = None """ Second line address (apartment, suite, unit, building, floor, etc.) """ zip: Optional[str] = None """ Postal (Zip) code """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateMultipleWirelessPointsRequestRecordsItemEmergencyLocation(DataClassJsonMixin): """ Emergency response location information """ id: Optional[str] = None """ Internal identifier of an emergency response location """ name: Optional[str] = None """ Emergency response location name """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateMultipleWirelessPointsRequestRecordsItem(DataClassJsonMixin): """ Required Properties: - bssid - name - emergency_address Generated by Python OpenAPI Parser """ bssid: str """ Unique 48-bit identifier of wireless access point complying with MAC address conventions. The Mask is XX:XX:XX:XX:XX:XX, where X can be a symbol in the range of 0-9 or A-F """ name: str """ Wireless access point name """ emergency_address: CreateMultipleWirelessPointsRequestRecordsItemEmergencyAddress """ Emergency address information. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ site: Optional[CreateMultipleWirelessPointsRequestRecordsItemSite] = None """ Site data. If multi-site feature is turned on for the account, then internal identifier of a site must be specified. To assign the wireless point to the main site (company) set site ID to `main-site` """ emergency_location_id: Optional[str] = None """ Deprecated. Internal identifier of the emergency response location (address). Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ emergency_location: Optional[CreateMultipleWirelessPointsRequestRecordsItemEmergencyLocation] = None """ Emergency response location information """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateMultipleWirelessPointsRequest(DataClassJsonMixin): records: Optional[List[CreateMultipleWirelessPointsRequestRecordsItem]] = None class CreateMultipleWirelessPointsResponseTaskStatus(Enum): """ Status of a task """ Accepted = 'Accepted' Failed = 'Failed' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateMultipleWirelessPointsResponseTask(DataClassJsonMixin): """ Information on the task for multiple wireless points creation """ id: Optional[str] = None """ Internal identifier of a task for multiple switches creation """ status: Optional[CreateMultipleWirelessPointsResponseTaskStatus] = None """ Status of a task """ creation_time: Optional[str] = None """ Task creation time """ last_modified_time: Optional[str] = None """ Time of the task latest modification """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateMultipleWirelessPointsResponse(DataClassJsonMixin): task: Optional[CreateMultipleWirelessPointsResponseTask] = None """ Information on the task for multiple wireless points creation """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateMultipleWirelessPointsRequestRecordsItemSite(DataClassJsonMixin): """ Site data. If multi-site feature is turned on for the account, then internal identifier of a site must be specified. To assign the wireless point to the main site (company) set site ID to `main-site` Generated by Python OpenAPI Parser """ id: Optional[str] = None """ Internal identifier of a site """ uri: Optional[str] = None """ Link to a site resource """ name: Optional[str] = None """ Name of a site """ code: Optional[str] = None """ Site code value. Returned only if specified """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateMultipleWirelessPointsRequestRecordsItemEmergencyAddress(DataClassJsonMixin): """ Emergency address information. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned Generated by Python OpenAPI Parser """ country: Optional[str] = None """ Country name """ country_id: Optional[str] = None """ Internal identifier of a country """ country_iso_code: Optional[str] = None """ ISO code of a country """ country_name: Optional[str] = None """ Full name of a country """ customer_name: Optional[str] = None """ Customer name """ state: Optional[str] = None """ State/Province name. Mandatory for the USA, the UK and Canada """ state_id: Optional[str] = None """ Internal identifier of a state """ state_iso_code: Optional[str] = None """ ISO code of a state """ state_name: Optional[str] = None """ Full name of a state """ city: Optional[str] = None """ City name """ street: Optional[str] = None """ First line address """ street2: Optional[str] = None """ Second line address (apartment, suite, unit, building, floor, etc.) """ zip: Optional[str] = None """ Postal (Zip) code """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateMultipleWirelessPointsRequestRecordsItemEmergencyLocation(DataClassJsonMixin): """ Emergency response location information """ id: Optional[str] = None """ Internal identifier of an emergency response location """ name: Optional[str] = None """ Emergency response location name """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateMultipleWirelessPointsRequestRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a wireless point """ bssid: Optional[str] = None """ Unique 48-bit identifier of wireless access point complying with MAC address conventions. Mask: XX:XX:XX:XX:XX:XX, where X can be a symbol in the range of 0-9 or A-F """ name: Optional[str] = None """ Wireless access point name """ site: Optional[UpdateMultipleWirelessPointsRequestRecordsItemSite] = None """ Site data. If multi-site feature is turned on for the account, then internal identifier of a site must be specified. To assign the wireless point to the main site (company) set site ID to `main-site` """ emergency_address: Optional[UpdateMultipleWirelessPointsRequestRecordsItemEmergencyAddress] = None """ Emergency address information. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ emergency_location_id: Optional[str] = None """ Deprecated. Internal identifier of the emergency response location (address). Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ emergency_location: Optional[UpdateMultipleWirelessPointsRequestRecordsItemEmergencyLocation] = None """ Emergency response location information """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateMultipleWirelessPointsRequest(DataClassJsonMixin): records: Optional[List[UpdateMultipleWirelessPointsRequestRecordsItem]] = None class UpdateMultipleWirelessPointsResponseTaskStatus(Enum): """ Status of a task """ Accepted = 'Accepted' Failed = 'Failed' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateMultipleWirelessPointsResponseTask(DataClassJsonMixin): """ Information on the task for multiple wireless points update """ id: Optional[str] = None """ Internal identifier of a task for multiple switches creation """ status: Optional[UpdateMultipleWirelessPointsResponseTaskStatus] = None """ Status of a task """ creation_time: Optional[str] = None """ Task creation time """ last_modified_time: Optional[str] = None """ Time of the task latest modification """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateMultipleWirelessPointsResponse(DataClassJsonMixin): task: Optional[UpdateMultipleWirelessPointsResponseTask] = None """ Information on the task for multiple wireless points update """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ValidateMultipleWirelessPointsRequestRecordsItemSite(DataClassJsonMixin): """ Site data (internal identifier and custom name of a site) """ id: Optional[str] = None """ Internal identifier of a site """ uri: Optional[str] = None """ Link to a site resource """ name: Optional[str] = None """ Name of a site """ code: Optional[str] = None """ Site code value. Returned only if specified """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ValidateMultipleWirelessPointsRequestRecordsItemEmergencyAddress(DataClassJsonMixin): """ Emergency address assigned to the wireless point. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned Generated by Python OpenAPI Parser """ country: Optional[str] = None """ Country name """ country_id: Optional[str] = None """ Internal identifier of a country """ country_iso_code: Optional[str] = None """ ISO code of a country """ country_name: Optional[str] = None """ Full name of a country """ customer_name: Optional[str] = None """ Customer name """ state: Optional[str] = None """ State/Province name. Mandatory for the USA, the UK and Canada """ state_id: Optional[str] = None """ Internal identifier of a state """ state_iso_code: Optional[str] = None """ ISO code of a state """ state_name: Optional[str] = None """ Full name of a state """ city: Optional[str] = None """ City name """ street: Optional[str] = None """ First line address """ street2: Optional[str] = None """ Second line address (apartment, suite, unit, building, floor, etc.) """ zip: Optional[str] = None """ Postal (Zip) code """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ValidateMultipleWirelessPointsRequestRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a wireless point """ bssid: Optional[str] = None """ Unique 48-bit identifier of the wireless access point complying with MAC address conventions """ name: Optional[str] = None """ Wireless access point name """ site: Optional[ValidateMultipleWirelessPointsRequestRecordsItemSite] = None """ Site data (internal identifier and custom name of a site) """ emergency_address: Optional[ValidateMultipleWirelessPointsRequestRecordsItemEmergencyAddress] = None """ Emergency address assigned to the wireless point. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ emergency_location_id: Optional[str] = None """ Emergency response location (address) internal identifier. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ValidateMultipleWirelessPointsRequest(DataClassJsonMixin): records: Optional[List[ValidateMultipleWirelessPointsRequestRecordsItem]] = None class ValidateMultipleWirelessPointsResponseRecordsItemStatus(Enum): """ Validation result status """ Valid = 'Valid' Invalid = 'Invalid' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ValidateMultipleWirelessPointsResponseRecordsItemErrorsItem(DataClassJsonMixin): error_code: Optional[str] = None """ Error code """ message: Optional[str] = None """ Error message """ parameter_name: Optional[str] = None """ Name of invalid parameter """ feature_name: Optional[str] = None parameter_value: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ValidateMultipleWirelessPointsResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a wireless point """ bssid: Optional[str] = None """ Unique 48-bit identifier of the wireless access point complying with MAC address conventions """ status: Optional[ValidateMultipleWirelessPointsResponseRecordsItemStatus] = None """ Validation result status """ errors: Optional[List[ValidateMultipleWirelessPointsResponseRecordsItemErrorsItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ValidateMultipleWirelessPointsResponse(DataClassJsonMixin): records: Optional[List[ValidateMultipleWirelessPointsResponseRecordsItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ValidateMultipleSwitchesRequestRecordsItemSite(DataClassJsonMixin): """ Site data """ id: Optional[str] = None """ Internal identifier of a site. The company identifier value is 'main-site' """ name: Optional[str] = None """ Name of a site """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ValidateMultipleSwitchesRequestRecordsItemEmergencyAddress(DataClassJsonMixin): """ Emergency address assigned to the switch. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned Generated by Python OpenAPI Parser """ country: Optional[str] = None """ Country name """ country_id: Optional[str] = None """ Internal identifier of a country """ country_iso_code: Optional[str] = None """ ISO code of a country """ country_name: Optional[str] = None """ Full name of a country """ customer_name: Optional[str] = None """ Customer name """ state: Optional[str] = None """ State/Province name. Mandatory for the USA, the UK and Canada """ state_id: Optional[str] = None """ Internal identifier of a state """ state_iso_code: Optional[str] = None """ ISO code of a state """ state_name: Optional[str] = None """ Full name of a state """ city: Optional[str] = None """ City name """ street: Optional[str] = None """ First line address """ street2: Optional[str] = None """ Second line address (apartment, suite, unit, building, floor, etc.) """ zip: Optional[str] = None """ Postal (Zip) code """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ValidateMultipleSwitchesRequestRecordsItemEmergencyLocation(DataClassJsonMixin): """ Emergency response location information """ id: Optional[str] = None """ Internal identifier of an emergency response location """ name: Optional[str] = None """ Emergency response location name """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ValidateMultipleSwitchesRequestRecordsItem(DataClassJsonMixin): uri: Optional[str] = None """ Link to the network switch resource """ id: Optional[str] = None """ Internal identifier of a network switch """ chassis_id: Optional[str] = None """ Unique identifier of a network switch """ name: Optional[str] = None """ Name of a network switch """ site: Optional[ValidateMultipleSwitchesRequestRecordsItemSite] = None """ Site data """ emergency_address: Optional[ValidateMultipleSwitchesRequestRecordsItemEmergencyAddress] = None """ Emergency address assigned to the switch. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ emergency_location_id: Optional[str] = None """ Deprecated. Emergency response location (address) internal identifier. Only one of a pair `emergencyAddress` or `emergencyLocationId` should be specified, otherwise the error is returned """ emergency_location: Optional[ValidateMultipleSwitchesRequestRecordsItemEmergencyLocation] = None """ Emergency response location information """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ValidateMultipleSwitchesRequest(DataClassJsonMixin): records: Optional[List[ValidateMultipleSwitchesRequestRecordsItem]] = None class ValidateMultipleSwitchesResponseRecordsItemStatus(Enum): """ Validation result status """ Valid = 'Valid' Invalid = 'Invalid' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ValidateMultipleSwitchesResponseRecordsItemErrorsItem(DataClassJsonMixin): error_code: Optional[str] = None """ Error code """ message: Optional[str] = None """ Error message """ parameter_name: Optional[str] = None """ Name of invalid parameter """ feature_name: Optional[str] = None parameter_value: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ValidateMultipleSwitchesResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a switch """ chassis_id: Optional[str] = None """ Unique identifier of a network switch """ status: Optional[ValidateMultipleSwitchesResponseRecordsItemStatus] = None """ Validation result status """ errors: Optional[List[ValidateMultipleSwitchesResponseRecordsItemErrorsItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ValidateMultipleSwitchesResponse(DataClassJsonMixin): records: Optional[List[ValidateMultipleSwitchesResponseRecordsItem]] = None class ReadAutomaticLocationUpdatesTaskResponseStatus(Enum): """ Status of a task """ Accepted = 'Accepted' InProgress = 'InProgress' Completed = 'Completed' Failed = 'Failed' class ReadAutomaticLocationUpdatesTaskResponseType(Enum): """ Type of a task """ WirelessPointsBulkCreate = 'WirelessPointsBulkCreate' WirelessPointsBulkUpdate = 'WirelessPointsBulkUpdate' SwitchesBulkCreate = 'SwitchesBulkCreate' SwitchesBulkUpdate = 'SwitchesBulkUpdate' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAutomaticLocationUpdatesTaskResponseResultRecordsItemErrorsItem(DataClassJsonMixin): error_code: Optional[str] = None message: Optional[str] = None parameter_name: Optional[str] = None description: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAutomaticLocationUpdatesTaskResponseResultRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of the created/updated element - wireless point or network switch """ bssid: Optional[str] = None """ Unique 48-bit identifier of the wireless access point complying with MAC address conventions. Returned only for 'Wireless Points Bulk Create' tasks """ chassis_id: Optional[str] = None """ Unique identifier of a network switch. Returned only for 'Switches Bulk Create' tasks """ status: Optional[str] = None """ Operation status """ errors: Optional[List[ReadAutomaticLocationUpdatesTaskResponseResultRecordsItemErrorsItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAutomaticLocationUpdatesTaskResponseResult(DataClassJsonMixin): """ Task detailed result. Returned for failed and completed tasks """ records: Optional[List[ReadAutomaticLocationUpdatesTaskResponseResultRecordsItem]] = None """ Detailed task results by elements from initial request """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAutomaticLocationUpdatesTaskResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a task """ status: Optional[ReadAutomaticLocationUpdatesTaskResponseStatus] = None """ Status of a task """ creation_time: Optional[str] = None """ Task creation time """ last_modified_time: Optional[str] = None """ Time of the task latest modification """ type: Optional[ReadAutomaticLocationUpdatesTaskResponseType] = None """ Type of a task """ result: Optional[ReadAutomaticLocationUpdatesTaskResponseResult] = None """ Task detailed result. Returned for failed and completed tasks """ class ListEmergencyLocationsAddressStatus(Enum): Valid = 'Valid' Invalid = 'Invalid' class ListEmergencyLocationsUsageStatus(Enum): Active = 'Active' Inactive = 'Inactive' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListEmergencyLocationsResponseRecordsItemAddress(DataClassJsonMixin): country: Optional[str] = None """ Country name """ country_id: Optional[str] = None """ Internal identifier of a country """ country_iso_code: Optional[str] = None """ ISO code of a country """ country_name: Optional[str] = None """ Full name of a country """ state: Optional[str] = None """ State/Province name. Mandatory for the USA, the UK and Canada """ state_id: Optional[str] = None """ Internal identifier of a state """ state_iso_code: Optional[str] = None """ ISO code of a state """ state_name: Optional[str] = None """ Full name of a state """ city: Optional[str] = None """ City name """ street: Optional[str] = None """ First line address """ street2: Optional[str] = None """ Second line address (apartment, suite, unit, building, floor, etc.) """ zip: Optional[str] = None """ Postal (Zip) code """ customer_name: Optional[str] = None """ Customer name """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListEmergencyLocationsResponseRecordsItemSite(DataClassJsonMixin): id: Optional[str] = None """ Internal idetifier of a site extension """ name: Optional[str] = None """ Extension user first name """ class ListEmergencyLocationsResponseRecordsItemAddressStatus(Enum): """ Emergency address status """ Valid = 'Valid' Invalid = 'Invalid' class ListEmergencyLocationsResponseRecordsItemUsageStatus(Enum): """ Status of emergency response location usage. """ Active = 'Active' Inactive = 'Inactive' class ListEmergencyLocationsResponseRecordsItemSyncStatus(Enum): """ Resulting status of emergency address synchronization. Returned if `syncEmergencyAddress` parameter is set to 'True' Generated by Python OpenAPI Parser """ Verified = 'Verified' Updated = 'Updated' Deleted = 'Deleted' ActivationProcess = 'ActivationProcess' Unsupported = 'Unsupported' Failed = 'Failed' class ListEmergencyLocationsResponseRecordsItemVisibility(Enum): """ Visibility of an emergency response location. If `Private` is set, then location is visible only for restricted number of users, specified in `owners` array Generated by Python OpenAPI Parser """ Private = 'Private' Public = 'Public' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListEmergencyLocationsResponseRecordsItemOwnersItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a user - private location owner """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListEmergencyLocationsResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of the emergency response location """ address: Optional[ListEmergencyLocationsResponseRecordsItemAddress] = None name: Optional[str] = None """ Emergency response location name """ site: Optional[ListEmergencyLocationsResponseRecordsItemSite] = None address_status: Optional[ListEmergencyLocationsResponseRecordsItemAddressStatus] = None """ Emergency address status """ usage_status: Optional[ListEmergencyLocationsResponseRecordsItemUsageStatus] = None """ Status of emergency response location usage. """ sync_status: Optional[ListEmergencyLocationsResponseRecordsItemSyncStatus] = None """ Resulting status of emergency address synchronization. Returned if `syncEmergencyAddress` parameter is set to 'True' """ visibility: Optional[ListEmergencyLocationsResponseRecordsItemVisibility] = 'Public' """ Visibility of an emergency response location. If `Private` is set, then location is visible only for restricted number of users, specified in `owners` array """ owners: Optional[List[ListEmergencyLocationsResponseRecordsItemOwnersItem]] = None """ List of private location owners """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListEmergencyLocationsResponseNavigationFirstPage(DataClassJsonMixin): """ Canonical URI for the first page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListEmergencyLocationsResponseNavigationNextPage(DataClassJsonMixin): """ Canonical URI for the next page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListEmergencyLocationsResponseNavigationPreviousPage(DataClassJsonMixin): """ Canonical URI for the previous page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListEmergencyLocationsResponseNavigationLastPage(DataClassJsonMixin): """ Canonical URI for the last page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListEmergencyLocationsResponseNavigation(DataClassJsonMixin): """ Information on navigation """ first_page: Optional[ListEmergencyLocationsResponseNavigationFirstPage] = None """ Canonical URI for the first page of the list """ next_page: Optional[ListEmergencyLocationsResponseNavigationNextPage] = None """ Canonical URI for the next page of the list """ previous_page: Optional[ListEmergencyLocationsResponseNavigationPreviousPage] = None """ Canonical URI for the previous page of the list """ last_page: Optional[ListEmergencyLocationsResponseNavigationLastPage] = None """ Canonical URI for the last page of the list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListEmergencyLocationsResponsePaging(DataClassJsonMixin): """ Information on paging """ page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) """ per_page: Optional[int] = None """ Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty """ total_pages: Optional[int] = None """ The total number of pages in a dataset. May be omitted for some resources due to performance reasons """ total_elements: Optional[int] = None """ The total number of elements in a dataset. May be omitted for some resource due to performance reasons """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListEmergencyLocationsResponse(DataClassJsonMixin): records: Optional[List[ListEmergencyLocationsResponseRecordsItem]] = None navigation: Optional[ListEmergencyLocationsResponseNavigation] = None """ Information on navigation """ paging: Optional[ListEmergencyLocationsResponsePaging] = None """ Information on paging """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateEmergencyLocationRequestAddress(DataClassJsonMixin): country: Optional[str] = None """ Country name """ country_id: Optional[str] = None """ Internal identifier of a country """ country_iso_code: Optional[str] = None """ ISO code of a country """ country_name: Optional[str] = None """ Full name of a country """ state: Optional[str] = None """ State/Province name. Mandatory for the USA, the UK and Canada """ state_id: Optional[str] = None """ Internal identifier of a state """ state_iso_code: Optional[str] = None """ ISO code of a state """ state_name: Optional[str] = None """ Full name of a state """ city: Optional[str] = None """ City name """ street: Optional[str] = None """ First line address """ street2: Optional[str] = None """ Second line address (apartment, suite, unit, building, floor, etc.) """ zip: Optional[str] = None """ Postal (Zip) code """ customer_name: Optional[str] = None """ Customer name """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateEmergencyLocationRequestSite(DataClassJsonMixin): id: Optional[str] = None """ Internal idetifier of a site extension """ name: Optional[str] = None """ Extension user first name """ class CreateEmergencyLocationRequestAddressStatus(Enum): """ Emergency address status """ Valid = 'Valid' Invalid = 'Invalid' class CreateEmergencyLocationRequestUsageStatus(Enum): """ Status of emergency response location usage. """ Active = 'Active' Inactive = 'Inactive' class CreateEmergencyLocationRequestVisibility(Enum): """ Visibility of an emergency response location. If `Private` is set, then location is visible only for restricted number of users, specified in `owners` array Generated by Python OpenAPI Parser """ Private = 'Private' Public = 'Public' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateEmergencyLocationRequestOwnersItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a user - private location owner """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateEmergencyLocationRequest(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of the emergency response location """ address: Optional[CreateEmergencyLocationRequestAddress] = None name: Optional[str] = None """ Emergency response location name """ site: Optional[CreateEmergencyLocationRequestSite] = None address_status: Optional[CreateEmergencyLocationRequestAddressStatus] = None """ Emergency address status """ usage_status: Optional[CreateEmergencyLocationRequestUsageStatus] = None """ Status of emergency response location usage. """ visibility: Optional[CreateEmergencyLocationRequestVisibility] = 'Public' """ Visibility of an emergency response location. If `Private` is set, then location is visible only for restricted number of users, specified in `owners` array """ owners: Optional[List[CreateEmergencyLocationRequestOwnersItem]] = None """ List of private location owners """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadEmergencyLocationResponseAddress(DataClassJsonMixin): country: Optional[str] = None """ Country name """ country_id: Optional[str] = None """ Internal identifier of a country """ country_iso_code: Optional[str] = None """ ISO code of a country """ country_name: Optional[str] = None """ Full name of a country """ state: Optional[str] = None """ State/Province name. Mandatory for the USA, the UK and Canada """ state_id: Optional[str] = None """ Internal identifier of a state """ state_iso_code: Optional[str] = None """ ISO code of a state """ state_name: Optional[str] = None """ Full name of a state """ city: Optional[str] = None """ City name """ street: Optional[str] = None """ First line address """ street2: Optional[str] = None """ Second line address (apartment, suite, unit, building, floor, etc.) """ zip: Optional[str] = None """ Postal (Zip) code """ customer_name: Optional[str] = None """ Customer name """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadEmergencyLocationResponseSite(DataClassJsonMixin): id: Optional[str] = None """ Internal idetifier of a site extension """ name: Optional[str] = None """ Extension user first name """ class ReadEmergencyLocationResponseAddressStatus(Enum): """ Emergency address status """ Valid = 'Valid' Invalid = 'Invalid' class ReadEmergencyLocationResponseUsageStatus(Enum): """ Status of emergency response location usage. """ Active = 'Active' Inactive = 'Inactive' class ReadEmergencyLocationResponseSyncStatus(Enum): """ Resulting status of emergency address synchronization. Returned if `syncEmergencyAddress` parameter is set to 'True' Generated by Python OpenAPI Parser """ Verified = 'Verified' Updated = 'Updated' Deleted = 'Deleted' ActivationProcess = 'ActivationProcess' Unsupported = 'Unsupported' Failed = 'Failed' class ReadEmergencyLocationResponseVisibility(Enum): """ Visibility of an emergency response location. If `Private` is set, then location is visible only for restricted number of users, specified in `owners` array Generated by Python OpenAPI Parser """ Private = 'Private' Public = 'Public' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadEmergencyLocationResponseOwnersItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a user - private location owner """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadEmergencyLocationResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of the emergency response location """ address: Optional[ReadEmergencyLocationResponseAddress] = None name: Optional[str] = None """ Emergency response location name """ site: Optional[ReadEmergencyLocationResponseSite] = None address_status: Optional[ReadEmergencyLocationResponseAddressStatus] = None """ Emergency address status """ usage_status: Optional[ReadEmergencyLocationResponseUsageStatus] = None """ Status of emergency response location usage. """ sync_status: Optional[ReadEmergencyLocationResponseSyncStatus] = None """ Resulting status of emergency address synchronization. Returned if `syncEmergencyAddress` parameter is set to 'True' """ visibility: Optional[ReadEmergencyLocationResponseVisibility] = 'Public' """ Visibility of an emergency response location. If `Private` is set, then location is visible only for restricted number of users, specified in `owners` array """ owners: Optional[List[ReadEmergencyLocationResponseOwnersItem]] = None """ List of private location owners """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateEmergencyLocationResponseAddress(DataClassJsonMixin): country: Optional[str] = None """ Country name """ country_id: Optional[str] = None """ Internal identifier of a country """ country_iso_code: Optional[str] = None """ ISO code of a country """ country_name: Optional[str] = None """ Full name of a country """ state: Optional[str] = None """ State/Province name. Mandatory for the USA, the UK and Canada """ state_id: Optional[str] = None """ Internal identifier of a state """ state_iso_code: Optional[str] = None """ ISO code of a state """ state_name: Optional[str] = None """ Full name of a state """ city: Optional[str] = None """ City name """ street: Optional[str] = None """ First line address """ street2: Optional[str] = None """ Second line address (apartment, suite, unit, building, floor, etc.) """ zip: Optional[str] = None """ Postal (Zip) code """ customer_name: Optional[str] = None """ Customer name """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateEmergencyLocationResponseSite(DataClassJsonMixin): id: Optional[str] = None """ Internal idetifier of a site extension """ name: Optional[str] = None """ Extension user first name """ class UpdateEmergencyLocationResponseAddressStatus(Enum): """ Emergency address status """ Valid = 'Valid' Invalid = 'Invalid' class UpdateEmergencyLocationResponseUsageStatus(Enum): """ Status of emergency response location usage. """ Active = 'Active' Inactive = 'Inactive' class UpdateEmergencyLocationResponseSyncStatus(Enum): """ Resulting status of emergency address synchronization. Returned if `syncEmergencyAddress` parameter is set to 'True' Generated by Python OpenAPI Parser """ Verified = 'Verified' Updated = 'Updated' Deleted = 'Deleted' ActivationProcess = 'ActivationProcess' Unsupported = 'Unsupported' Failed = 'Failed' class UpdateEmergencyLocationResponseVisibility(Enum): """ Visibility of an emergency response location. If `Private` is set, then location is visible only for restricted number of users, specified in `owners` array Generated by Python OpenAPI Parser """ Private = 'Private' Public = 'Public' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateEmergencyLocationResponseOwnersItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a user - private location owner """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateEmergencyLocationResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of the emergency response location """ address: Optional[UpdateEmergencyLocationResponseAddress] = None name: Optional[str] = None """ Emergency response location name """ site: Optional[UpdateEmergencyLocationResponseSite] = None address_status: Optional[UpdateEmergencyLocationResponseAddressStatus] = None """ Emergency address status """ usage_status: Optional[UpdateEmergencyLocationResponseUsageStatus] = None """ Status of emergency response location usage. """ sync_status: Optional[UpdateEmergencyLocationResponseSyncStatus] = None """ Resulting status of emergency address synchronization. Returned if `syncEmergencyAddress` parameter is set to 'True' """ visibility: Optional[UpdateEmergencyLocationResponseVisibility] = 'Public' """ Visibility of an emergency response location. If `Private` is set, then location is visible only for restricted number of users, specified in `owners` array """ owners: Optional[List[UpdateEmergencyLocationResponseOwnersItem]] = None """ List of private location owners """ class ReadNotificationSettingsResponseEmailRecipientsItemStatus(Enum): """ Current state of an extension """ Enabled = 'Enabled' Disable = 'Disable' NotActivated = 'NotActivated' Unassigned = 'Unassigned' class ReadNotificationSettingsResponseEmailRecipientsItemPermission(Enum): """ Call queue manager permission """ FullAccess = 'FullAccess' MembersOnly = 'MembersOnly' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadNotificationSettingsResponseEmailRecipientsItem(DataClassJsonMixin): extension_id: Optional[str] = None """ Internal identifier of an extension """ full_name: Optional[str] = None """ User full name """ extension_number: Optional[str] = None """ User extension number """ status: Optional[ReadNotificationSettingsResponseEmailRecipientsItemStatus] = None """ Current state of an extension """ email_addresses: Optional[List[str]] = None """ List of user email addresses from extension notification settings. By default main email address from contact information is returned """ permission: Optional[ReadNotificationSettingsResponseEmailRecipientsItemPermission] = None """ Call queue manager permission """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadNotificationSettingsResponseVoicemails(DataClassJsonMixin): notify_by_email: Optional[bool] = None """ Email notification flag """ notify_by_sms: Optional[bool] = None """ SMS notification flag """ advanced_email_addresses: Optional[List[str]] = None """ List of recipient email addresses for voicemail notifications. Returned if specified, in both modes (advanced/basic). Applied in advanced mode only """ advanced_sms_email_addresses: Optional[List[str]] = None """ List of recipient phone numbers for voicemail notifications. Returned if specified, in both modes (advanced/basic). Applied in advanced mode only """ include_attachment: Optional[bool] = None """ Indicates whether voicemail should be attached to email """ include_transcription: Optional[bool] = None """ Specifies whether to add voicemail transcription or not """ mark_as_read: Optional[bool] = None """ Indicates whether a voicemail should be automatically marked as read """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadNotificationSettingsResponseInboundFaxes(DataClassJsonMixin): notify_by_email: Optional[bool] = None """ Email notification flag """ notify_by_sms: Optional[bool] = None """ SMS notification flag """ advanced_email_addresses: Optional[List[str]] = None """ List of recipient email addresses for inbound fax notifications. Returned if specified, in both modes (advanced/basic). Applied in advanced mode only """ advanced_sms_email_addresses: Optional[List[str]] = None """ List of recipient phone numbers for inbound fax notifications. Returned if specified, in both modes (advanced/basic). Applied in advanced mode only """ include_attachment: Optional[bool] = None """ Indicates whether fax should be attached to email """ mark_as_read: Optional[bool] = None """ Indicates whether email should be automatically marked as read """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadNotificationSettingsResponseOutboundFaxes(DataClassJsonMixin): notify_by_email: Optional[bool] = None """ Email notification flag """ notify_by_sms: Optional[bool] = None """ SMS notification flag """ advanced_email_addresses: Optional[List[str]] = None """ List of recipient email addresses for outbound fax notifications. Returned if specified, in both modes (advanced/basic). Applied in advanced mode only """ advanced_sms_email_addresses: Optional[List[str]] = None """ List of recipient phone numbers for outbound fax notifications. Returned if specified, in both modes (advanced/basic). Applied in advanced mode only """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadNotificationSettingsResponseInboundTexts(DataClassJsonMixin): notify_by_email: Optional[bool] = None """ Email notification flag """ notify_by_sms: Optional[bool] = None """ SMS notification flag """ advanced_email_addresses: Optional[List[str]] = None """ List of recipient email addresses for inbound text message notifications. Returned if specified, in both modes (advanced/basic). Applied in advanced mode only """ advanced_sms_email_addresses: Optional[List[str]] = None """ List of recipient phone numbers for inbound text message notifications. Returned if specified, in both modes (advanced/basic). Applied in advanced mode only """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadNotificationSettingsResponseMissedCalls(DataClassJsonMixin): notify_by_email: Optional[bool] = None """ Email notification flag """ notify_by_sms: Optional[bool] = None """ SMS notification flag """ advanced_email_addresses: Optional[List[str]] = None """ List of recipient email addresses for missed call notifications. Returned if specified, in both modes (advanced/basic). Applied in advanced mode only """ advanced_sms_email_addresses: Optional[List[str]] = None """ List of recipient phone numbers for missed call notifications. Returned if specified, in both modes (advanced/basic). Applied in advanced mode only """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadNotificationSettingsResponse(DataClassJsonMixin): uri: Optional[str] = None """ Canonical URI of notifications settings resource """ email_recipients: Optional[List[ReadNotificationSettingsResponseEmailRecipientsItem]] = None """ List of extensions specified as email notification recipients. Returned only for call queues where queue managers are assigned as user extensions. """ email_addresses: Optional[List[str]] = None """ List of notification recipient email addresses """ sms_email_addresses: Optional[List[str]] = None """ List of notification recipient email addresses """ advanced_mode: Optional[bool] = None """ Specifies notifications settings mode. If 'True' then advanced mode is on, it allows using different emails and/or phone numbers for each notification type. If 'False' then basic mode is on. Advanced mode settings are returned in both modes, if specified once, but if basic mode is switched on, they are not applied """ voicemails: Optional[ReadNotificationSettingsResponseVoicemails] = None inbound_faxes: Optional[ReadNotificationSettingsResponseInboundFaxes] = None outbound_faxes: Optional[ReadNotificationSettingsResponseOutboundFaxes] = None inbound_texts: Optional[ReadNotificationSettingsResponseInboundTexts] = None missed_calls: Optional[ReadNotificationSettingsResponseMissedCalls] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateNotificationSettingsRequestVoicemails(DataClassJsonMixin): notify_by_email: Optional[bool] = None """ Email notification flag """ notify_by_sms: Optional[bool] = None """ SMS notification flag """ advanced_email_addresses: Optional[List[str]] = None """ List of recipient email addresses for voicemail notifications. Returned if specified, in both modes (advanced/basic). Applied in advanced mode only """ advanced_sms_email_addresses: Optional[List[str]] = None """ List of recipient phone numbers for voicemail notifications. Returned if specified, in both modes (advanced/basic). Applied in advanced mode only """ include_attachment: Optional[bool] = None """ Indicates whether voicemail should be attached to email """ include_transcription: Optional[bool] = None """ Specifies whether to add voicemail transcription or not """ mark_as_read: Optional[bool] = None """ Indicates whether a voicemail should be automatically marked as read """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateNotificationSettingsRequestInboundFaxes(DataClassJsonMixin): notify_by_email: Optional[bool] = None """ Email notification flag """ notify_by_sms: Optional[bool] = None """ SMS notification flag """ advanced_email_addresses: Optional[List[str]] = None """ List of recipient email addresses for inbound fax notifications. Returned if specified, in both modes (advanced/basic). Applied in advanced mode only """ advanced_sms_email_addresses: Optional[List[str]] = None """ List of recipient phone numbers for inbound fax notifications. Returned if specified, in both modes (advanced/basic). Applied in advanced mode only """ include_attachment: Optional[bool] = None """ Indicates whether fax should be attached to email """ mark_as_read: Optional[bool] = None """ Indicates whether email should be automatically marked as read """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateNotificationSettingsRequestOutboundFaxes(DataClassJsonMixin): notify_by_email: Optional[bool] = None """ Email notification flag """ notify_by_sms: Optional[bool] = None """ SMS notification flag """ advanced_email_addresses: Optional[List[str]] = None """ List of recipient email addresses for outbound fax notifications. Returned if specified, in both modes (advanced/basic). Applied in advanced mode only """ advanced_sms_email_addresses: Optional[List[str]] = None """ List of recipient phone numbers for outbound fax notifications. Returned if specified, in both modes (advanced/basic). Applied in advanced mode only """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateNotificationSettingsRequestInboundTexts(DataClassJsonMixin): notify_by_email: Optional[bool] = None """ Email notification flag """ notify_by_sms: Optional[bool] = None """ SMS notification flag """ advanced_email_addresses: Optional[List[str]] = None """ List of recipient email addresses for inbound text message notifications. Returned if specified, in both modes (advanced/basic). Applied in advanced mode only """ advanced_sms_email_addresses: Optional[List[str]] = None """ List of recipient phone numbers for inbound text message notifications. Returned if specified, in both modes (advanced/basic). Applied in advanced mode only """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateNotificationSettingsRequestMissedCalls(DataClassJsonMixin): notify_by_email: Optional[bool] = None """ Email notification flag """ notify_by_sms: Optional[bool] = None """ SMS notification flag """ advanced_email_addresses: Optional[List[str]] = None """ List of recipient email addresses for missed call notifications. Returned if specified, in both modes (advanced/basic). Applied in advanced mode only """ advanced_sms_email_addresses: Optional[List[str]] = None """ List of recipient phone numbers for missed call notifications. Returned if specified, in both modes (advanced/basic). Applied in advanced mode only """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateNotificationSettingsRequest(DataClassJsonMixin): email_addresses: Optional[List[str]] = None """ List of notification recipient email addresses """ sms_email_addresses: Optional[List[str]] = None """ List of notification recipient email addresses """ advanced_mode: Optional[bool] = None """ Specifies notifications settings mode. If 'True' then advanced mode is on, it allows using different emails and/or phone numbers for each notification type. If 'False' then basic mode is on. Advanced mode settings are returned in both modes, if specified once, but if basic mode is switched on, they are not applied """ voicemails: Optional[UpdateNotificationSettingsRequestVoicemails] = None inbound_faxes: Optional[UpdateNotificationSettingsRequestInboundFaxes] = None outbound_faxes: Optional[UpdateNotificationSettingsRequestOutboundFaxes] = None inbound_texts: Optional[UpdateNotificationSettingsRequestInboundTexts] = None missed_calls: Optional[UpdateNotificationSettingsRequestMissedCalls] = None class UpdateNotificationSettingsResponseEmailRecipientsItemStatus(Enum): """ Current state of an extension """ Enabled = 'Enabled' Disable = 'Disable' NotActivated = 'NotActivated' Unassigned = 'Unassigned' class UpdateNotificationSettingsResponseEmailRecipientsItemPermission(Enum): """ Call queue manager permission """ FullAccess = 'FullAccess' MembersOnly = 'MembersOnly' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateNotificationSettingsResponseEmailRecipientsItem(DataClassJsonMixin): extension_id: Optional[str] = None """ Internal identifier of an extension """ full_name: Optional[str] = None """ User full name """ extension_number: Optional[str] = None """ User extension number """ status: Optional[UpdateNotificationSettingsResponseEmailRecipientsItemStatus] = None """ Current state of an extension """ email_addresses: Optional[List[str]] = None """ List of user email addresses from extension notification settings. By default main email address from contact information is returned """ permission: Optional[UpdateNotificationSettingsResponseEmailRecipientsItemPermission] = None """ Call queue manager permission """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateNotificationSettingsResponseVoicemails(DataClassJsonMixin): notify_by_email: Optional[bool] = None """ Email notification flag """ notify_by_sms: Optional[bool] = None """ SMS notification flag """ advanced_email_addresses: Optional[List[str]] = None """ List of recipient email addresses for voicemail notifications. Returned if specified, in both modes (advanced/basic). Applied in advanced mode only """ advanced_sms_email_addresses: Optional[List[str]] = None """ List of recipient phone numbers for voicemail notifications. Returned if specified, in both modes (advanced/basic). Applied in advanced mode only """ include_attachment: Optional[bool] = None """ Indicates whether voicemail should be attached to email """ include_transcription: Optional[bool] = None """ Specifies whether to add voicemail transcription or not """ mark_as_read: Optional[bool] = None """ Indicates whether a voicemail should be automatically marked as read """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateNotificationSettingsResponseInboundFaxes(DataClassJsonMixin): notify_by_email: Optional[bool] = None """ Email notification flag """ notify_by_sms: Optional[bool] = None """ SMS notification flag """ advanced_email_addresses: Optional[List[str]] = None """ List of recipient email addresses for inbound fax notifications. Returned if specified, in both modes (advanced/basic). Applied in advanced mode only """ advanced_sms_email_addresses: Optional[List[str]] = None """ List of recipient phone numbers for inbound fax notifications. Returned if specified, in both modes (advanced/basic). Applied in advanced mode only """ include_attachment: Optional[bool] = None """ Indicates whether fax should be attached to email """ mark_as_read: Optional[bool] = None """ Indicates whether email should be automatically marked as read """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateNotificationSettingsResponseOutboundFaxes(DataClassJsonMixin): notify_by_email: Optional[bool] = None """ Email notification flag """ notify_by_sms: Optional[bool] = None """ SMS notification flag """ advanced_email_addresses: Optional[List[str]] = None """ List of recipient email addresses for outbound fax notifications. Returned if specified, in both modes (advanced/basic). Applied in advanced mode only """ advanced_sms_email_addresses: Optional[List[str]] = None """ List of recipient phone numbers for outbound fax notifications. Returned if specified, in both modes (advanced/basic). Applied in advanced mode only """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateNotificationSettingsResponseInboundTexts(DataClassJsonMixin): notify_by_email: Optional[bool] = None """ Email notification flag """ notify_by_sms: Optional[bool] = None """ SMS notification flag """ advanced_email_addresses: Optional[List[str]] = None """ List of recipient email addresses for inbound text message notifications. Returned if specified, in both modes (advanced/basic). Applied in advanced mode only """ advanced_sms_email_addresses: Optional[List[str]] = None """ List of recipient phone numbers for inbound text message notifications. Returned if specified, in both modes (advanced/basic). Applied in advanced mode only """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateNotificationSettingsResponseMissedCalls(DataClassJsonMixin): notify_by_email: Optional[bool] = None """ Email notification flag """ notify_by_sms: Optional[bool] = None """ SMS notification flag """ advanced_email_addresses: Optional[List[str]] = None """ List of recipient email addresses for missed call notifications. Returned if specified, in both modes (advanced/basic). Applied in advanced mode only """ advanced_sms_email_addresses: Optional[List[str]] = None """ List of recipient phone numbers for missed call notifications. Returned if specified, in both modes (advanced/basic). Applied in advanced mode only """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateNotificationSettingsResponse(DataClassJsonMixin): uri: Optional[str] = None """ Canonical URI of notifications settings resource """ email_recipients: Optional[List[UpdateNotificationSettingsResponseEmailRecipientsItem]] = None """ List of extensions specified as email notification recipients. Returned only for call queues where queue managers are assigned as user extensions. """ email_addresses: Optional[List[str]] = None """ List of notification recipient email addresses """ sms_email_addresses: Optional[List[str]] = None """ List of notification recipient email addresses """ advanced_mode: Optional[bool] = None """ Specifies notifications settings mode. If 'True' then advanced mode is on, it allows using different emails and/or phone numbers for each notification type. If 'False' then basic mode is on. Advanced mode settings are returned in both modes, if specified once, but if basic mode is switched on, they are not applied """ voicemails: Optional[UpdateNotificationSettingsResponseVoicemails] = None inbound_faxes: Optional[UpdateNotificationSettingsResponseInboundFaxes] = None outbound_faxes: Optional[UpdateNotificationSettingsResponseOutboundFaxes] = None inbound_texts: Optional[UpdateNotificationSettingsResponseInboundTexts] = None missed_calls: Optional[UpdateNotificationSettingsResponseMissedCalls] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateUserProfileImageRequest(DataClassJsonMixin): image: Optional[bytes] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateUserProfileImageRequest(DataClassJsonMixin): """ Required Properties: - image Generated by Python OpenAPI Parser """ image: bytes @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadConferencingSettingsResponsePhoneNumbersItemCountry(DataClassJsonMixin): """ Information on a home country of a conference phone number """ id: Optional[str] = None """ Internal identifier of a country """ uri: Optional[str] = None """ Canonical URI of a country """ calling_code: Optional[str] = None """ Country calling code defined by ITU-T recommendations [E.123](https://www.itu.int/rec/T-REC-E.123-200102-I/en) and [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) """ emergency_calling: Optional[bool] = None """ Emergency calling feature availability/emergency address requirement indicator """ iso_code: Optional[str] = None """ Country code according to the ISO standard, see [ISO 3166](https://www.iso.org/iso-3166-country-codes.html) """ name: Optional[str] = None """ Official name of a country """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadConferencingSettingsResponsePhoneNumbersItem(DataClassJsonMixin): country: Optional[ReadConferencingSettingsResponsePhoneNumbersItemCountry] = None """ Information on a home country of a conference phone number """ default: Optional[bool] = None """ 'True' if the number is default for the conference. Default conference number is a domestic number that can be set by user (otherwise it is set by the system). Only one default number per country is allowed """ has_greeting: Optional[bool] = None """ 'True' if the greeting message is played on this number """ location: Optional[str] = None """ Location (city, region, state) of a conference phone number """ phone_number: Optional[str] = None """ Dial-in phone number to connect to a conference """ premium: Optional[bool] = None """ Indicates if the number is 'premium' (account phone number with the `ConferencingNumber` usageType) """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadConferencingSettingsResponse(DataClassJsonMixin): uri: Optional[str] = None """ Canonical URI of a conferencing """ allow_join_before_host: Optional[bool] = None """ Determines if host user allows conference participants to join before the host """ host_code: Optional[str] = None """ Access code for a host user """ mode: Optional[str] = None """ Internal parameter specifying conferencing engine """ participant_code: Optional[str] = None """ Access code for any participant """ phone_number: Optional[str] = None """ Primary conference phone number for user's home country returned in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) format """ tap_to_join_uri: Optional[str] = None """ Short URL leading to the service web page Tap to Join for audio conference bridge """ phone_numbers: Optional[List[ReadConferencingSettingsResponsePhoneNumbersItem]] = None """ List of multiple dial-in phone numbers to connect to audio conference service, relevant for user's brand. Each number is given with the country and location information, in order to let the user choose the less expensive way to connect to a conference. The first number in the list is the primary conference number, that is default and domestic """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateConferencingSettingsRequestPhoneNumbersItem(DataClassJsonMixin): phone_number: Optional[str] = None """ Dial-in phone number to connect to a conference """ default: Optional[bool] = None """ 'True' if the number is default for the conference. Default conference number is a domestic number that can be set by user (otherwise it is set by the system). Only one default number per country is allowed """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateConferencingSettingsRequest(DataClassJsonMixin): phone_numbers: Optional[List[UpdateConferencingSettingsRequestPhoneNumbersItem]] = None """ Multiple dial-in phone numbers to connect to audio conference service, relevant for user's brand. Each number is given with the country and location information, in order to let the user choose the less expensive way to connect to a conference. The first number in the list is the primary conference number, that is default and domestic """ allow_join_before_host: Optional[bool] = None """ Determines if host user allows conference participants to join before the host """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateConferencingSettingsResponsePhoneNumbersItemCountry(DataClassJsonMixin): """ Information on a home country of a conference phone number """ id: Optional[str] = None """ Internal identifier of a country """ uri: Optional[str] = None """ Canonical URI of a country """ calling_code: Optional[str] = None """ Country calling code defined by ITU-T recommendations [E.123](https://www.itu.int/rec/T-REC-E.123-200102-I/en) and [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) """ emergency_calling: Optional[bool] = None """ Emergency calling feature availability/emergency address requirement indicator """ iso_code: Optional[str] = None """ Country code according to the ISO standard, see [ISO 3166](https://www.iso.org/iso-3166-country-codes.html) """ name: Optional[str] = None """ Official name of a country """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateConferencingSettingsResponsePhoneNumbersItem(DataClassJsonMixin): country: Optional[UpdateConferencingSettingsResponsePhoneNumbersItemCountry] = None """ Information on a home country of a conference phone number """ default: Optional[bool] = None """ 'True' if the number is default for the conference. Default conference number is a domestic number that can be set by user (otherwise it is set by the system). Only one default number per country is allowed """ has_greeting: Optional[bool] = None """ 'True' if the greeting message is played on this number """ location: Optional[str] = None """ Location (city, region, state) of a conference phone number """ phone_number: Optional[str] = None """ Dial-in phone number to connect to a conference """ premium: Optional[bool] = None """ Indicates if the number is 'premium' (account phone number with the `ConferencingNumber` usageType) """
/ringcentral_async_client-1.0.3-py3-none-any.whl/ringcentral_async_client/_code_gen/model/_12.py
0.808672
0.45302
_12.py
pypi
from ._10 import * @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListStandardGreetingsResponseRecordsItemNavigationNextPage(DataClassJsonMixin): """ Canonical URI for the next page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListStandardGreetingsResponseRecordsItemNavigationPreviousPage(DataClassJsonMixin): """ Canonical URI for the previous page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListStandardGreetingsResponseRecordsItemNavigationLastPage(DataClassJsonMixin): """ Canonical URI for the last page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListStandardGreetingsResponseRecordsItemNavigation(DataClassJsonMixin): """ Information on navigation """ first_page: Optional[ListStandardGreetingsResponseRecordsItemNavigationFirstPage] = None """ Canonical URI for the first page of the list """ next_page: Optional[ListStandardGreetingsResponseRecordsItemNavigationNextPage] = None """ Canonical URI for the next page of the list """ previous_page: Optional[ListStandardGreetingsResponseRecordsItemNavigationPreviousPage] = None """ Canonical URI for the previous page of the list """ last_page: Optional[ListStandardGreetingsResponseRecordsItemNavigationLastPage] = None """ Canonical URI for the last page of the list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListStandardGreetingsResponseRecordsItemPaging(DataClassJsonMixin): """ Information on paging """ page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) """ per_page: Optional[int] = None """ Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty """ total_pages: Optional[int] = None """ The total number of pages in a dataset. May be omitted for some resources due to performance reasons """ total_elements: Optional[int] = None """ The total number of elements in a dataset. May be omitted for some resource due to performance reasons """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListStandardGreetingsResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a greeting """ uri: Optional[str] = None """ Link to a greeting """ name: Optional[str] = None """ Name of a greeting """ usage_type: Optional[ListStandardGreetingsResponseRecordsItemUsageType] = None """ Usage type of a greeting, specifying if the greeting is applied for user extension or department extension. """ text: Optional[str] = None """ Text of a greeting, if any """ content_uri: Optional[str] = None """ Link to a greeting content (audio file), if any """ type: Optional[ListStandardGreetingsResponseRecordsItemType] = None """ Type of a greeting, specifying the case when the greeting is played. """ category: Optional[ListStandardGreetingsResponseRecordsItemCategory] = None """ Category of a greeting, specifying data form. The category value 'None' specifies that greetings of a certain type ('Introductory', 'ConnectingAudio', etc.) are switched off for an extension = ['Music', 'Message', 'RingTones', 'None'] """ navigation: Optional[ListStandardGreetingsResponseRecordsItemNavigation] = None """ Information on navigation """ paging: Optional[ListStandardGreetingsResponseRecordsItemPaging] = None """ Information on paging """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListStandardGreetingsResponseNavigationFirstPage(DataClassJsonMixin): """ Canonical URI for the first page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListStandardGreetingsResponseNavigationNextPage(DataClassJsonMixin): """ Canonical URI for the next page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListStandardGreetingsResponseNavigationPreviousPage(DataClassJsonMixin): """ Canonical URI for the previous page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListStandardGreetingsResponseNavigationLastPage(DataClassJsonMixin): """ Canonical URI for the last page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListStandardGreetingsResponseNavigation(DataClassJsonMixin): """ Information on navigation """ first_page: Optional[ListStandardGreetingsResponseNavigationFirstPage] = None """ Canonical URI for the first page of the list """ next_page: Optional[ListStandardGreetingsResponseNavigationNextPage] = None """ Canonical URI for the next page of the list """ previous_page: Optional[ListStandardGreetingsResponseNavigationPreviousPage] = None """ Canonical URI for the previous page of the list """ last_page: Optional[ListStandardGreetingsResponseNavigationLastPage] = None """ Canonical URI for the last page of the list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListStandardGreetingsResponsePaging(DataClassJsonMixin): """ Information on paging """ page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) """ per_page: Optional[int] = None """ Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty """ total_pages: Optional[int] = None """ The total number of pages in a dataset. May be omitted for some resources due to performance reasons """ total_elements: Optional[int] = None """ The total number of elements in a dataset. May be omitted for some resource due to performance reasons """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListStandardGreetingsResponse(DataClassJsonMixin): uri: Optional[str] = None """ Canonical URI of greetings list resource """ records: Optional[List[ListStandardGreetingsResponseRecordsItem]] = None """ List of greetings """ navigation: Optional[ListStandardGreetingsResponseNavigation] = None """ Information on navigation """ paging: Optional[ListStandardGreetingsResponsePaging] = None """ Information on paging """ class ReadStandardGreetingResponseUsageType(Enum): """ Usage type of a greeting, specifying if the greeting is applied for user extension or department extension. Generated by Python OpenAPI Parser """ UserExtensionAnsweringRule = 'UserExtensionAnsweringRule' ExtensionAnsweringRule = 'ExtensionAnsweringRule' DepartmentExtensionAnsweringRule = 'DepartmentExtensionAnsweringRule' BlockedCalls = 'BlockedCalls' CallRecording = 'CallRecording' CompanyAnsweringRule = 'CompanyAnsweringRule' CompanyAfterHoursAnsweringRule = 'CompanyAfterHoursAnsweringRule' LimitedExtensionAnsweringRule = 'LimitedExtensionAnsweringRule' VoicemailExtensionAnsweringRule = 'VoicemailExtensionAnsweringRule' AnnouncementExtensionAnsweringRule = 'AnnouncementExtensionAnsweringRule' SharedLinesGroupAnsweringRule = 'SharedLinesGroupAnsweringRule' class ReadStandardGreetingResponseType(Enum): """ Type of a greeting, specifying the case when the greeting is played. """ Introductory = 'Introductory' Announcement = 'Announcement' AutomaticRecording = 'AutomaticRecording' BlockedCallersAll = 'BlockedCallersAll' BlockedCallersSpecific = 'BlockedCallersSpecific' BlockedNoCallerId = 'BlockedNoCallerId' BlockedPayPhones = 'BlockedPayPhones' ConnectingMessage = 'ConnectingMessage' ConnectingAudio = 'ConnectingAudio' StartRecording = 'StartRecording' StopRecording = 'StopRecording' Voicemail = 'Voicemail' Unavailable = 'Unavailable' InterruptPrompt = 'InterruptPrompt' HoldMusic = 'HoldMusic' Company = 'Company' class ReadStandardGreetingResponseCategory(Enum): """ Category of a greeting, specifying data form. The category value 'None' specifies that greetings of a certain type ('Introductory', 'ConnectingAudio', etc.) are switched off for an extension = ['Music', 'Message', 'RingTones', 'None'] Generated by Python OpenAPI Parser """ Music = 'Music' Message = 'Message' RingTones = 'RingTones' None_ = 'None' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadStandardGreetingResponseNavigationFirstPage(DataClassJsonMixin): """ Canonical URI for the first page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadStandardGreetingResponseNavigationNextPage(DataClassJsonMixin): """ Canonical URI for the next page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadStandardGreetingResponseNavigationPreviousPage(DataClassJsonMixin): """ Canonical URI for the previous page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadStandardGreetingResponseNavigationLastPage(DataClassJsonMixin): """ Canonical URI for the last page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadStandardGreetingResponseNavigation(DataClassJsonMixin): """ Information on navigation """ first_page: Optional[ReadStandardGreetingResponseNavigationFirstPage] = None """ Canonical URI for the first page of the list """ next_page: Optional[ReadStandardGreetingResponseNavigationNextPage] = None """ Canonical URI for the next page of the list """ previous_page: Optional[ReadStandardGreetingResponseNavigationPreviousPage] = None """ Canonical URI for the previous page of the list """ last_page: Optional[ReadStandardGreetingResponseNavigationLastPage] = None """ Canonical URI for the last page of the list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadStandardGreetingResponsePaging(DataClassJsonMixin): """ Information on paging """ page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) """ per_page: Optional[int] = None """ Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty """ total_pages: Optional[int] = None """ The total number of pages in a dataset. May be omitted for some resources due to performance reasons """ total_elements: Optional[int] = None """ The total number of elements in a dataset. May be omitted for some resource due to performance reasons """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadStandardGreetingResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a greeting """ uri: Optional[str] = None """ Link to a greeting """ name: Optional[str] = None """ Name of a greeting """ usage_type: Optional[ReadStandardGreetingResponseUsageType] = None """ Usage type of a greeting, specifying if the greeting is applied for user extension or department extension. """ text: Optional[str] = None """ Text of a greeting, if any """ content_uri: Optional[str] = None """ Link to a greeting content (audio file), if any """ type: Optional[ReadStandardGreetingResponseType] = None """ Type of a greeting, specifying the case when the greeting is played. """ category: Optional[ReadStandardGreetingResponseCategory] = None """ Category of a greeting, specifying data form. The category value 'None' specifies that greetings of a certain type ('Introductory', 'ConnectingAudio', etc.) are switched off for an extension = ['Music', 'Message', 'RingTones', 'None'] """ navigation: Optional[ReadStandardGreetingResponseNavigation] = None """ Information on navigation """ paging: Optional[ReadStandardGreetingResponsePaging] = None """ Information on paging """ class CreateCompanyGreetingRequestType(Enum): """ Type of a greeting, specifying the case when the greeting is played. """ Company = 'Company' StartRecording = 'StartRecording' StopRecording = 'StopRecording' AutomaticRecording = 'AutomaticRecording' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateCompanyGreetingRequest(DataClassJsonMixin): """ Required Properties: - type - binary Generated by Python OpenAPI Parser """ type: CreateCompanyGreetingRequestType """ Type of a greeting, specifying the case when the greeting is played. """ binary: bytes """ Meida file to upload """ answering_rule_id: Optional[str] = None """ Internal identifier of an answering rule """ language_id: Optional[str] = None """ Internal identifier of a language. See Get Language List """ class CreateCompanyGreetingResponseType(Enum): """ Type of a company greeting """ Company = 'Company' StartRecording = 'StartRecording' StopRecording = 'StopRecording' AutomaticRecording = 'AutomaticRecording' class CreateCompanyGreetingResponseContentType(Enum): """ Content media type """ AudioMpeg = 'audio/mpeg' AudioWav = 'audio/wav' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateCompanyGreetingResponseAnsweringRule(DataClassJsonMixin): """ Information on an answering rule that the greeting is applied to """ uri: Optional[str] = None """ Canonical URI of an answering rule """ id: Optional[str] = None """ Internal identifier of an answering rule """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateCompanyGreetingResponseLanguage(DataClassJsonMixin): """ Information on a greeting language. Supported for types 'StopRecording', 'StartRecording', 'AutomaticRecording' Generated by Python OpenAPI Parser """ id: Optional[str] = None """ Internal identifier of a greeting language """ uri: Optional[str] = None """ Link to a greeting language """ name: Optional[str] = None """ Name of a greeting language """ locale_code: Optional[str] = None """ Locale code of a greeting language """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateCompanyGreetingResponse(DataClassJsonMixin): uri: Optional[str] = None """ Link to an extension custom greeting """ id: Optional[str] = None """ Internal identifier of an answering rule """ type: Optional[CreateCompanyGreetingResponseType] = None """ Type of a company greeting """ content_type: Optional[CreateCompanyGreetingResponseContentType] = None """ Content media type """ content_uri: Optional[str] = None """ Link to a greeting content (audio file) """ answering_rule: Optional[CreateCompanyGreetingResponseAnsweringRule] = None """ Information on an answering rule that the greeting is applied to """ language: Optional[CreateCompanyGreetingResponseLanguage] = None """ Information on a greeting language. Supported for types 'StopRecording', 'StartRecording', 'AutomaticRecording' """ class CreateCustomUserGreetingRequestType(Enum): """ Type of a greeting, specifying the case when the greeting is played. """ Introductory = 'Introductory' Announcement = 'Announcement' ConnectingMessage = 'ConnectingMessage' ConnectingAudio = 'ConnectingAudio' Voicemail = 'Voicemail' Unavailable = 'Unavailable' HoldMusic = 'HoldMusic' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateCustomUserGreetingRequest(DataClassJsonMixin): """ Required Properties: - type - answering_rule_id - binary Generated by Python OpenAPI Parser """ type: CreateCustomUserGreetingRequestType """ Type of a greeting, specifying the case when the greeting is played. """ answering_rule_id: str """ Internal identifier of an answering rule """ binary: bytes """ Meida file to upload """ class CreateCustomUserGreetingResponseType(Enum): """ Type of a custom user greeting """ Introductory = 'Introductory' Announcement = 'Announcement' InterruptPrompt = 'InterruptPrompt' ConnectingAudio = 'ConnectingAudio' ConnectingMessage = 'ConnectingMessage' Voicemail = 'Voicemail' Unavailable = 'Unavailable' HoldMusic = 'HoldMusic' PronouncedName = 'PronouncedName' class CreateCustomUserGreetingResponseContentType(Enum): """ Content media type """ AudioMpeg = 'audio/mpeg' AudioWav = 'audio/wav' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateCustomUserGreetingResponseAnsweringRule(DataClassJsonMixin): """ Information on an answering rule that the greeting is applied to """ uri: Optional[str] = None """ Canonical URI of an answering rule """ id: Optional[str] = None """ Internal identifier of an answering rule """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateCustomUserGreetingResponse(DataClassJsonMixin): uri: Optional[str] = None """ Link to a custom user greeting """ id: Optional[str] = None """ Internal identifier of a custom user greeting """ type: Optional[CreateCustomUserGreetingResponseType] = None """ Type of a custom user greeting """ content_type: Optional[CreateCustomUserGreetingResponseContentType] = None """ Content media type """ content_uri: Optional[str] = None """ Link to a greeting content (audio file) """ answering_rule: Optional[CreateCustomUserGreetingResponseAnsweringRule] = None """ Information on an answering rule that the greeting is applied to """ class ReadCustomGreetingResponseType(Enum): """ Type of a custom user greeting """ Introductory = 'Introductory' Announcement = 'Announcement' InterruptPrompt = 'InterruptPrompt' ConnectingAudio = 'ConnectingAudio' ConnectingMessage = 'ConnectingMessage' Voicemail = 'Voicemail' Unavailable = 'Unavailable' HoldMusic = 'HoldMusic' PronouncedName = 'PronouncedName' class ReadCustomGreetingResponseContentType(Enum): """ Content media type """ AudioMpeg = 'audio/mpeg' AudioWav = 'audio/wav' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadCustomGreetingResponseAnsweringRule(DataClassJsonMixin): """ Information on an answering rule that the greeting is applied to """ uri: Optional[str] = None """ Canonical URI of an answering rule """ id: Optional[str] = None """ Internal identifier of an answering rule """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadCustomGreetingResponse(DataClassJsonMixin): uri: Optional[str] = None """ Link to a custom user greeting """ id: Optional[str] = None """ Internal identifier of a custom user greeting """ type: Optional[ReadCustomGreetingResponseType] = None """ Type of a custom user greeting """ content_type: Optional[ReadCustomGreetingResponseContentType] = None """ Content media type """ content_uri: Optional[str] = None """ Link to a greeting content (audio file) """ answering_rule: Optional[ReadCustomGreetingResponseAnsweringRule] = None """ Information on an answering rule that the greeting is applied to """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListIVRPromptsResponseRecordsItem(DataClassJsonMixin): uri: Optional[str] = None """ Internal identifier of a prompt """ id: Optional[str] = None """ Link to a prompt metadata """ content_type: Optional[str] = None """ Type of a prompt media content """ content_uri: Optional[str] = None """ Link to a prompt media content """ filename: Optional[str] = None """ Name of a prompt """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListIVRPromptsResponseNavigationFirstPage(DataClassJsonMixin): """ Canonical URI for the first page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListIVRPromptsResponseNavigationNextPage(DataClassJsonMixin): """ Canonical URI for the next page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListIVRPromptsResponseNavigationPreviousPage(DataClassJsonMixin): """ Canonical URI for the previous page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListIVRPromptsResponseNavigationLastPage(DataClassJsonMixin): """ Canonical URI for the last page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListIVRPromptsResponseNavigation(DataClassJsonMixin): """ Information on navigation """ first_page: Optional[ListIVRPromptsResponseNavigationFirstPage] = None """ Canonical URI for the first page of the list """ next_page: Optional[ListIVRPromptsResponseNavigationNextPage] = None """ Canonical URI for the next page of the list """ previous_page: Optional[ListIVRPromptsResponseNavigationPreviousPage] = None """ Canonical URI for the previous page of the list """ last_page: Optional[ListIVRPromptsResponseNavigationLastPage] = None """ Canonical URI for the last page of the list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListIVRPromptsResponsePaging(DataClassJsonMixin): """ Information on paging """ page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) """ per_page: Optional[int] = None """ Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty """ total_pages: Optional[int] = None """ The total number of pages in a dataset. May be omitted for some resources due to performance reasons """ total_elements: Optional[int] = None """ The total number of elements in a dataset. May be omitted for some resource due to performance reasons """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListIVRPromptsResponse(DataClassJsonMixin): uri: Optional[str] = None """ Link to prompts library resource """ records: Optional[List[ListIVRPromptsResponseRecordsItem]] = None """ List of Prompts """ navigation: Optional[ListIVRPromptsResponseNavigation] = None """ Information on navigation """ paging: Optional[ListIVRPromptsResponsePaging] = None """ Information on paging """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateIVRPromptRequest(DataClassJsonMixin): """ Required Properties: - attachment Generated by Python OpenAPI Parser """ attachment: bytes """ Audio file that will be used as a prompt. Attachment cannot be empty, only audio files are supported """ name: Optional[str] = None """ Description of file contents. """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateIVRPromptResponse(DataClassJsonMixin): uri: Optional[str] = None """ Internal identifier of a prompt """ id: Optional[str] = None """ Link to a prompt metadata """ content_type: Optional[str] = None """ Type of a prompt media content """ content_uri: Optional[str] = None """ Link to a prompt media content """ filename: Optional[str] = None """ Name of a prompt """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadIVRPromptResponse(DataClassJsonMixin): uri: Optional[str] = None """ Internal identifier of a prompt """ id: Optional[str] = None """ Link to a prompt metadata """ content_type: Optional[str] = None """ Type of a prompt media content """ content_uri: Optional[str] = None """ Link to a prompt media content """ filename: Optional[str] = None """ Name of a prompt """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateIVRPromptRequest(DataClassJsonMixin): filename: Optional[str] = None """ Name of a file to be uploaded as a prompt """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateIVRPromptResponse(DataClassJsonMixin): uri: Optional[str] = None """ Internal identifier of a prompt """ id: Optional[str] = None """ Link to a prompt metadata """ content_type: Optional[str] = None """ Type of a prompt media content """ content_uri: Optional[str] = None """ Link to a prompt media content """ filename: Optional[str] = None """ Name of a prompt """ class CreateIVRMenuRequestPromptMode(Enum): """ Prompt mode: custom media or text """ Audio = 'Audio' TextToSpeech = 'TextToSpeech' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateIVRMenuRequestPromptAudio(DataClassJsonMixin): """ For 'Audio' mode only. Prompt media reference """ uri: Optional[str] = None """ Link to a prompt audio file """ id: Optional[str] = None """ Internal identifier of a prompt """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateIVRMenuRequestPromptLanguage(DataClassJsonMixin): """ For 'TextToSpeech' mode only. Prompt language metadata """ uri: Optional[str] = None """ Link to a prompt language """ id: Optional[str] = None """ Internal identifier of a language """ name: Optional[str] = None """ Language name """ locale_code: Optional[str] = None """ Language locale code """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateIVRMenuRequestPrompt(DataClassJsonMixin): """ Prompt metadata """ mode: Optional[CreateIVRMenuRequestPromptMode] = None """ Prompt mode: custom media or text """ audio: Optional[CreateIVRMenuRequestPromptAudio] = None """ For 'Audio' mode only. Prompt media reference """ text: Optional[str] = None """ For 'TextToSpeech' mode only. Prompt text """ language: Optional[CreateIVRMenuRequestPromptLanguage] = None """ For 'TextToSpeech' mode only. Prompt language metadata """ class CreateIVRMenuRequestActionsItemAction(Enum): """ Internal identifier of an answering rule """ Connect = 'Connect' Voicemail = 'Voicemail' DialByName = 'DialByName' Transfer = 'Transfer' Repeat = 'Repeat' ReturnToRoot = 'ReturnToRoot' ReturnToPrevious = 'ReturnToPrevious' Disconnect = 'Disconnect' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateIVRMenuRequestActionsItemExtension(DataClassJsonMixin): """ For 'Connect' or 'Voicemail' actions only. Extension reference """ uri: Optional[str] = None """ Link to an extension resource """ id: Optional[str] = None """ Internal identifier of an extension """ name: Optional[str] = None """ Name of an extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateIVRMenuRequestActionsItem(DataClassJsonMixin): input: Optional[str] = None """ Key. The following values are supported: numeric: '1' to '9' Star Hash NoInput """ action: Optional[CreateIVRMenuRequestActionsItemAction] = None """ Internal identifier of an answering rule """ extension: Optional[CreateIVRMenuRequestActionsItemExtension] = None """ For 'Connect' or 'Voicemail' actions only. Extension reference """ phone_number: Optional[str] = None """ For 'Transfer' action only. PSTN number in E.164 format """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateIVRMenuRequest(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an IVR Menu extension """ uri: Optional[str] = None """ Link to an IVR Menu extension resource """ name: Optional[str] = None """ First name of an IVR Menu user """ extension_number: Optional[str] = None """ Number of an IVR Menu extension """ site: Optional[str] = None """ Site data """ prompt: Optional[CreateIVRMenuRequestPrompt] = None """ Prompt metadata """ actions: Optional[List[CreateIVRMenuRequestActionsItem]] = None """ Keys handling settings """ class CreateIVRMenuResponsePromptMode(Enum): """ Prompt mode: custom media or text """ Audio = 'Audio' TextToSpeech = 'TextToSpeech' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateIVRMenuResponsePromptAudio(DataClassJsonMixin): """ For 'Audio' mode only. Prompt media reference """ uri: Optional[str] = None """ Link to a prompt audio file """ id: Optional[str] = None """ Internal identifier of a prompt """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateIVRMenuResponsePromptLanguage(DataClassJsonMixin): """ For 'TextToSpeech' mode only. Prompt language metadata """ uri: Optional[str] = None """ Link to a prompt language """ id: Optional[str] = None """ Internal identifier of a language """ name: Optional[str] = None """ Language name """ locale_code: Optional[str] = None """ Language locale code """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateIVRMenuResponsePrompt(DataClassJsonMixin): """ Prompt metadata """ mode: Optional[CreateIVRMenuResponsePromptMode] = None """ Prompt mode: custom media or text """ audio: Optional[CreateIVRMenuResponsePromptAudio] = None """ For 'Audio' mode only. Prompt media reference """ text: Optional[str] = None """ For 'TextToSpeech' mode only. Prompt text """ language: Optional[CreateIVRMenuResponsePromptLanguage] = None """ For 'TextToSpeech' mode only. Prompt language metadata """ class CreateIVRMenuResponseActionsItemAction(Enum): """ Internal identifier of an answering rule """ Connect = 'Connect' Voicemail = 'Voicemail' DialByName = 'DialByName' Transfer = 'Transfer' Repeat = 'Repeat' ReturnToRoot = 'ReturnToRoot' ReturnToPrevious = 'ReturnToPrevious' Disconnect = 'Disconnect' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateIVRMenuResponseActionsItemExtension(DataClassJsonMixin): """ For 'Connect' or 'Voicemail' actions only. Extension reference """ uri: Optional[str] = None """ Link to an extension resource """ id: Optional[str] = None """ Internal identifier of an extension """ name: Optional[str] = None """ Name of an extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateIVRMenuResponseActionsItem(DataClassJsonMixin): input: Optional[str] = None """ Key. The following values are supported: numeric: '1' to '9' Star Hash NoInput """ action: Optional[CreateIVRMenuResponseActionsItemAction] = None """ Internal identifier of an answering rule """ extension: Optional[CreateIVRMenuResponseActionsItemExtension] = None """ For 'Connect' or 'Voicemail' actions only. Extension reference """ phone_number: Optional[str] = None """ For 'Transfer' action only. PSTN number in E.164 format """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateIVRMenuResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an IVR Menu extension """ uri: Optional[str] = None """ Link to an IVR Menu extension resource """ name: Optional[str] = None """ First name of an IVR Menu user """ extension_number: Optional[str] = None """ Number of an IVR Menu extension """ site: Optional[str] = None """ Site data """ prompt: Optional[CreateIVRMenuResponsePrompt] = None """ Prompt metadata """ actions: Optional[List[CreateIVRMenuResponseActionsItem]] = None """ Keys handling settings """ class ReadIVRMenuResponsePromptMode(Enum): """ Prompt mode: custom media or text """ Audio = 'Audio' TextToSpeech = 'TextToSpeech' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadIVRMenuResponsePromptAudio(DataClassJsonMixin): """ For 'Audio' mode only. Prompt media reference """ uri: Optional[str] = None """ Link to a prompt audio file """ id: Optional[str] = None """ Internal identifier of a prompt """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadIVRMenuResponsePromptLanguage(DataClassJsonMixin): """ For 'TextToSpeech' mode only. Prompt language metadata """ uri: Optional[str] = None """ Link to a prompt language """ id: Optional[str] = None """ Internal identifier of a language """ name: Optional[str] = None """ Language name """ locale_code: Optional[str] = None """ Language locale code """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadIVRMenuResponsePrompt(DataClassJsonMixin): """ Prompt metadata """ mode: Optional[ReadIVRMenuResponsePromptMode] = None """ Prompt mode: custom media or text """ audio: Optional[ReadIVRMenuResponsePromptAudio] = None """ For 'Audio' mode only. Prompt media reference """ text: Optional[str] = None """ For 'TextToSpeech' mode only. Prompt text """ language: Optional[ReadIVRMenuResponsePromptLanguage] = None """ For 'TextToSpeech' mode only. Prompt language metadata """ class ReadIVRMenuResponseActionsItemAction(Enum): """ Internal identifier of an answering rule """ Connect = 'Connect' Voicemail = 'Voicemail' DialByName = 'DialByName' Transfer = 'Transfer' Repeat = 'Repeat' ReturnToRoot = 'ReturnToRoot' ReturnToPrevious = 'ReturnToPrevious' Disconnect = 'Disconnect' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadIVRMenuResponseActionsItemExtension(DataClassJsonMixin): """ For 'Connect' or 'Voicemail' actions only. Extension reference """ uri: Optional[str] = None """ Link to an extension resource """ id: Optional[str] = None """ Internal identifier of an extension """ name: Optional[str] = None """ Name of an extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadIVRMenuResponseActionsItem(DataClassJsonMixin): input: Optional[str] = None """ Key. The following values are supported: numeric: '1' to '9' Star Hash NoInput """ action: Optional[ReadIVRMenuResponseActionsItemAction] = None """ Internal identifier of an answering rule """ extension: Optional[ReadIVRMenuResponseActionsItemExtension] = None """ For 'Connect' or 'Voicemail' actions only. Extension reference """ phone_number: Optional[str] = None """ For 'Transfer' action only. PSTN number in E.164 format """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadIVRMenuResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an IVR Menu extension """ uri: Optional[str] = None """ Link to an IVR Menu extension resource """ name: Optional[str] = None """ First name of an IVR Menu user """ extension_number: Optional[str] = None """ Number of an IVR Menu extension """ site: Optional[str] = None """ Site data """ prompt: Optional[ReadIVRMenuResponsePrompt] = None """ Prompt metadata """ actions: Optional[List[ReadIVRMenuResponseActionsItem]] = None """ Keys handling settings """ class UpdateIVRMenuResponsePromptMode(Enum): """ Prompt mode: custom media or text """ Audio = 'Audio' TextToSpeech = 'TextToSpeech' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateIVRMenuResponsePromptAudio(DataClassJsonMixin): """ For 'Audio' mode only. Prompt media reference """ uri: Optional[str] = None """ Link to a prompt audio file """ id: Optional[str] = None """ Internal identifier of a prompt """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateIVRMenuResponsePromptLanguage(DataClassJsonMixin): """ For 'TextToSpeech' mode only. Prompt language metadata """ uri: Optional[str] = None """ Link to a prompt language """ id: Optional[str] = None """ Internal identifier of a language """ name: Optional[str] = None """ Language name """ locale_code: Optional[str] = None """ Language locale code """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateIVRMenuResponsePrompt(DataClassJsonMixin): """ Prompt metadata """ mode: Optional[UpdateIVRMenuResponsePromptMode] = None """ Prompt mode: custom media or text """ audio: Optional[UpdateIVRMenuResponsePromptAudio] = None """ For 'Audio' mode only. Prompt media reference """ text: Optional[str] = None """ For 'TextToSpeech' mode only. Prompt text """ language: Optional[UpdateIVRMenuResponsePromptLanguage] = None """ For 'TextToSpeech' mode only. Prompt language metadata """ class UpdateIVRMenuResponseActionsItemAction(Enum): """ Internal identifier of an answering rule """ Connect = 'Connect' Voicemail = 'Voicemail' DialByName = 'DialByName' Transfer = 'Transfer' Repeat = 'Repeat' ReturnToRoot = 'ReturnToRoot' ReturnToPrevious = 'ReturnToPrevious' Disconnect = 'Disconnect' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateIVRMenuResponseActionsItemExtension(DataClassJsonMixin): """ For 'Connect' or 'Voicemail' actions only. Extension reference """ uri: Optional[str] = None """ Link to an extension resource """ id: Optional[str] = None """ Internal identifier of an extension """ name: Optional[str] = None """ Name of an extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateIVRMenuResponseActionsItem(DataClassJsonMixin): input: Optional[str] = None """ Key. The following values are supported: numeric: '1' to '9' Star Hash NoInput """ action: Optional[UpdateIVRMenuResponseActionsItemAction] = None """ Internal identifier of an answering rule """ extension: Optional[UpdateIVRMenuResponseActionsItemExtension] = None """ For 'Connect' or 'Voicemail' actions only. Extension reference """ phone_number: Optional[str] = None """ For 'Transfer' action only. PSTN number in E.164 format """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateIVRMenuResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an IVR Menu extension """ uri: Optional[str] = None """ Link to an IVR Menu extension resource """ name: Optional[str] = None """ First name of an IVR Menu user """ extension_number: Optional[str] = None """ Number of an IVR Menu extension """ site: Optional[str] = None """ Site data """ prompt: Optional[UpdateIVRMenuResponsePrompt] = None """ Prompt metadata """ actions: Optional[List[UpdateIVRMenuResponseActionsItem]] = None """ Keys handling settings """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadCallRecordingSettingsResponseOnDemand(DataClassJsonMixin): enabled: Optional[bool] = None """ Flag for controlling OnDemand Call Recording settings """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadCallRecordingSettingsResponseAutomatic(DataClassJsonMixin): enabled: Optional[bool] = None """ Flag for controling Automatic Call Recording settings """ outbound_call_tones: Optional[bool] = None """ Flag for controlling 'Play Call Recording Announcement for Outbound Calls' settings """ outbound_call_announcement: Optional[bool] = None """ Flag for controlling 'Play periodic tones for outbound calls' settings """ allow_mute: Optional[bool] = None """ Flag for controlling 'Allow mute in auto call recording' settings """ extension_count: Optional[int] = None """ Total amount of extension that are used in call recordings """ class ReadCallRecordingSettingsResponseGreetingsItemType(Enum): StartRecording = 'StartRecording' StopRecording = 'StopRecording' AutomaticRecording = 'AutomaticRecording' class ReadCallRecordingSettingsResponseGreetingsItemMode(Enum): """ 'Default' value specifies that all greetings of that type (in all languages) are default, if at least one greeting (in any language) of the specified type is custom, then 'Custom' value is returned. Generated by Python OpenAPI Parser """ Default = 'Default' Custom = 'Custom' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadCallRecordingSettingsResponseGreetingsItem(DataClassJsonMixin): type: Optional[ReadCallRecordingSettingsResponseGreetingsItemType] = None mode: Optional[ReadCallRecordingSettingsResponseGreetingsItemMode] = None """ 'Default' value specifies that all greetings of that type (in all languages) are default, if at least one greeting (in any language) of the specified type is custom, then 'Custom' value is returned. """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadCallRecordingSettingsResponse(DataClassJsonMixin): on_demand: Optional[ReadCallRecordingSettingsResponseOnDemand] = None automatic: Optional[ReadCallRecordingSettingsResponseAutomatic] = None greetings: Optional[List[ReadCallRecordingSettingsResponseGreetingsItem]] = None """ Collection of Greeting Info """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCallRecordingSettingsRequestOnDemand(DataClassJsonMixin): enabled: Optional[bool] = None """ Flag for controlling OnDemand Call Recording settings """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCallRecordingSettingsRequestAutomatic(DataClassJsonMixin): enabled: Optional[bool] = None """ Flag for controling Automatic Call Recording settings """ outbound_call_tones: Optional[bool] = None """ Flag for controlling 'Play Call Recording Announcement for Outbound Calls' settings """ outbound_call_announcement: Optional[bool] = None """ Flag for controlling 'Play periodic tones for outbound calls' settings """ allow_mute: Optional[bool] = None """ Flag for controlling 'Allow mute in auto call recording' settings """ extension_count: Optional[int] = None """ Total amount of extension that are used in call recordings """ class UpdateCallRecordingSettingsRequestGreetingsItemType(Enum): StartRecording = 'StartRecording' StopRecording = 'StopRecording' AutomaticRecording = 'AutomaticRecording' class UpdateCallRecordingSettingsRequestGreetingsItemMode(Enum): """ 'Default' value specifies that all greetings of that type (in all languages) are default, if at least one greeting (in any language) of the specified type is custom, then 'Custom' value is returned. Generated by Python OpenAPI Parser """ Default = 'Default' Custom = 'Custom' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCallRecordingSettingsRequestGreetingsItem(DataClassJsonMixin): type: Optional[UpdateCallRecordingSettingsRequestGreetingsItemType] = None mode: Optional[UpdateCallRecordingSettingsRequestGreetingsItemMode] = None """ 'Default' value specifies that all greetings of that type (in all languages) are default, if at least one greeting (in any language) of the specified type is custom, then 'Custom' value is returned. """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCallRecordingSettingsRequest(DataClassJsonMixin): on_demand: Optional[UpdateCallRecordingSettingsRequestOnDemand] = None automatic: Optional[UpdateCallRecordingSettingsRequestAutomatic] = None greetings: Optional[List[UpdateCallRecordingSettingsRequestGreetingsItem]] = None """ Collection of Greeting Info """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCallRecordingSettingsResponseOnDemand(DataClassJsonMixin): enabled: Optional[bool] = None """ Flag for controlling OnDemand Call Recording settings """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCallRecordingSettingsResponseAutomatic(DataClassJsonMixin): enabled: Optional[bool] = None """ Flag for controling Automatic Call Recording settings """ outbound_call_tones: Optional[bool] = None """ Flag for controlling 'Play Call Recording Announcement for Outbound Calls' settings """ outbound_call_announcement: Optional[bool] = None """ Flag for controlling 'Play periodic tones for outbound calls' settings """ allow_mute: Optional[bool] = None """ Flag for controlling 'Allow mute in auto call recording' settings """ extension_count: Optional[int] = None """ Total amount of extension that are used in call recordings """ class UpdateCallRecordingSettingsResponseGreetingsItemType(Enum): StartRecording = 'StartRecording' StopRecording = 'StopRecording' AutomaticRecording = 'AutomaticRecording' class UpdateCallRecordingSettingsResponseGreetingsItemMode(Enum): """ 'Default' value specifies that all greetings of that type (in all languages) are default, if at least one greeting (in any language) of the specified type is custom, then 'Custom' value is returned. Generated by Python OpenAPI Parser """ Default = 'Default' Custom = 'Custom' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCallRecordingSettingsResponseGreetingsItem(DataClassJsonMixin): type: Optional[UpdateCallRecordingSettingsResponseGreetingsItemType] = None mode: Optional[UpdateCallRecordingSettingsResponseGreetingsItemMode] = None """ 'Default' value specifies that all greetings of that type (in all languages) are default, if at least one greeting (in any language) of the specified type is custom, then 'Custom' value is returned. """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCallRecordingSettingsResponse(DataClassJsonMixin): on_demand: Optional[UpdateCallRecordingSettingsResponseOnDemand] = None automatic: Optional[UpdateCallRecordingSettingsResponseAutomatic] = None greetings: Optional[List[UpdateCallRecordingSettingsResponseGreetingsItem]] = None """ Collection of Greeting Info """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCallRecordingExtensionsResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an extension """ uri: Optional[str] = None """ Link to an extension resource """ extension_number: Optional[str] = None """ Number of an extension """ name: Optional[str] = None """ Name of an extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCallRecordingExtensionsResponseNavigationFirstPage(DataClassJsonMixin): """ Canonical URI for the first page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCallRecordingExtensionsResponseNavigationNextPage(DataClassJsonMixin): """ Canonical URI for the next page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCallRecordingExtensionsResponseNavigationPreviousPage(DataClassJsonMixin): """ Canonical URI for the previous page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCallRecordingExtensionsResponseNavigationLastPage(DataClassJsonMixin): """ Canonical URI for the last page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCallRecordingExtensionsResponseNavigation(DataClassJsonMixin): """ Information on navigation """ first_page: Optional[ListCallRecordingExtensionsResponseNavigationFirstPage] = None """ Canonical URI for the first page of the list """ next_page: Optional[ListCallRecordingExtensionsResponseNavigationNextPage] = None """ Canonical URI for the next page of the list """ previous_page: Optional[ListCallRecordingExtensionsResponseNavigationPreviousPage] = None """ Canonical URI for the previous page of the list """ last_page: Optional[ListCallRecordingExtensionsResponseNavigationLastPage] = None """ Canonical URI for the last page of the list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCallRecordingExtensionsResponsePaging(DataClassJsonMixin): """ Information on paging """ page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) """ per_page: Optional[int] = None """ Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty """ total_pages: Optional[int] = None """ The total number of pages in a dataset. May be omitted for some resources due to performance reasons """ total_elements: Optional[int] = None """ The total number of elements in a dataset. May be omitted for some resource due to performance reasons """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCallRecordingExtensionsResponse(DataClassJsonMixin): uri: Optional[str] = None """ Link to call recording extension list resource """ records: Optional[List[ListCallRecordingExtensionsResponseRecordsItem]] = None navigation: Optional[ListCallRecordingExtensionsResponseNavigation] = None """ Information on navigation """ paging: Optional[ListCallRecordingExtensionsResponsePaging] = None """ Information on paging """ class UpdateCallRecordingExtensionListRequestAddedExtensionsItemCallDirection(Enum): """ Direction of call """ Outbound = 'Outbound' Inbound = 'Inbound' All = 'All' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCallRecordingExtensionListRequestAddedExtensionsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an extension """ uri: Optional[str] = None extension_number: Optional[str] = None type: Optional[str] = None call_direction: Optional[UpdateCallRecordingExtensionListRequestAddedExtensionsItemCallDirection] = None """ Direction of call """ class UpdateCallRecordingExtensionListRequestUpdatedExtensionsItemCallDirection(Enum): """ Direction of call """ Outbound = 'Outbound' Inbound = 'Inbound' All = 'All' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCallRecordingExtensionListRequestUpdatedExtensionsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an extension """ uri: Optional[str] = None extension_number: Optional[str] = None type: Optional[str] = None call_direction: Optional[UpdateCallRecordingExtensionListRequestUpdatedExtensionsItemCallDirection] = None """ Direction of call """ class UpdateCallRecordingExtensionListRequestRemovedExtensionsItemCallDirection(Enum): """ Direction of call """ Outbound = 'Outbound' Inbound = 'Inbound' All = 'All' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCallRecordingExtensionListRequestRemovedExtensionsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an extension """ uri: Optional[str] = None extension_number: Optional[str] = None type: Optional[str] = None call_direction: Optional[UpdateCallRecordingExtensionListRequestRemovedExtensionsItemCallDirection] = None """ Direction of call """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCallRecordingExtensionListRequest(DataClassJsonMixin): added_extensions: Optional[List[UpdateCallRecordingExtensionListRequestAddedExtensionsItem]] = None updated_extensions: Optional[List[UpdateCallRecordingExtensionListRequestUpdatedExtensionsItem]] = None removed_extensions: Optional[List[UpdateCallRecordingExtensionListRequestRemovedExtensionsItem]] = None class ListCallRecordingCustomGreetingsType(Enum): StartRecording = 'StartRecording' StopRecording = 'StopRecording' AutomaticRecording = 'AutomaticRecording' class ListCallRecordingCustomGreetingsResponseRecordsItemType(Enum): StartRecording = 'StartRecording' StopRecording = 'StopRecording' AutomaticRecording = 'AutomaticRecording' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCallRecordingCustomGreetingsResponseRecordsItemCustom(DataClassJsonMixin): """ Custom greeting data """ uri: Optional[str] = None """ Link to a custom company greeting """ id: Optional[str] = None """ Internal identifier of a custom company greeting """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCallRecordingCustomGreetingsResponseRecordsItemLanguage(DataClassJsonMixin): """ Custom greeting language """ uri: Optional[str] = None """ Link to a language """ id: Optional[str] = None """ Internal identifier of a language """ name: Optional[str] = None """ Language name """ locale_code: Optional[str] = None """ Language locale code """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCallRecordingCustomGreetingsResponseRecordsItem(DataClassJsonMixin): type: Optional[ListCallRecordingCustomGreetingsResponseRecordsItemType] = None custom: Optional[ListCallRecordingCustomGreetingsResponseRecordsItemCustom] = None """ Custom greeting data """ language: Optional[ListCallRecordingCustomGreetingsResponseRecordsItemLanguage] = None """ Custom greeting language """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCallRecordingCustomGreetingsResponse(DataClassJsonMixin): """ Returns data on call recording custom greetings. """ records: Optional[List[ListCallRecordingCustomGreetingsResponseRecordsItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSIPRegistrationRequestDevice(DataClassJsonMixin): """ Device unique description """ id: Optional[str] = None """ Device unique identifier, retrieved on previous session (if any) """ app_external_id: Optional[str] = None """ Supported for iOS devices only. Certificate name (used by iOS applications for APNS subscription) """ computer_name: Optional[str] = None """ Supported for SoftPhone only. Computer name """ serial: Optional[str] = None """ Serial number for HardPhone; endpoint_id for softphone and mobile applications. Returned only when the phone is shipped and provisioned """ class CreateSIPRegistrationRequestSipInfoItemTransport(Enum): """ Supported transport. SIP info will be returned for this transport if supported """ UDP = 'UDP' TCP = 'TCP' TLS = 'TLS' WS = 'WS' WSS = 'WSS' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSIPRegistrationRequestSipInfoItem(DataClassJsonMixin): transport: Optional[CreateSIPRegistrationRequestSipInfoItemTransport] = None """ Supported transport. SIP info will be returned for this transport if supported """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSIPRegistrationRequest(DataClassJsonMixin): device: Optional[CreateSIPRegistrationRequestDevice] = None """ Device unique description """ sip_info: Optional[List[CreateSIPRegistrationRequestSipInfoItem]] = None """ SIP settings for device """ class CreateSIPRegistrationResponseDeviceType(Enum): """ Device type """ HardPhone = 'HardPhone' SoftPhone = 'SoftPhone' OtherPhone = 'OtherPhone' Paging = 'Paging' WebPhone = 'WebPhone' class CreateSIPRegistrationResponseDeviceStatus(Enum): Online = 'Online' Offline = 'Offline' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSIPRegistrationResponseDeviceModelAddonsItem(DataClassJsonMixin): id: Optional[str] = None name: Optional[str] = None count: Optional[str] = None class CreateSIPRegistrationResponseDeviceModelFeaturesItem(Enum): BLA = 'BLA' Intercom = 'Intercom' Paging = 'Paging' HELD = 'HELD' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSIPRegistrationResponseDeviceModel(DataClassJsonMixin): """ HardPhone model information Required Properties: - addons Generated by Python OpenAPI Parser """ addons: List[CreateSIPRegistrationResponseDeviceModelAddonsItem] """ Addons description """ id: Optional[str] = None """ Addon identifier. For HardPhones of certain types, which are compatible with this addon identifier """ name: Optional[str] = None """ Device name """ features: Optional[List[CreateSIPRegistrationResponseDeviceModelFeaturesItem]] = None """ Device feature or multiple features supported """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSIPRegistrationResponseDeviceExtension(DataClassJsonMixin): """ Internal identifier of an extension the device should be assigned to """ id: Optional[int] = None """ Internal identifier of an extension """ uri: Optional[str] = None """ Link to an extension resource """ extension_number: Optional[str] = None """ Number of extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSIPRegistrationResponseDeviceEmergencyServiceAddress(DataClassJsonMixin): """ Address for emergency cases. The same emergency address is assigned to all the numbers of one device Generated by Python OpenAPI Parser """ street: Optional[str] = None street2: Optional[str] = None city: Optional[str] = None zip: Optional[str] = None customer_name: Optional[str] = None state: Optional[str] = None """ State/province name """ state_id: Optional[str] = None """ Internal identifier of a state """ state_iso_code: Optional[str] = None """ ISO code of a state """ state_name: Optional[str] = None """ Full name of a state """ country_id: Optional[str] = None """ Internal identifier of a country """ country_iso_code: Optional[str] = None """ ISO code of a country """ country: Optional[str] = None """ Country name """ country_name: Optional[str] = None """ Full name of a country """ out_of_country: Optional[bool] = None """ Specifies if emergency address is out of country """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSIPRegistrationResponseDeviceEmergencyAddress(DataClassJsonMixin): street: Optional[str] = None street2: Optional[str] = None city: Optional[str] = None zip: Optional[str] = None customer_name: Optional[str] = None state: Optional[str] = None """ State/province name """ state_id: Optional[str] = None """ Internal identifier of a state """ state_iso_code: Optional[str] = None """ ISO code of a state """ state_name: Optional[str] = None """ Full name of a state """ country_id: Optional[str] = None """ Internal identifier of a country """ country_iso_code: Optional[str] = None """ ISO code of a country """ country: Optional[str] = None """ Country name """ country_name: Optional[str] = None """ Full name of a country """ out_of_country: Optional[bool] = None """ Specifies if emergency address is out of country """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSIPRegistrationResponseDeviceEmergencyLocation(DataClassJsonMixin): """ Company emergency response location details """ id: Optional[str] = None """ Internal identifier of an emergency response location """ name: Optional[str] = None """ Emergency response location name """ class CreateSIPRegistrationResponseDeviceEmergencyAddressStatus(Enum): """ Emergency address status """ Valid = 'Valid' Invalid = 'Invalid' class CreateSIPRegistrationResponseDeviceEmergencySyncStatus(Enum): """ Resulting status of emergency address synchronization. Returned if `syncEmergencyAddress` parameter is set to 'True' Generated by Python OpenAPI Parser """ Verified = 'Verified' Updated = 'Updated' Deleted = 'Deleted' NotRequired = 'NotRequired' Unsupported = 'Unsupported' Failed = 'Failed' class CreateSIPRegistrationResponseDeviceEmergencyAddressEditableStatus(Enum): """ Ability to register new emergency address for a phone line using devices sharing this line or only main device (line owner) Generated by Python OpenAPI Parser """ MainDevice = 'MainDevice' AnyDevice = 'AnyDevice' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSIPRegistrationResponseDeviceEmergency(DataClassJsonMixin): """ Emergency response location settings of a device """ address: Optional[CreateSIPRegistrationResponseDeviceEmergencyAddress] = None location: Optional[CreateSIPRegistrationResponseDeviceEmergencyLocation] = None """ Company emergency response location details """ out_of_country: Optional[bool] = None """ Specifies if emergency address is out of country """ address_status: Optional[CreateSIPRegistrationResponseDeviceEmergencyAddressStatus] = None """ Emergency address status """ sync_status: Optional[CreateSIPRegistrationResponseDeviceEmergencySyncStatus] = None """ Resulting status of emergency address synchronization. Returned if `syncEmergencyAddress` parameter is set to 'True' """ address_editable_status: Optional[CreateSIPRegistrationResponseDeviceEmergencyAddressEditableStatus] = None """ Ability to register new emergency address for a phone line using devices sharing this line or only main device (line owner) """ address_required: Optional[bool] = None """ 'True' if emergency address is required for the country of a phone line """ address_location_only: Optional[bool] = None """ 'True' if out of country emergency address is not allowed for the country of a phone line """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSIPRegistrationResponseDeviceShippingAddress(DataClassJsonMixin): street: Optional[str] = None street2: Optional[str] = None city: Optional[str] = None zip: Optional[str] = None customer_name: Optional[str] = None state: Optional[str] = None """ State/province name """ state_id: Optional[str] = None """ Internal identifier of a state """ state_iso_code: Optional[str] = None """ ISO code of a state """ state_name: Optional[str] = None """ Full name of a state """ country_id: Optional[str] = None """ Internal identifier of a country """ country_iso_code: Optional[str] = None """ ISO code of a country """ country: Optional[str] = None """ Country name """ country_name: Optional[str] = None """ Full name of a country """ out_of_country: Optional[bool] = None """ Specifies if emergency address is out of country """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSIPRegistrationResponseDeviceShippingMethod(DataClassJsonMixin): id: Optional[str] = None name: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSIPRegistrationResponseDeviceShipping(DataClassJsonMixin): """ Shipping information, according to which devices (in case of HardPhone ) or e911 stickers (in case of SoftPhone and OtherPhone ) will be delivered to the customer Generated by Python OpenAPI Parser """ address: Optional[CreateSIPRegistrationResponseDeviceShippingAddress] = None method: Optional[CreateSIPRegistrationResponseDeviceShippingMethod] = None status: Optional[str] = None carrier: Optional[str] = None tracking_number: Optional[str] = None class CreateSIPRegistrationResponseDevicePhoneLinesItemLineType(Enum): """ Type of phone line """ Standalone = 'Standalone' StandaloneFree = 'StandaloneFree' BlaPrimary = 'BlaPrimary' BlaSecondary = 'BlaSecondary' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSIPRegistrationResponseDevicePhoneLinesItemEmergencyAddress(DataClassJsonMixin): required: Optional[bool] = None """ 'True' if specifying of emergency address is required """ local_only: Optional[bool] = None """ 'True' if only local emergency address can be specified """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSIPRegistrationResponseDevicePhoneLinesItemPhoneInfoCountry(DataClassJsonMixin): """ Brief information on a phone number country """ id: Optional[str] = None """ Internal identifier of a home country """ uri: Optional[str] = None """ Canonical URI of a home country """ name: Optional[str] = None """ Official name of a home country """ class CreateSIPRegistrationResponseDevicePhoneLinesItemPhoneInfoPaymentType(Enum): """ Payment type. 'External' is returned for forwarded numbers which are not terminated in the RingCentral phone system = ['External', 'TollFree', 'Local'], Generated by Python OpenAPI Parser """ External = 'External' TollFree = 'TollFree' Local = 'Local' class CreateSIPRegistrationResponseDevicePhoneLinesItemPhoneInfoUsageType(Enum): CompanyNumber = 'CompanyNumber' MainCompanyNumber = 'MainCompanyNumber' AdditionalCompanyNumber = 'AdditionalCompanyNumber' DirectNumber = 'DirectNumber' CompanyFaxNumber = 'CompanyFaxNumber' ForwardedNumber = 'ForwardedNumber' ForwardedCompanyNumber = 'ForwardedCompanyNumber' ContactCenterNumber = 'ContactCenterNumber' class CreateSIPRegistrationResponseDevicePhoneLinesItemPhoneInfoType(Enum): """ Type of a phone number """ VoiceFax = 'VoiceFax' FaxOnly = 'FaxOnly' VoiceOnly = 'VoiceOnly' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSIPRegistrationResponseDevicePhoneLinesItemPhoneInfo(DataClassJsonMixin): """ Phone number information """ id: Optional[int] = None """ Internal identifier of a phone number """ country: Optional[CreateSIPRegistrationResponseDevicePhoneLinesItemPhoneInfoCountry] = None """ Brief information on a phone number country """ payment_type: Optional[CreateSIPRegistrationResponseDevicePhoneLinesItemPhoneInfoPaymentType] = None """ Payment type. 'External' is returned for forwarded numbers which are not terminated in the RingCentral phone system = ['External', 'TollFree', 'Local'], """ phone_number: Optional[str] = None """ Phone number """ usage_type: Optional[CreateSIPRegistrationResponseDevicePhoneLinesItemPhoneInfoUsageType] = None type: Optional[CreateSIPRegistrationResponseDevicePhoneLinesItemPhoneInfoType] = None """ Type of a phone number """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSIPRegistrationResponseDevicePhoneLinesItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a phone line """ line_type: Optional[CreateSIPRegistrationResponseDevicePhoneLinesItemLineType] = None """ Type of phone line """ emergency_address: Optional[CreateSIPRegistrationResponseDevicePhoneLinesItemEmergencyAddress] = None phone_info: Optional[CreateSIPRegistrationResponseDevicePhoneLinesItemPhoneInfo] = None """ Phone number information """ class CreateSIPRegistrationResponseDeviceLinePooling(Enum): """ Pooling type of a deviceHost - device with standalone paid phone line which can be linked to Glip/Softphone instanceGuest - device with a linked phone lineNone - device without a phone line or with specific line (free, BLA, etc.) = ['Host', 'Guest', 'None'] Generated by Python OpenAPI Parser """ Host = 'Host' Guest = 'Guest' None_ = 'None' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSIPRegistrationResponseDeviceSite(DataClassJsonMixin): """ Site data """ id: Optional[str] = None """ Internal identifier of a site """ name: Optional[str] = None """ Name of a site """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSIPRegistrationResponseDevice(DataClassJsonMixin): uri: Optional[str] = None """ Link to a device resource """ id: Optional[str] = None """ Internal identifier of a Device """ type: Optional[CreateSIPRegistrationResponseDeviceType] = None """ Device type """ sku: Optional[str] = None """ Device identification number (stock keeping unit) in the format TP-ID [-AT-AC], where TP is device type (HP for RC HardPhone, DV for all other devices including softphone); ID - device model ID; AT -addon type ID; AC - addon count (if any). For example 'HP-56-2-2' """ status: Optional[CreateSIPRegistrationResponseDeviceStatus] = None name: Optional[str] = None """ Device name. Mandatory if ordering SoftPhone or OtherPhone. Optional for HardPhone. If not specified for HardPhone, then device model name is used as device name """ serial: Optional[str] = None """ Serial number for HardPhone (is returned only when the phone is shipped and provisioned); endpoint_id for softphone and mobile applications """ computer_name: Optional[str] = None """ PC name for softphone """ model: Optional[CreateSIPRegistrationResponseDeviceModel] = None """ HardPhone model information """ extension: Optional[CreateSIPRegistrationResponseDeviceExtension] = None """ Internal identifier of an extension the device should be assigned to """ emergency_service_address: Optional[CreateSIPRegistrationResponseDeviceEmergencyServiceAddress] = None """ Address for emergency cases. The same emergency address is assigned to all the numbers of one device """ emergency: Optional[CreateSIPRegistrationResponseDeviceEmergency] = None """ Emergency response location settings of a device """ shipping: Optional[CreateSIPRegistrationResponseDeviceShipping] = None """ Shipping information, according to which devices (in case of HardPhone ) or e911 stickers (in case of SoftPhone and OtherPhone ) will be delivered to the customer """ phone_lines: Optional[List[CreateSIPRegistrationResponseDevicePhoneLinesItem]] = None """ Phone lines information """ box_billing_id: Optional[int] = None """ Box billing identifier of a device. Applicable only for HardPhones. It is an alternative way to identify the device to be ordered. EitherT? model structure, or boxBillingId must be specified forT?HardPhone """ use_as_common_phone: Optional[bool] = None """ Supported only for devices assigned to Limited extensions. If true, enables users to log in to this phone as a common phone. """ line_pooling: Optional[CreateSIPRegistrationResponseDeviceLinePooling] = None """ Pooling type of a deviceHost - device with standalone paid phone line which can be linked to Glip/Softphone instanceGuest - device with a linked phone lineNone - device without a phone line or with specific line (free, BLA, etc.) = ['Host', 'Guest', 'None'] """ in_company_net: Optional[bool] = None """ Network location status. 'True' if the device is located in the configured corporate network (On-Net); 'False' for Off-Net location. Parameter is not returned if `EmergencyAddressAutoUpdate` feature is not enabled for the account/user, or if device network location is not determined """ site: Optional[CreateSIPRegistrationResponseDeviceSite] = None """ Site data """ last_location_report_time: Optional[str] = None """ Datetime of receiving last location report in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format including timezone, for example *2016-03-10T18:07:52.534Z """ class CreateSIPRegistrationResponseSipInfoItemTransport(Enum): """ Preferred transport. SIP info will be returned for this transport if supported """ UDP = 'UDP' TCP = 'TCP' TLS = 'TLS' WS = 'WS' WSS = 'WSS' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSIPRegistrationResponseSipInfoItem(DataClassJsonMixin): username: Optional[str] = None """ User credentials """ password: Optional[str] = None """ User password """ authorization_id: Optional[str] = None """ Identifier for SIP authorization """ omain: Optional[str] = None """ SIP domain """ outbound_proxy: Optional[str] = None """ SIP outbound proxy """ outbound_proxy_i_pv6: Optional[str] = None """ SIP outbound IPv6 proxy """ outbound_proxy_backup: Optional[str] = None """ SIP outbound proxy backup """ outbound_proxy_i_pv6_backup: Optional[str] = None """ SIP outbound IPv6 proxy backup """ transport: Optional[CreateSIPRegistrationResponseSipInfoItemTransport] = None """ Preferred transport. SIP info will be returned for this transport if supported """ certificate: Optional[str] = None """ For TLS transport only Base64 encoded certificate """ switch_back_interval: Optional[int] = None """ The interval in seconds after which the app must try to switch back to primary proxy if it was previously switched to backup. If this parameter is not returned, the app must stay on backup proxy and try to switch to primary proxy after the next SIP-provision call. """ class CreateSIPRegistrationResponseSipInfoPstnItemTransport(Enum): """ Preferred transport. SIP info will be returned for this transport if supported """ UDP = 'UDP' TCP = 'TCP' TLS = 'TLS' WS = 'WS' WSS = 'WSS' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSIPRegistrationResponseSipInfoPstnItem(DataClassJsonMixin): username: Optional[str] = None """ User credentials """ password: Optional[str] = None """ User password """ authorization_id: Optional[str] = None """ Identifier for SIP authorization """ omain: Optional[str] = None """ SIP domain """ outbound_proxy: Optional[str] = None """ SIP outbound proxy """ outbound_proxy_i_pv6: Optional[str] = None """ SIP outbound IPv6 proxy """ outbound_proxy_backup: Optional[str] = None """ SIP outbound proxy backup """ outbound_proxy_i_pv6_backup: Optional[str] = None """ SIP outbound IPv6 proxy backup """ transport: Optional[CreateSIPRegistrationResponseSipInfoPstnItemTransport] = None """ Preferred transport. SIP info will be returned for this transport if supported """ certificate: Optional[str] = None """ For TLS transport only Base64 encoded certificate """ switch_back_interval: Optional[int] = None """ The interval in seconds after which the app must try to switch back to primary proxy if it was previously switched to backup. If this parameter is not returned, the app must stay on backup proxy and try to switch to primary proxy after the next SIP-provision call. """ class CreateSIPRegistrationResponseSipFlagsVoipFeatureEnabled(Enum): """ If 'True' VoIP calling feature is enabled """ True_ = 'True' False_ = 'False' class CreateSIPRegistrationResponseSipFlagsVoipCountryBlocked(Enum): """ If 'True' the request is sent from IP address of a country blocked for VoIP calling """ True_ = 'True' False_ = 'False' class CreateSIPRegistrationResponseSipFlagsOutboundCallsEnabled(Enum): """ If 'True' outbound calls are enabled """ True_ = 'True' False_ = 'False' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSIPRegistrationResponseSipFlags(DataClassJsonMixin): """ SIP flags data """ voip_feature_enabled: Optional[CreateSIPRegistrationResponseSipFlagsVoipFeatureEnabled] = None """ If 'True' VoIP calling feature is enabled """ voip_country_blocked: Optional[CreateSIPRegistrationResponseSipFlagsVoipCountryBlocked] = None """ If 'True' the request is sent from IP address of a country blocked for VoIP calling """ outbound_calls_enabled: Optional[CreateSIPRegistrationResponseSipFlagsOutboundCallsEnabled] = None """ If 'True' outbound calls are enabled """ dscp_enabled: Optional[bool] = None dscp_signaling: Optional[int] = None dscp_voice: Optional[int] = None dscp_video: Optional[int] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSIPRegistrationResponse(DataClassJsonMixin): """ Required Properties: - sip_flags - sip_info Generated by Python OpenAPI Parser """ sip_info: List[CreateSIPRegistrationResponseSipInfoItem] """ SIP settings for device """ sip_flags: CreateSIPRegistrationResponseSipFlags """ SIP flags data """ device: Optional[CreateSIPRegistrationResponseDevice] = None sip_info_pstn: Optional[List[CreateSIPRegistrationResponseSipInfoPstnItem]] = None """ SIP PSTN settings for device """ sip_error_codes: Optional[List[str]] = None class ListExtensionPhoneNumbersStatus(Enum): Normal = 'Normal' Pending = 'Pending' PortedIn = 'PortedIn' Temporary = 'Temporary' class ListExtensionPhoneNumbersUsageTypeItem(Enum): MainCompanyNumber = 'MainCompanyNumber' AdditionalCompanyNumber = 'AdditionalCompanyNumber' CompanyNumber = 'CompanyNumber' DirectNumber = 'DirectNumber' CompanyFaxNumber = 'CompanyFaxNumber' ForwardedNumber = 'ForwardedNumber' ForwardedCompanyNumber = 'ForwardedCompanyNumber' BusinessMobileNumber = 'BusinessMobileNumber' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionPhoneNumbersResponseRecordsItemCountry(DataClassJsonMixin): """ Brief information on a phone number country """ id: Optional[str] = None """ Internal identifier of a home country """ uri: Optional[str] = None """ Canonical URI of a home country """ name: Optional[str] = None """ Official name of a home country """ iso_code: Optional[str] = None """ ISO code of a country """ calling_code: Optional[str] = None """ Calling code of a country """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionPhoneNumbersResponseRecordsItemContactCenterProvider(DataClassJsonMixin): """ CCRN (Contact Center Routing Number) provider. If not specified then the default value 'InContact/North America' is used, its ID is '1' Generated by Python OpenAPI Parser """ id: Optional[str] = None """ Internal identifier of the provider """ name: Optional[str] = None """ Provider's name """ class ListExtensionPhoneNumbersResponseRecordsItemExtensionType(Enum): """ Extension type """ User = 'User' FaxUser = 'FaxUser' VirtualUser = 'VirtualUser' DigitalUser = 'DigitalUser' Department = 'Department' Announcement = 'Announcement' Voicemail = 'Voicemail' SharedLinesGroup = 'SharedLinesGroup' PagingOnly = 'PagingOnly' IvrMenu = 'IvrMenu' ApplicationExtension = 'ApplicationExtension' ParkLocation = 'ParkLocation' Site = 'Site' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionPhoneNumbersResponseRecordsItemExtensionContactCenterProvider(DataClassJsonMixin): """ CCRN (Contact Center Routing Number) provider. If not specified then the default value 'InContact/North America' is used, its ID is '1' Generated by Python OpenAPI Parser """ id: Optional[str] = None """ Internal identifier of the provider """ name: Optional[str] = None """ Provider's name """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionPhoneNumbersResponseRecordsItemExtension(DataClassJsonMixin): """ Information on the extension, to which the phone number is assigned. Returned only for the request of Account phone number list Generated by Python OpenAPI Parser """ id: Optional[int] = None """ Internal identifier of an extension """ uri: Optional[str] = None """ Canonical URI of an extension """ extension_number: Optional[str] = None """ Number of department extension """ partner_id: Optional[str] = None """ For Partner Applications Internal identifier of an extension created by partner. The RingCentral supports the mapping of accounts and stores the corresponding account ID/extension ID for each partner ID of a client application. In request URIs partner IDs are accepted instead of regular RingCentral native IDs as path parameters using pid = XXX clause. Though in response URIs contain the corresponding account IDs and extension IDs. In all request and response bodies these values are reflected via partnerId attributes of account and extension """ type: Optional[ListExtensionPhoneNumbersResponseRecordsItemExtensionType] = None """ Extension type """ contact_center_provider: Optional[ListExtensionPhoneNumbersResponseRecordsItemExtensionContactCenterProvider] = None """ CCRN (Contact Center Routing Number) provider. If not specified then the default value 'InContact/North America' is used, its ID is '1' """ name: Optional[str] = None """ Extension name. For user extension types the value is a combination of the specified first name and last name """ class ListExtensionPhoneNumbersResponseRecordsItemPaymentType(Enum): """ Payment type. 'External' is returned for forwarded numbers which are not terminated in the RingCentral phone system Generated by Python OpenAPI Parser """ External = 'External' TollFree = 'TollFree' Local = 'Local' BusinessMobileNumberProvider = 'BusinessMobileNumberProvider' class ListExtensionPhoneNumbersResponseRecordsItemType(Enum): """ Phone number type """ VoiceFax = 'VoiceFax' FaxOnly = 'FaxOnly' VoiceOnly = 'VoiceOnly' class ListExtensionPhoneNumbersResponseRecordsItemUsageType(Enum): """ Usage type of a phone number. Numbers of 'NumberPool' type wont't be returned for phone number list requests Generated by Python OpenAPI Parser """ MainCompanyNumber = 'MainCompanyNumber' AdditionalCompanyNumber = 'AdditionalCompanyNumber' CompanyNumber = 'CompanyNumber' DirectNumber = 'DirectNumber' CompanyFaxNumber = 'CompanyFaxNumber' ForwardedNumber = 'ForwardedNumber' ForwardedCompanyNumber = 'ForwardedCompanyNumber' ContactCenterNumber = 'ContactCenterNumber' ConferencingNumber = 'ConferencingNumber' NumberPool = 'NumberPool' BusinessMobileNumber = 'BusinessMobileNumber' class ListExtensionPhoneNumbersResponseRecordsItemFeaturesItem(Enum): CallerId = 'CallerId' SmsSender = 'SmsSender' A2PSmsSender = 'A2PSmsSender' MmsSender = 'MmsSender' InternationalSmsSender = 'InternationalSmsSender' Delegated = 'Delegated' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionPhoneNumbersResponseRecordsItem(DataClassJsonMixin): uri: Optional[str] = None """ Link to the user's phone number resource """ id: Optional[int] = None """ Internal identifier of a phone number """ country: Optional[ListExtensionPhoneNumbersResponseRecordsItemCountry] = None """ Brief information on a phone number country """ contact_center_provider: Optional[ListExtensionPhoneNumbersResponseRecordsItemContactCenterProvider] = None """ CCRN (Contact Center Routing Number) provider. If not specified then the default value 'InContact/North America' is used, its ID is '1' """ extension: Optional[ListExtensionPhoneNumbersResponseRecordsItemExtension] = None """ Information on the extension, to which the phone number is assigned. Returned only for the request of Account phone number list """ label: Optional[str] = None """ Custom user name of a phone number, if any """ location: Optional[str] = None """ Location (City, State). Filled for local US numbers """ payment_type: Optional[ListExtensionPhoneNumbersResponseRecordsItemPaymentType] = None """ Payment type. 'External' is returned for forwarded numbers which are not terminated in the RingCentral phone system """ phone_number: Optional[str] = None """ Phone number """ status: Optional[str] = None """ Status of a phone number. If the value is 'Normal', the phone number is ready to be used. Otherwise it is an external number not yet ported to RingCentral """ type: Optional[ListExtensionPhoneNumbersResponseRecordsItemType] = None """ Phone number type """ usage_type: Optional[ListExtensionPhoneNumbersResponseRecordsItemUsageType] = None """ Usage type of a phone number. Numbers of 'NumberPool' type wont't be returned for phone number list requests """ features: Optional[List[ListExtensionPhoneNumbersResponseRecordsItemFeaturesItem]] = None """ List of features of a phone number """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionPhoneNumbersResponseNavigationFirstPage(DataClassJsonMixin): """ Canonical URI for the first page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionPhoneNumbersResponseNavigationNextPage(DataClassJsonMixin): """ Canonical URI for the next page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionPhoneNumbersResponseNavigationPreviousPage(DataClassJsonMixin): """ Canonical URI for the previous page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionPhoneNumbersResponseNavigationLastPage(DataClassJsonMixin): """ Canonical URI for the last page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionPhoneNumbersResponseNavigation(DataClassJsonMixin): """ Information on navigation """ first_page: Optional[ListExtensionPhoneNumbersResponseNavigationFirstPage] = None """ Canonical URI for the first page of the list """ next_page: Optional[ListExtensionPhoneNumbersResponseNavigationNextPage] = None """ Canonical URI for the next page of the list """ previous_page: Optional[ListExtensionPhoneNumbersResponseNavigationPreviousPage] = None """ Canonical URI for the previous page of the list """ last_page: Optional[ListExtensionPhoneNumbersResponseNavigationLastPage] = None """ Canonical URI for the last page of the list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionPhoneNumbersResponsePaging(DataClassJsonMixin): """ Information on paging """ page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) """ per_page: Optional[int] = None """ Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty """ total_pages: Optional[int] = None """ The total number of pages in a dataset. May be omitted for some resources due to performance reasons """ total_elements: Optional[int] = None """ The total number of elements in a dataset. May be omitted for some resource due to performance reasons """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionPhoneNumbersResponse(DataClassJsonMixin): """ Required Properties: - navigation - paging - records Generated by Python OpenAPI Parser """ records: List[ListExtensionPhoneNumbersResponseRecordsItem] """ List of phone numbers """ navigation: ListExtensionPhoneNumbersResponseNavigation """ Information on navigation """ paging: ListExtensionPhoneNumbersResponsePaging """ Information on paging """ uri: Optional[str] = None """ Link to the user's phone number list resource """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadExtensionResponseAccount(DataClassJsonMixin): """ Account information """ id: Optional[str] = None """ Internal identifier of an account """ uri: Optional[str] = None """ Canonical URI of an account """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadExtensionResponseContactBusinessAddress(DataClassJsonMixin): """ Business address of extension user company """ country: Optional[str] = None """ Country name of an extension user company """ state: Optional[str] = None """ State/province name of an extension user company. Mandatory for the USA, UK and Canada """ city: Optional[str] = None """ City name of an extension user company """ street: Optional[str] = None """ Street address of an extension user company """ zip: Optional[str] = None """ Zip code of an extension user company """ class ReadExtensionResponseContactPronouncedNameType(Enum): """ Voice name type. 'Default' - default extension name; first name and last name specified in user profile; 'TextToSpeech' - custom text; user name spelled the way it sounds and specified by user; 'Recorded' - custom audio, user name recorded in user's own voice (supported only for extension retrieval) Generated by Python OpenAPI Parser """ Default = 'Default' TextToSpeech = 'TextToSpeech' Recorded = 'Recorded' class ReadExtensionResponseContactPronouncedNamePromptContentType(Enum): """ Content media type """ AudioMpeg = 'audio/mpeg' AudioWav = 'audio/wav' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadExtensionResponseContactPronouncedNamePrompt(DataClassJsonMixin): id: Optional[str] = None content_uri: Optional[str] = None """ Link to a prompt resource """ content_type: Optional[ReadExtensionResponseContactPronouncedNamePromptContentType] = None """ Content media type """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadExtensionResponseContactPronouncedName(DataClassJsonMixin): type: Optional[ReadExtensionResponseContactPronouncedNameType] = None """ Voice name type. 'Default' - default extension name; first name and last name specified in user profile; 'TextToSpeech' - custom text; user name spelled the way it sounds and specified by user; 'Recorded' - custom audio, user name recorded in user's own voice (supported only for extension retrieval) """ text: Optional[str] = None """ Custom text """ prompt: Optional[ReadExtensionResponseContactPronouncedNamePrompt] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadExtensionResponseContact(DataClassJsonMixin): """ Contact detailed information """ first_name: Optional[str] = None """ For User extension type only. Extension user first name """ last_name: Optional[str] = None """ For User extension type only. Extension user last name """ company: Optional[str] = None """ Extension user company name """ job_title: Optional[str] = None email: Optional[str] = None """ Email of extension user """ business_phone: Optional[str] = None """ Extension user contact phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) (with '+' sign) format """ mobile_phone: Optional[str] = None """ Extension user mobile (**non** Toll Free) phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) (with '+' sign) format """ business_address: Optional[ReadExtensionResponseContactBusinessAddress] = None """ Business address of extension user company """ email_as_login_name: Optional[bool] = 'False' """ If 'True' then contact email is enabled as login name for this user. Please note that email should be unique in this case. """ pronounced_name: Optional[ReadExtensionResponseContactPronouncedName] = None department: Optional[str] = None """ Extension user department, if any """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadExtensionResponseCustomFieldsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a custom field """ value: Optional[str] = None """ Custom field value """ display_name: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadExtensionResponseDepartmentsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a department extension """ uri: Optional[str] = None """ Canonical URI of a department extension """ extension_number: Optional[str] = None """ Number of a department extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadExtensionResponsePermissionsAdmin(DataClassJsonMixin): """ Admin permission """ enabled: Optional[bool] = None """ Specifies if a permission is enabled or not """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadExtensionResponsePermissionsInternationalCalling(DataClassJsonMixin): """ International Calling permission """ enabled: Optional[bool] = None """ Specifies if a permission is enabled or not """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadExtensionResponsePermissions(DataClassJsonMixin): """ Extension permissions, corresponding to the Service Web permissions 'Admin' and 'InternationalCalling' Generated by Python OpenAPI Parser """ admin: Optional[ReadExtensionResponsePermissionsAdmin] = None """ Admin permission """ international_calling: Optional[ReadExtensionResponsePermissionsInternationalCalling] = None """ International Calling permission """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadExtensionResponseProfileImageScalesItem(DataClassJsonMixin): uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadExtensionResponseProfileImage(DataClassJsonMixin): """ Information on profile image Required Properties: - uri Generated by Python OpenAPI Parser """ uri: str """ Link to a profile image. If an image is not uploaded for an extension, only uri is returned """ etag: Optional[str] = None """ Identifier of an image """ last_modified: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ The datetime when an image was last updated in ISO 8601 format, for example 2016-03-10T18:07:52.534Z """ content_type: Optional[str] = None """ The type of an image """ scales: Optional[List[ReadExtensionResponseProfileImageScalesItem]] = None """ List of URIs to profile images in different dimensions """ class ReadExtensionResponseReferencesItemType(Enum): """ Type of external identifier """ PartnerId = 'PartnerId' CustomerDirectoryId = 'CustomerDirectoryId' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadExtensionResponseReferencesItem(DataClassJsonMixin): ref: Optional[str] = None """ Non-RC identifier of an extension """ type: Optional[ReadExtensionResponseReferencesItemType] = None """ Type of external identifier """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadExtensionResponseRolesItem(DataClassJsonMixin): uri: Optional[str] = None id: Optional[str] = None """ Internal identifier of a role """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadExtensionResponseRegionalSettingsHomeCountry(DataClassJsonMixin): """ Extension country information """ id: Optional[str] = None """ Internal identifier of a home country """ uri: Optional[str] = None """ Canonical URI of a home country """ name: Optional[str] = None """ Official name of a home country """ iso_code: Optional[str] = None """ ISO code of a country """ calling_code: Optional[str] = None """ Calling code of a country """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadExtensionResponseRegionalSettingsTimezone(DataClassJsonMixin): """ Extension timezone information """ id: Optional[str] = None """ Internal identifier of a timezone """ uri: Optional[str] = None """ Canonical URI of a timezone """ name: Optional[str] = None """ Short name of a timezone """ description: Optional[str] = None """ Meaningful description of the timezone """ bias: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadExtensionResponseRegionalSettingsLanguage(DataClassJsonMixin): """ User interface language data """ id: Optional[str] = None """ Internal identifier of a language """ uri: Optional[str] = None """ Canonical URI of a language """ greeting: Optional[bool] = None """ Indicates whether a language is available as greeting language """ formatting_locale: Optional[bool] = None """ Indicates whether a language is available as formatting locale """ locale_code: Optional[str] = None """ Localization code of a language """ iso_code: Optional[str] = None """ Country code according to the ISO standard, see [ISO 3166](https://www.iso.org/iso-3166-country-codes.html) """ name: Optional[str] = None """ Official name of a language """ ui: Optional[bool] = None """ Indicates whether a language is available as UI language """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadExtensionResponseRegionalSettingsGreetingLanguage(DataClassJsonMixin): """ Information on language used for telephony greetings """ id: Optional[str] = None """ Internal identifier of a greeting language """ locale_code: Optional[str] = None """ Localization code of a greeting language """ name: Optional[str] = None """ Official name of a greeting language """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadExtensionResponseRegionalSettingsFormattingLocale(DataClassJsonMixin): """ Formatting language preferences for numbers, dates and currencies """ id: Optional[str] = None """ Internal identifier of a formatting language """ locale_code: Optional[str] = None """ Localization code of a formatting language """ name: Optional[str] = None class ReadExtensionResponseRegionalSettingsTimeFormat(Enum): """ Time format setting. The default value is '12h' = ['12h', '24h'] """ OBJECT_12h = '12h' OBJECT_24h = '24h' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadExtensionResponseRegionalSettings(DataClassJsonMixin): """ Extension region data (timezone, home country, language) """ home_country: Optional[ReadExtensionResponseRegionalSettingsHomeCountry] = None """ Extension country information """ timezone: Optional[ReadExtensionResponseRegionalSettingsTimezone] = None """ Extension timezone information """ language: Optional[ReadExtensionResponseRegionalSettingsLanguage] = None """ User interface language data """ greeting_language: Optional[ReadExtensionResponseRegionalSettingsGreetingLanguage] = None """ Information on language used for telephony greetings """ formatting_locale: Optional[ReadExtensionResponseRegionalSettingsFormattingLocale] = None """ Formatting language preferences for numbers, dates and currencies """ time_format: Optional[ReadExtensionResponseRegionalSettingsTimeFormat] = None """ Time format setting. The default value is '12h' = ['12h', '24h'] """ class ReadExtensionResponseServiceFeaturesItemFeatureName(Enum): """ Feature name """ AccountFederation = 'AccountFederation' Archiver = 'Archiver' AutomaticCallRecordingMute = 'AutomaticCallRecordingMute' AutomaticInboundCallRecording = 'AutomaticInboundCallRecording' AutomaticOutboundCallRecording = 'AutomaticOutboundCallRecording' BlockedMessageForwarding = 'BlockedMessageForwarding' Calendar = 'Calendar' CallerIdControl = 'CallerIdControl' CallForwarding = 'CallForwarding' CallPark = 'CallPark' CallParkLocations = 'CallParkLocations' CallSupervision = 'CallSupervision' CallSwitch = 'CallSwitch' CallQualitySurvey = 'CallQualitySurvey' Conferencing = 'Conferencing' ConferencingNumber = 'ConferencingNumber' ConfigureDelegates = 'ConfigureDelegates' DeveloperPortal = 'DeveloperPortal' DND = 'DND' DynamicConference = 'DynamicConference' EmergencyAddressAutoUpdate = 'EmergencyAddressAutoUpdate' EmergencyCalling = 'EmergencyCalling' EncryptionAtRest = 'EncryptionAtRest' ExternalDirectoryIntegration = 'ExternalDirectoryIntegration' Fax = 'Fax' FaxReceiving = 'FaxReceiving' FreeSoftPhoneLines = 'FreeSoftPhoneLines' HDVoice = 'HDVoice' HipaaCompliance = 'HipaaCompliance' Intercom = 'Intercom' InternationalCalling = 'InternationalCalling' InternationalSMS = 'InternationalSMS' LinkedSoftphoneLines = 'LinkedSoftphoneLines' MMS = 'MMS' MobileVoipEmergencyCalling = 'MobileVoipEmergencyCalling' OnDemandCallRecording = 'OnDemandCallRecording' Pager = 'Pager' PagerReceiving = 'PagerReceiving' Paging = 'Paging' PasswordAuth = 'PasswordAuth' PromoMessage = 'PromoMessage' Reports = 'Reports' Presence = 'Presence' RCTeams = 'RCTeams' RingOut = 'RingOut' SalesForce = 'SalesForce' SharedLines = 'SharedLines' SingleExtensionUI = 'SingleExtensionUI' SiteCodes = 'SiteCodes' SMS = 'SMS' SMSReceiving = 'SMSReceiving' SoftPhoneUpdate = 'SoftPhoneUpdate' TelephonySessions = 'TelephonySessions' UserManagement = 'UserManagement' VideoConferencing = 'VideoConferencing' VoipCalling = 'VoipCalling' VoipCallingOnMobile = 'VoipCallingOnMobile' Voicemail = 'Voicemail' VoicemailToText = 'VoicemailToText' WebPhone = 'WebPhone' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadExtensionResponseServiceFeaturesItem(DataClassJsonMixin): enabled: Optional[bool] = None """ Feature status; shows feature availability for an extension """ feature_name: Optional[ReadExtensionResponseServiceFeaturesItemFeatureName] = None """ Feature name """ reason: Optional[str] = None """ Reason for limitation of a particular service feature. Returned only if the enabled parameter value is 'False', see Service Feature Limitations and Reasons. When retrieving service features for an extension, the reasons for the limitations, if any, are returned in response """ class ReadExtensionResponseSetupWizardState(Enum): """ Specifies extension configuration wizard state (web service setup). """ NotStarted = 'NotStarted' Incomplete = 'Incomplete' Completed = 'Completed' class ReadExtensionResponseStatus(Enum): """ Extension current state. If 'Unassigned' is specified, then extensions without ‘extensionNumber’ are returned. If not specified, then all extensions are returned Generated by Python OpenAPI Parser """ Enabled = 'Enabled' Disabled = 'Disabled' Frozen = 'Frozen' NotActivated = 'NotActivated' Unassigned = 'Unassigned' class ReadExtensionResponseStatusInfoReason(Enum): """ Type of suspension """ Voluntarily = 'Voluntarily' Involuntarily = 'Involuntarily' SuspendedVoluntarily = 'SuspendedVoluntarily' SuspendedVoluntarily2 = 'SuspendedVoluntarily2' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadExtensionResponseStatusInfo(DataClassJsonMixin): """ Status information (reason, comment). Returned for 'Disabled' status only """ comment: Optional[str] = None """ A free-form user comment, describing the status change reason """ reason: Optional[ReadExtensionResponseStatusInfoReason] = None """ Type of suspension """ class ReadExtensionResponseType(Enum): """ Extension type """ User = 'User' FaxUser = 'FaxUser' VirtualUser = 'VirtualUser' DigitalUser = 'DigitalUser' Department = 'Department' Announcement = 'Announcement' Voicemail = 'Voicemail' SharedLinesGroup = 'SharedLinesGroup' PagingOnly = 'PagingOnly' IvrMenu = 'IvrMenu' ApplicationExtension = 'ApplicationExtension' ParkLocation = 'ParkLocation' Bot = 'Bot' Room = 'Room' Limited = 'Limited' Site = 'Site' ProxyAdmin = 'ProxyAdmin' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadExtensionResponseCallQueueInfo(DataClassJsonMixin): """ For Department extension type only. Call queue settings """ sla_goal: Optional[int] = None """ Target percentage of calls that must be answered by agents within the service level time threshold """ sla_threshold_seconds: Optional[int] = None """ Period of time in seconds that is considered to be an acceptable service level """ include_abandoned_calls: Optional[bool] = None """ If 'True' abandoned calls (hanged up prior to being served) are included into service level calculation """ abandoned_threshold_seconds: Optional[int] = None """ Period of time in seconds specifying abandoned calls duration - calls that are shorter will not be included into the calculation of service level.; zero value means that abandoned calls of any duration will be included into calculation """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadExtensionResponseSite(DataClassJsonMixin): """ Site data. If multi-site feature is turned on for the account, then internal identifier of a site must be specified. To assign the wireless point to the main site (company) set site ID to `main-site` Generated by Python OpenAPI Parser """ id: Optional[str] = None """ Internal identifier of a site """ uri: Optional[str] = None """ Link to a site resource """ name: Optional[str] = None """ Name of a site """ code: Optional[str] = None """ Site code value. Returned only if specified """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadExtensionResponse(DataClassJsonMixin): id: Optional[int] = None """ Internal identifier of an extension """ uri: Optional[str] = None """ Canonical URI of an extension """ account: Optional[ReadExtensionResponseAccount] = None """ Account information """ contact: Optional[ReadExtensionResponseContact] = None """ Contact detailed information """ custom_fields: Optional[List[ReadExtensionResponseCustomFieldsItem]] = None departments: Optional[List[ReadExtensionResponseDepartmentsItem]] = None """ Information on department extension(s), to which the requested extension belongs. Returned only for user extensions, members of department, requested by single extensionId """ extension_number: Optional[str] = None """ Number of department extension """ extension_numbers: Optional[List[str]] = None name: Optional[str] = None """ Extension name. For user extension types the value is a combination of the specified first name and last name """ partner_id: Optional[str] = None """ For Partner Applications Internal identifier of an extension created by partner. The RingCentral supports the mapping of accounts and stores the corresponding account ID/extension ID for each partner ID of a client application. In request URIs partner IDs are accepted instead of regular RingCentral native IDs as path parameters using pid = XXX clause. Though in response URIs contain the corresponding account IDs and extension IDs. In all request and response bodies these values are reflected via partnerId attributes of account and extension """ permissions: Optional[ReadExtensionResponsePermissions] = None """ Extension permissions, corresponding to the Service Web permissions 'Admin' and 'InternationalCalling' """ profile_image: Optional[ReadExtensionResponseProfileImage] = None """ Information on profile image """ references: Optional[List[ReadExtensionResponseReferencesItem]] = None """ List of non-RC internal identifiers assigned to an extension """ roles: Optional[List[ReadExtensionResponseRolesItem]] = None regional_settings: Optional[ReadExtensionResponseRegionalSettings] = None """ Extension region data (timezone, home country, language) """ service_features: Optional[List[ReadExtensionResponseServiceFeaturesItem]] = None """ Extension service features returned in response only when the logged-in user requests his/her own extension info, see also Extension Service Features """ setup_wizard_state: Optional[ReadExtensionResponseSetupWizardState] = 'NotStarted' """ Specifies extension configuration wizard state (web service setup). """ status: Optional[ReadExtensionResponseStatus] = None """ Extension current state. If 'Unassigned' is specified, then extensions without ‘extensionNumber’ are returned. If not specified, then all extensions are returned """ status_info: Optional[ReadExtensionResponseStatusInfo] = None """ Status information (reason, comment). Returned for 'Disabled' status only """ type: Optional[ReadExtensionResponseType] = None """ Extension type """ call_queue_info: Optional[ReadExtensionResponseCallQueueInfo] = None """ For Department extension type only. Call queue settings """ hidden: Optional[bool] = None """ Hides extension from showing in company directory. Supported for extensions of User type only """ site: Optional[ReadExtensionResponseSite] = None """ Site data. If multi-site feature is turned on for the account, then internal identifier of a site must be specified. To assign the wireless point to the main site (company) set site ID to `main-site` """ class UpdateExtensionRequestStatus(Enum): Disabled = 'Disabled' Enabled = 'Enabled' NotActivated = 'NotActivated' Frozen = 'Frozen' class UpdateExtensionRequestStatusInfoReason(Enum): """ Type of suspension """ Voluntarily = 'Voluntarily' Involuntarily = 'Involuntarily' SuspendedVoluntarily = 'SuspendedVoluntarily' SuspendedVoluntarily2 = 'SuspendedVoluntarily2' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionRequestStatusInfo(DataClassJsonMixin): comment: Optional[str] = None """ A free-form user comment, describing the status change reason """ reason: Optional[UpdateExtensionRequestStatusInfoReason] = None """ Type of suspension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionRequestContactBusinessAddress(DataClassJsonMixin): country: Optional[str] = None """ Country name of an extension user company """ state: Optional[str] = None """ State/province name of an extension user company. Mandatory for the USA, UK and Canada """ city: Optional[str] = None """ City name of an extension user company """ street: Optional[str] = None """ Street address of an extension user company """ zip: Optional[str] = None """ Zip code of an extension user company """ class UpdateExtensionRequestContactPronouncedNameType(Enum): """ Voice name type. 'Default' - default extension name; first name and last name specified in user profile; 'TextToSpeech' - custom text; user name spelled the way it sounds and specified by user; 'Recorded' - custom audio, user name recorded in user's own voice (supported only for extension retrieval) Generated by Python OpenAPI Parser """ Default = 'Default' TextToSpeech = 'TextToSpeech' Recorded = 'Recorded' class UpdateExtensionRequestContactPronouncedNamePromptContentType(Enum): """ Content media type """ AudioMpeg = 'audio/mpeg' AudioWav = 'audio/wav' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionRequestContactPronouncedNamePrompt(DataClassJsonMixin): id: Optional[str] = None content_uri: Optional[str] = None """ Link to a prompt resource """ content_type: Optional[UpdateExtensionRequestContactPronouncedNamePromptContentType] = None """ Content media type """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionRequestContactPronouncedName(DataClassJsonMixin): type: Optional[UpdateExtensionRequestContactPronouncedNameType] = None """ Voice name type. 'Default' - default extension name; first name and last name specified in user profile; 'TextToSpeech' - custom text; user name spelled the way it sounds and specified by user; 'Recorded' - custom audio, user name recorded in user's own voice (supported only for extension retrieval) """ text: Optional[str] = None """ Custom text """ prompt: Optional[UpdateExtensionRequestContactPronouncedNamePrompt] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionRequestContact(DataClassJsonMixin): first_name: Optional[str] = None """ For User extension type only. Extension user first name """ last_name: Optional[str] = None """ For User extension type only. Extension user last name """ company: Optional[str] = None """ Extension user company name """ job_title: Optional[str] = None email: Optional[str] = None """ Email of extension user """ business_phone: Optional[str] = None """ Extension user contact phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) format """ mobile_phone: Optional[str] = None """ Extension user mobile (**non** Toll Free) phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) (with '+' sign) format """ business_address: Optional[UpdateExtensionRequestContactBusinessAddress] = None email_as_login_name: Optional[bool] = None """ If 'True' then contact email is enabled as login name for this user. Please note that email should be unique in this case. The default value is 'False' """ pronounced_name: Optional[UpdateExtensionRequestContactPronouncedName] = None department: Optional[str] = None """ Extension user department, if any """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionRequestRegionalSettingsHomeCountry(DataClassJsonMixin): id: Optional[str] = None """ internal Identifier of a country """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionRequestRegionalSettingsTimezone(DataClassJsonMixin): id: Optional[str] = None """ internal Identifier of a timezone """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionRequestRegionalSettingsLanguage(DataClassJsonMixin): id: Optional[str] = None """ internal Identifier of a language """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionRequestRegionalSettingsGreetingLanguage(DataClassJsonMixin): id: Optional[str] = None """ internal Identifier of a greeting language """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionRequestRegionalSettingsFormattingLocale(DataClassJsonMixin): id: Optional[str] = None """ Internal Identifier of a formatting language """ class UpdateExtensionRequestRegionalSettingsTimeFormat(Enum): """ Time format setting """ OBJECT_12h = '12h' OBJECT_24h = '24h' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionRequestRegionalSettings(DataClassJsonMixin): home_country: Optional[UpdateExtensionRequestRegionalSettingsHomeCountry] = None timezone: Optional[UpdateExtensionRequestRegionalSettingsTimezone] = None language: Optional[UpdateExtensionRequestRegionalSettingsLanguage] = None greeting_language: Optional[UpdateExtensionRequestRegionalSettingsGreetingLanguage] = None formatting_locale: Optional[UpdateExtensionRequestRegionalSettingsFormattingLocale] = None time_format: Optional[UpdateExtensionRequestRegionalSettingsTimeFormat] = '12h' """ Time format setting """ class UpdateExtensionRequestSetupWizardState(Enum): NotStarted = 'NotStarted' Incomplete = 'Incomplete' Completed = 'Completed' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionRequestCallQueueInfo(DataClassJsonMixin): """ For Department extension type only. Call queue settings """ sla_goal: Optional[int] = None """ Target percentage of calls that must be answered by agents within the service level time threshold """ sla_threshold_seconds: Optional[int] = None include_abandoned_calls: Optional[bool] = None abandoned_threshold_seconds: Optional[int] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionRequestTransitionItem(DataClassJsonMixin): """ For NotActivated extensions only. Welcome email settings """ send_welcome_emails_to_users: Optional[bool] = None """ Specifies if an activation email is automatically sent to new users (Not Activated extensions) or not """ send_welcome_email: Optional[bool] = None """ Supported for account confirmation. Specifies whether welcome email is sent """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionRequestCustomFieldsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a custom field """ value: Optional[str] = None """ Custom field value """ display_name: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionRequestSite(DataClassJsonMixin): """ Site data. If multi-site feature is turned on for the account, then internal identifier of a site must be specified. To assign the wireless point to the main site (company) set site ID to `main-site` Generated by Python OpenAPI Parser """ id: Optional[str] = None """ Internal identifier of a site """ uri: Optional[str] = None """ Link to a site resource """ name: Optional[str] = None """ Name of a site """ code: Optional[str] = None """ Site code value. Returned only if specified """ class UpdateExtensionRequestType(Enum): """ Extension type """ User = 'User' Fax_User = 'Fax User' VirtualUser = 'VirtualUser' DigitalUser = 'DigitalUser' Department = 'Department' Announcement = 'Announcement' Voicemail = 'Voicemail' SharedLinesGroup = 'SharedLinesGroup' PagingOnly = 'PagingOnly' IvrMenu = 'IvrMenu' ApplicationExtension = 'ApplicationExtension' ParkLocation = 'ParkLocation' class UpdateExtensionRequestReferencesItemType(Enum): """ Type of external identifier """ PartnerId = 'PartnerId' CustomerDirectoryId = 'CustomerDirectoryId' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionRequestReferencesItem(DataClassJsonMixin): ref: Optional[str] = None """ Non-RC identifier of an extension """ type: Optional[UpdateExtensionRequestReferencesItemType] = None """ Type of external identifier """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionRequest(DataClassJsonMixin): status: Optional[UpdateExtensionRequestStatus] = None status_info: Optional[UpdateExtensionRequestStatusInfo] = None reason: Optional[str] = None """ Type of suspension """ comment: Optional[str] = None """ Free Form user comment """ extension_number: Optional[str] = None """ Extension number available """ contact: Optional[UpdateExtensionRequestContact] = None regional_settings: Optional[UpdateExtensionRequestRegionalSettings] = None setup_wizard_state: Optional[UpdateExtensionRequestSetupWizardState] = None partner_id: Optional[str] = None """ Additional extension identifier, created by partner application and applied on client side """ ivr_pin: Optional[str] = None """ IVR PIN """ password: Optional[str] = None """ Password for extension """ call_queue_info: Optional[UpdateExtensionRequestCallQueueInfo] = None """ For Department extension type only. Call queue settings """ transition: Optional[List[UpdateExtensionRequestTransitionItem]] = None custom_fields: Optional[List[UpdateExtensionRequestCustomFieldsItem]] = None hidden: Optional[bool] = None """ Hides extension from showing in company directory. Supported for extensions of User type only """ site: Optional[UpdateExtensionRequestSite] = None """ Site data. If multi-site feature is turned on for the account, then internal identifier of a site must be specified. To assign the wireless point to the main site (company) set site ID to `main-site` """ type: Optional[UpdateExtensionRequestType] = None """ Extension type """ references: Optional[List[UpdateExtensionRequestReferencesItem]] = None """ List of non-RC internal identifiers assigned to an extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionResponseAccount(DataClassJsonMixin): """ Account information """ id: Optional[str] = None """ Internal identifier of an account """ uri: Optional[str] = None """ Canonical URI of an account """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionResponseContactBusinessAddress(DataClassJsonMixin): """ Business address of extension user company """ country: Optional[str] = None """ Country name of an extension user company """ state: Optional[str] = None """ State/province name of an extension user company. Mandatory for the USA, UK and Canada """ city: Optional[str] = None """ City name of an extension user company """ street: Optional[str] = None """ Street address of an extension user company """ zip: Optional[str] = None """ Zip code of an extension user company """ class UpdateExtensionResponseContactPronouncedNameType(Enum): """ Voice name type. 'Default' - default extension name; first name and last name specified in user profile; 'TextToSpeech' - custom text; user name spelled the way it sounds and specified by user; 'Recorded' - custom audio, user name recorded in user's own voice (supported only for extension retrieval) Generated by Python OpenAPI Parser """ Default = 'Default' TextToSpeech = 'TextToSpeech' Recorded = 'Recorded' class UpdateExtensionResponseContactPronouncedNamePromptContentType(Enum): """ Content media type """ AudioMpeg = 'audio/mpeg' AudioWav = 'audio/wav' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionResponseContactPronouncedNamePrompt(DataClassJsonMixin): id: Optional[str] = None content_uri: Optional[str] = None """ Link to a prompt resource """ content_type: Optional[UpdateExtensionResponseContactPronouncedNamePromptContentType] = None """ Content media type """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionResponseContactPronouncedName(DataClassJsonMixin): type: Optional[UpdateExtensionResponseContactPronouncedNameType] = None """ Voice name type. 'Default' - default extension name; first name and last name specified in user profile; 'TextToSpeech' - custom text; user name spelled the way it sounds and specified by user; 'Recorded' - custom audio, user name recorded in user's own voice (supported only for extension retrieval) """ text: Optional[str] = None """ Custom text """ prompt: Optional[UpdateExtensionResponseContactPronouncedNamePrompt] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionResponseContact(DataClassJsonMixin): """ Contact detailed information """ first_name: Optional[str] = None """ For User extension type only. Extension user first name """ last_name: Optional[str] = None """ For User extension type only. Extension user last name """ company: Optional[str] = None """ Extension user company name """ job_title: Optional[str] = None email: Optional[str] = None """ Email of extension user """ business_phone: Optional[str] = None """ Extension user contact phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) (with '+' sign) format """ mobile_phone: Optional[str] = None """ Extension user mobile (**non** Toll Free) phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) (with '+' sign) format """ business_address: Optional[UpdateExtensionResponseContactBusinessAddress] = None """ Business address of extension user company """ email_as_login_name: Optional[bool] = 'False' """ If 'True' then contact email is enabled as login name for this user. Please note that email should be unique in this case. """ pronounced_name: Optional[UpdateExtensionResponseContactPronouncedName] = None department: Optional[str] = None """ Extension user department, if any """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionResponseCustomFieldsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a custom field """ value: Optional[str] = None """ Custom field value """ display_name: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionResponseDepartmentsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a department extension """ uri: Optional[str] = None """ Canonical URI of a department extension """ extension_number: Optional[str] = None """ Number of a department extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionResponsePermissionsAdmin(DataClassJsonMixin): """ Admin permission """ enabled: Optional[bool] = None """ Specifies if a permission is enabled or not """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionResponsePermissionsInternationalCalling(DataClassJsonMixin): """ International Calling permission """ enabled: Optional[bool] = None """ Specifies if a permission is enabled or not """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionResponsePermissions(DataClassJsonMixin): """ Extension permissions, corresponding to the Service Web permissions 'Admin' and 'InternationalCalling' Generated by Python OpenAPI Parser """ admin: Optional[UpdateExtensionResponsePermissionsAdmin] = None """ Admin permission """ international_calling: Optional[UpdateExtensionResponsePermissionsInternationalCalling] = None """ International Calling permission """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionResponseProfileImageScalesItem(DataClassJsonMixin): uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionResponseProfileImage(DataClassJsonMixin): """ Information on profile image Required Properties: - uri Generated by Python OpenAPI Parser """ uri: str """ Link to a profile image. If an image is not uploaded for an extension, only uri is returned """ etag: Optional[str] = None """ Identifier of an image """ last_modified: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ The datetime when an image was last updated in ISO 8601 format, for example 2016-03-10T18:07:52.534Z """ content_type: Optional[str] = None """ The type of an image """ scales: Optional[List[UpdateExtensionResponseProfileImageScalesItem]] = None """ List of URIs to profile images in different dimensions """ class UpdateExtensionResponseReferencesItemType(Enum): """ Type of external identifier """ PartnerId = 'PartnerId' CustomerDirectoryId = 'CustomerDirectoryId' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionResponseReferencesItem(DataClassJsonMixin): ref: Optional[str] = None """ Non-RC identifier of an extension """ type: Optional[UpdateExtensionResponseReferencesItemType] = None """ Type of external identifier """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionResponseRolesItem(DataClassJsonMixin): uri: Optional[str] = None id: Optional[str] = None """ Internal identifier of a role """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionResponseRegionalSettingsHomeCountry(DataClassJsonMixin): """ Extension country information """ id: Optional[str] = None """ Internal identifier of a home country """ uri: Optional[str] = None """ Canonical URI of a home country """ name: Optional[str] = None """ Official name of a home country """ iso_code: Optional[str] = None """ ISO code of a country """ calling_code: Optional[str] = None """ Calling code of a country """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionResponseRegionalSettingsTimezone(DataClassJsonMixin): """ Extension timezone information """ id: Optional[str] = None """ Internal identifier of a timezone """ uri: Optional[str] = None """ Canonical URI of a timezone """ name: Optional[str] = None """ Short name of a timezone """ description: Optional[str] = None """ Meaningful description of the timezone """ bias: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionResponseRegionalSettingsLanguage(DataClassJsonMixin): """ User interface language data """ id: Optional[str] = None """ Internal identifier of a language """ uri: Optional[str] = None """ Canonical URI of a language """ greeting: Optional[bool] = None """ Indicates whether a language is available as greeting language """ formatting_locale: Optional[bool] = None """ Indicates whether a language is available as formatting locale """ locale_code: Optional[str] = None """ Localization code of a language """ iso_code: Optional[str] = None """ Country code according to the ISO standard, see [ISO 3166](https://www.iso.org/iso-3166-country-codes.html) """ name: Optional[str] = None """ Official name of a language """ ui: Optional[bool] = None """ Indicates whether a language is available as UI language """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionResponseRegionalSettingsGreetingLanguage(DataClassJsonMixin): """ Information on language used for telephony greetings """ id: Optional[str] = None """ Internal identifier of a greeting language """ locale_code: Optional[str] = None """ Localization code of a greeting language """ name: Optional[str] = None """ Official name of a greeting language """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionResponseRegionalSettingsFormattingLocale(DataClassJsonMixin): """ Formatting language preferences for numbers, dates and currencies """ id: Optional[str] = None """ Internal identifier of a formatting language """ locale_code: Optional[str] = None """ Localization code of a formatting language """ name: Optional[str] = None class UpdateExtensionResponseRegionalSettingsTimeFormat(Enum): """ Time format setting. The default value is '12h' = ['12h', '24h'] """ OBJECT_12h = '12h' OBJECT_24h = '24h' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionResponseRegionalSettings(DataClassJsonMixin): """ Extension region data (timezone, home country, language) """ home_country: Optional[UpdateExtensionResponseRegionalSettingsHomeCountry] = None """ Extension country information """ timezone: Optional[UpdateExtensionResponseRegionalSettingsTimezone] = None """ Extension timezone information """ language: Optional[UpdateExtensionResponseRegionalSettingsLanguage] = None """ User interface language data """ greeting_language: Optional[UpdateExtensionResponseRegionalSettingsGreetingLanguage] = None """ Information on language used for telephony greetings """ formatting_locale: Optional[UpdateExtensionResponseRegionalSettingsFormattingLocale] = None """ Formatting language preferences for numbers, dates and currencies """ time_format: Optional[UpdateExtensionResponseRegionalSettingsTimeFormat] = None """ Time format setting. The default value is '12h' = ['12h', '24h'] """ class UpdateExtensionResponseServiceFeaturesItemFeatureName(Enum): """ Feature name """ AccountFederation = 'AccountFederation' Archiver = 'Archiver' AutomaticCallRecordingMute = 'AutomaticCallRecordingMute' AutomaticInboundCallRecording = 'AutomaticInboundCallRecording' AutomaticOutboundCallRecording = 'AutomaticOutboundCallRecording' BlockedMessageForwarding = 'BlockedMessageForwarding' Calendar = 'Calendar' CallerIdControl = 'CallerIdControl' CallForwarding = 'CallForwarding' CallPark = 'CallPark' CallParkLocations = 'CallParkLocations' CallSupervision = 'CallSupervision' CallSwitch = 'CallSwitch' CallQualitySurvey = 'CallQualitySurvey' Conferencing = 'Conferencing' ConferencingNumber = 'ConferencingNumber' ConfigureDelegates = 'ConfigureDelegates' DeveloperPortal = 'DeveloperPortal' DND = 'DND' DynamicConference = 'DynamicConference' EmergencyAddressAutoUpdate = 'EmergencyAddressAutoUpdate' EmergencyCalling = 'EmergencyCalling' EncryptionAtRest = 'EncryptionAtRest' ExternalDirectoryIntegration = 'ExternalDirectoryIntegration' Fax = 'Fax' FaxReceiving = 'FaxReceiving' FreeSoftPhoneLines = 'FreeSoftPhoneLines' HDVoice = 'HDVoice' HipaaCompliance = 'HipaaCompliance' Intercom = 'Intercom' InternationalCalling = 'InternationalCalling' InternationalSMS = 'InternationalSMS' LinkedSoftphoneLines = 'LinkedSoftphoneLines' MMS = 'MMS' MobileVoipEmergencyCalling = 'MobileVoipEmergencyCalling' OnDemandCallRecording = 'OnDemandCallRecording' Pager = 'Pager' PagerReceiving = 'PagerReceiving' Paging = 'Paging' PasswordAuth = 'PasswordAuth' PromoMessage = 'PromoMessage' Reports = 'Reports' Presence = 'Presence' RCTeams = 'RCTeams' RingOut = 'RingOut' SalesForce = 'SalesForce' SharedLines = 'SharedLines' SingleExtensionUI = 'SingleExtensionUI' SiteCodes = 'SiteCodes' SMS = 'SMS' SMSReceiving = 'SMSReceiving' SoftPhoneUpdate = 'SoftPhoneUpdate' TelephonySessions = 'TelephonySessions' UserManagement = 'UserManagement' VideoConferencing = 'VideoConferencing' VoipCalling = 'VoipCalling' VoipCallingOnMobile = 'VoipCallingOnMobile' Voicemail = 'Voicemail' VoicemailToText = 'VoicemailToText' WebPhone = 'WebPhone' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionResponseServiceFeaturesItem(DataClassJsonMixin): enabled: Optional[bool] = None """ Feature status; shows feature availability for an extension """ feature_name: Optional[UpdateExtensionResponseServiceFeaturesItemFeatureName] = None """ Feature name """ reason: Optional[str] = None """ Reason for limitation of a particular service feature. Returned only if the enabled parameter value is 'False', see Service Feature Limitations and Reasons. When retrieving service features for an extension, the reasons for the limitations, if any, are returned in response """ class UpdateExtensionResponseSetupWizardState(Enum): """ Specifies extension configuration wizard state (web service setup). """ NotStarted = 'NotStarted' Incomplete = 'Incomplete' Completed = 'Completed' class UpdateExtensionResponseStatus(Enum): """ Extension current state. If 'Unassigned' is specified, then extensions without ‘extensionNumber’ are returned. If not specified, then all extensions are returned Generated by Python OpenAPI Parser """ Enabled = 'Enabled' Disabled = 'Disabled' Frozen = 'Frozen' NotActivated = 'NotActivated' Unassigned = 'Unassigned' class UpdateExtensionResponseStatusInfoReason(Enum): """ Type of suspension """ Voluntarily = 'Voluntarily' Involuntarily = 'Involuntarily' SuspendedVoluntarily = 'SuspendedVoluntarily' SuspendedVoluntarily2 = 'SuspendedVoluntarily2' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionResponseStatusInfo(DataClassJsonMixin): """ Status information (reason, comment). Returned for 'Disabled' status only """ comment: Optional[str] = None """ A free-form user comment, describing the status change reason """ reason: Optional[UpdateExtensionResponseStatusInfoReason] = None """ Type of suspension """ class UpdateExtensionResponseType(Enum): """ Extension type """ User = 'User' FaxUser = 'FaxUser' VirtualUser = 'VirtualUser' DigitalUser = 'DigitalUser' Department = 'Department' Announcement = 'Announcement' Voicemail = 'Voicemail' SharedLinesGroup = 'SharedLinesGroup' PagingOnly = 'PagingOnly' IvrMenu = 'IvrMenu' ApplicationExtension = 'ApplicationExtension' ParkLocation = 'ParkLocation' Bot = 'Bot' Room = 'Room' Limited = 'Limited' Site = 'Site' ProxyAdmin = 'ProxyAdmin' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionResponseCallQueueInfo(DataClassJsonMixin): """ For Department extension type only. Call queue settings """ sla_goal: Optional[int] = None """ Target percentage of calls that must be answered by agents within the service level time threshold """ sla_threshold_seconds: Optional[int] = None """ Period of time in seconds that is considered to be an acceptable service level """ include_abandoned_calls: Optional[bool] = None """ If 'True' abandoned calls (hanged up prior to being served) are included into service level calculation """ abandoned_threshold_seconds: Optional[int] = None """ Period of time in seconds specifying abandoned calls duration - calls that are shorter will not be included into the calculation of service level.; zero value means that abandoned calls of any duration will be included into calculation """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionResponseSite(DataClassJsonMixin): """ Site data. If multi-site feature is turned on for the account, then internal identifier of a site must be specified. To assign the wireless point to the main site (company) set site ID to `main-site` Generated by Python OpenAPI Parser """ id: Optional[str] = None """ Internal identifier of a site """ uri: Optional[str] = None """ Link to a site resource """ name: Optional[str] = None """ Name of a site """ code: Optional[str] = None """ Site code value. Returned only if specified """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionResponse(DataClassJsonMixin): id: Optional[int] = None """ Internal identifier of an extension """ uri: Optional[str] = None """ Canonical URI of an extension """ account: Optional[UpdateExtensionResponseAccount] = None """ Account information """ contact: Optional[UpdateExtensionResponseContact] = None """ Contact detailed information """ custom_fields: Optional[List[UpdateExtensionResponseCustomFieldsItem]] = None departments: Optional[List[UpdateExtensionResponseDepartmentsItem]] = None """ Information on department extension(s), to which the requested extension belongs. Returned only for user extensions, members of department, requested by single extensionId """ extension_number: Optional[str] = None """ Number of department extension """ extension_numbers: Optional[List[str]] = None name: Optional[str] = None """ Extension name. For user extension types the value is a combination of the specified first name and last name """ partner_id: Optional[str] = None """ For Partner Applications Internal identifier of an extension created by partner. The RingCentral supports the mapping of accounts and stores the corresponding account ID/extension ID for each partner ID of a client application. In request URIs partner IDs are accepted instead of regular RingCentral native IDs as path parameters using pid = XXX clause. Though in response URIs contain the corresponding account IDs and extension IDs. In all request and response bodies these values are reflected via partnerId attributes of account and extension """ permissions: Optional[UpdateExtensionResponsePermissions] = None """ Extension permissions, corresponding to the Service Web permissions 'Admin' and 'InternationalCalling' """ profile_image: Optional[UpdateExtensionResponseProfileImage] = None """ Information on profile image """ references: Optional[List[UpdateExtensionResponseReferencesItem]] = None """ List of non-RC internal identifiers assigned to an extension """ roles: Optional[List[UpdateExtensionResponseRolesItem]] = None regional_settings: Optional[UpdateExtensionResponseRegionalSettings] = None """ Extension region data (timezone, home country, language) """ service_features: Optional[List[UpdateExtensionResponseServiceFeaturesItem]] = None """ Extension service features returned in response only when the logged-in user requests his/her own extension info, see also Extension Service Features """ setup_wizard_state: Optional[UpdateExtensionResponseSetupWizardState] = 'NotStarted' """ Specifies extension configuration wizard state (web service setup). """ status: Optional[UpdateExtensionResponseStatus] = None """ Extension current state. If 'Unassigned' is specified, then extensions without ‘extensionNumber’ are returned. If not specified, then all extensions are returned """ status_info: Optional[UpdateExtensionResponseStatusInfo] = None """ Status information (reason, comment). Returned for 'Disabled' status only """ type: Optional[UpdateExtensionResponseType] = None """ Extension type """ call_queue_info: Optional[UpdateExtensionResponseCallQueueInfo] = None """ For Department extension type only. Call queue settings """ hidden: Optional[bool] = None """ Hides extension from showing in company directory. Supported for extensions of User type only """ site: Optional[UpdateExtensionResponseSite] = None """ Site data. If multi-site feature is turned on for the account, then internal identifier of a site must be specified. To assign the wireless point to the main site (company) set site ID to `main-site` """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadExtensionCallerIdResponseByDeviceItemDevice(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a device """ uri: Optional[str] = None """ Link to a device resource """ name: Optional[str] = None """ Name of a device """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadExtensionCallerIdResponseByDeviceItemCallerIdPhoneInfo(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a phone number """ uri: Optional[str] = None """ Link to a phone number resource """ phone_number: Optional[str] = None """ Phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) (with '+' sign) format """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadExtensionCallerIdResponseByDeviceItemCallerId(DataClassJsonMixin): type: Optional[str] = None """ If 'PhoneNumber' value is specified, then a certain phone number is shown as a caller ID when using this telephony feature. If 'Blocked' value is specified, then a caller ID is hidden. The value 'CurrentLocation' can be specified for 'RingOut' feature only. The default is 'PhoneNumber' = ['PhoneNumber', 'Blocked', 'CurrentLocation'] """ phone_info: Optional[ReadExtensionCallerIdResponseByDeviceItemCallerIdPhoneInfo] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadExtensionCallerIdResponseByDeviceItem(DataClassJsonMixin): """ Caller ID settings by device """ device: Optional[ReadExtensionCallerIdResponseByDeviceItemDevice] = None caller_id: Optional[ReadExtensionCallerIdResponseByDeviceItemCallerId] = None class ReadExtensionCallerIdResponseByFeatureItemFeature(Enum): RingOut = 'RingOut' RingMe = 'RingMe' CallFlip = 'CallFlip' FaxNumber = 'FaxNumber' AdditionalSoftphone = 'AdditionalSoftphone' Alternate = 'Alternate' CommonPhone = 'CommonPhone' MobileApp = 'MobileApp' Delegated = 'Delegated' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadExtensionCallerIdResponseByFeatureItemCallerIdPhoneInfo(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a phone number """ uri: Optional[str] = None """ Link to a phone number resource """ phone_number: Optional[str] = None """ Phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) (with '+' sign) format """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadExtensionCallerIdResponseByFeatureItemCallerId(DataClassJsonMixin): type: Optional[str] = None """ If 'PhoneNumber' value is specified, then a certain phone number is shown as a caller ID when using this telephony feature. If 'Blocked' value is specified, then a caller ID is hidden. The value 'CurrentLocation' can be specified for 'RingOut' feature only. The default is 'PhoneNumber' = ['PhoneNumber', 'Blocked', 'CurrentLocation'] """ phone_info: Optional[ReadExtensionCallerIdResponseByFeatureItemCallerIdPhoneInfo] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadExtensionCallerIdResponseByFeatureItem(DataClassJsonMixin): """ Caller ID settings by feature """ feature: Optional[ReadExtensionCallerIdResponseByFeatureItemFeature] = None caller_id: Optional[ReadExtensionCallerIdResponseByFeatureItemCallerId] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadExtensionCallerIdResponse(DataClassJsonMixin): uri: Optional[str] = None """ Canonical URL of a caller ID resource """ by_device: Optional[List[ReadExtensionCallerIdResponseByDeviceItem]] = None by_feature: Optional[List[ReadExtensionCallerIdResponseByFeatureItem]] = None extension_name_for_outbound_calls: Optional[bool] = None """ If 'True', then user first name and last name will be used as caller ID when making outbound calls from extension """ extension_number_for_internal_calls: Optional[bool] = None """ If 'True', then extension number will be used as caller ID when making internal calls """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionCallerIdRequestByDeviceItemDevice(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a device """ uri: Optional[str] = None """ Link to a device resource """ name: Optional[str] = None """ Name of a device """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionCallerIdRequestByDeviceItemCallerIdPhoneInfo(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a phone number """ uri: Optional[str] = None """ Link to a phone number resource """ phone_number: Optional[str] = None """ Phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) (with '+' sign) format """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionCallerIdRequestByDeviceItemCallerId(DataClassJsonMixin): type: Optional[str] = None """ If 'PhoneNumber' value is specified, then a certain phone number is shown as a caller ID when using this telephony feature. If 'Blocked' value is specified, then a caller ID is hidden. The value 'CurrentLocation' can be specified for 'RingOut' feature only. The default is 'PhoneNumber' = ['PhoneNumber', 'Blocked', 'CurrentLocation'] """ phone_info: Optional[UpdateExtensionCallerIdRequestByDeviceItemCallerIdPhoneInfo] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionCallerIdRequestByDeviceItem(DataClassJsonMixin): """ Caller ID settings by device """ device: Optional[UpdateExtensionCallerIdRequestByDeviceItemDevice] = None caller_id: Optional[UpdateExtensionCallerIdRequestByDeviceItemCallerId] = None class UpdateExtensionCallerIdRequestByFeatureItemFeature(Enum): RingOut = 'RingOut' RingMe = 'RingMe' CallFlip = 'CallFlip' FaxNumber = 'FaxNumber' AdditionalSoftphone = 'AdditionalSoftphone' Alternate = 'Alternate' CommonPhone = 'CommonPhone' MobileApp = 'MobileApp' Delegated = 'Delegated' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionCallerIdRequestByFeatureItemCallerIdPhoneInfo(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a phone number """ uri: Optional[str] = None """ Link to a phone number resource """ phone_number: Optional[str] = None """ Phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) (with '+' sign) format """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionCallerIdRequestByFeatureItemCallerId(DataClassJsonMixin): type: Optional[str] = None """ If 'PhoneNumber' value is specified, then a certain phone number is shown as a caller ID when using this telephony feature. If 'Blocked' value is specified, then a caller ID is hidden. The value 'CurrentLocation' can be specified for 'RingOut' feature only. The default is 'PhoneNumber' = ['PhoneNumber', 'Blocked', 'CurrentLocation'] """ phone_info: Optional[UpdateExtensionCallerIdRequestByFeatureItemCallerIdPhoneInfo] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionCallerIdRequestByFeatureItem(DataClassJsonMixin): """ Caller ID settings by feature """ feature: Optional[UpdateExtensionCallerIdRequestByFeatureItemFeature] = None caller_id: Optional[UpdateExtensionCallerIdRequestByFeatureItemCallerId] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionCallerIdRequest(DataClassJsonMixin): uri: Optional[str] = None """ Canonical URL of a caller ID resource """ by_device: Optional[List[UpdateExtensionCallerIdRequestByDeviceItem]] = None by_feature: Optional[List[UpdateExtensionCallerIdRequestByFeatureItem]] = None extension_name_for_outbound_calls: Optional[bool] = None """ If 'True', then user first name and last name will be used as caller ID when making outbound calls from extension """ extension_number_for_internal_calls: Optional[bool] = None """ If 'True', then extension number will be used as caller ID when making internal calls """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionCallerIdResponseByDeviceItemDevice(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a device """ uri: Optional[str] = None """ Link to a device resource """ name: Optional[str] = None """ Name of a device """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionCallerIdResponseByDeviceItemCallerIdPhoneInfo(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a phone number """ uri: Optional[str] = None """ Link to a phone number resource """ phone_number: Optional[str] = None """ Phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) (with '+' sign) format """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionCallerIdResponseByDeviceItemCallerId(DataClassJsonMixin): type: Optional[str] = None """ If 'PhoneNumber' value is specified, then a certain phone number is shown as a caller ID when using this telephony feature. If 'Blocked' value is specified, then a caller ID is hidden. The value 'CurrentLocation' can be specified for 'RingOut' feature only. The default is 'PhoneNumber' = ['PhoneNumber', 'Blocked', 'CurrentLocation'] """ phone_info: Optional[UpdateExtensionCallerIdResponseByDeviceItemCallerIdPhoneInfo] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionCallerIdResponseByDeviceItem(DataClassJsonMixin): """ Caller ID settings by device """ device: Optional[UpdateExtensionCallerIdResponseByDeviceItemDevice] = None caller_id: Optional[UpdateExtensionCallerIdResponseByDeviceItemCallerId] = None class UpdateExtensionCallerIdResponseByFeatureItemFeature(Enum): RingOut = 'RingOut' RingMe = 'RingMe' CallFlip = 'CallFlip' FaxNumber = 'FaxNumber' AdditionalSoftphone = 'AdditionalSoftphone' Alternate = 'Alternate' CommonPhone = 'CommonPhone' MobileApp = 'MobileApp' Delegated = 'Delegated' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionCallerIdResponseByFeatureItemCallerIdPhoneInfo(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a phone number """ uri: Optional[str] = None """ Link to a phone number resource """ phone_number: Optional[str] = None """ Phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) (with '+' sign) format """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionCallerIdResponseByFeatureItemCallerId(DataClassJsonMixin): type: Optional[str] = None """ If 'PhoneNumber' value is specified, then a certain phone number is shown as a caller ID when using this telephony feature. If 'Blocked' value is specified, then a caller ID is hidden. The value 'CurrentLocation' can be specified for 'RingOut' feature only. The default is 'PhoneNumber' = ['PhoneNumber', 'Blocked', 'CurrentLocation'] """ phone_info: Optional[UpdateExtensionCallerIdResponseByFeatureItemCallerIdPhoneInfo] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionCallerIdResponseByFeatureItem(DataClassJsonMixin): """ Caller ID settings by feature """ feature: Optional[UpdateExtensionCallerIdResponseByFeatureItemFeature] = None caller_id: Optional[UpdateExtensionCallerIdResponseByFeatureItemCallerId] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateExtensionCallerIdResponse(DataClassJsonMixin): uri: Optional[str] = None """ Canonical URL of a caller ID resource """ by_device: Optional[List[UpdateExtensionCallerIdResponseByDeviceItem]] = None by_feature: Optional[List[UpdateExtensionCallerIdResponseByFeatureItem]] = None extension_name_for_outbound_calls: Optional[bool] = None """ If 'True', then user first name and last name will be used as caller ID when making outbound calls from extension """ extension_number_for_internal_calls: Optional[bool] = None """ If 'True', then extension number will be used as caller ID when making internal calls """ class ListExtensionGrantsExtensionType(Enum): User = 'User' FaxUser = 'FaxUser' VirtualUser = 'VirtualUser' DigitalUser = 'DigitalUser' Department = 'Department' Announcement = 'Announcement' Voicemail = 'Voicemail' SharedLinesGroup = 'SharedLinesGroup' PagingOnly = 'PagingOnly' IvrMenu = 'IvrMenu' ApplicationExtension = 'ApplicationExtension' ParkLocation = 'ParkLocation' Limited = 'Limited' Bot = 'Bot' class ListExtensionGrantsResponseRecordsItemExtensionType(Enum): """ Extension type """ User = 'User' Fax_User = 'Fax User' VirtualUser = 'VirtualUser' DigitalUser = 'DigitalUser' Department = 'Department' Announcement = 'Announcement' Voicemail = 'Voicemail' SharedLinesGroup = 'SharedLinesGroup' PagingOnly = 'PagingOnly' IvrMenu = 'IvrMenu' ApplicationExtension = 'ApplicationExtension' ParkLocation = 'ParkLocation' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionGrantsResponseRecordsItemExtension(DataClassJsonMixin): """ Extension information """ id: Optional[str] = None """ Internal identifier of an extension """ uri: Optional[str] = None """ Canonical URI of an extension """ extension_number: Optional[str] = None """ Extension short number (usually 3 or 4 digits) """ name: Optional[str] = None """ Name of extension """ type: Optional[ListExtensionGrantsResponseRecordsItemExtensionType] = None """ Extension type """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionGrantsResponseRecordsItem(DataClassJsonMixin): uri: Optional[str] = None """ Canonical URI of a grant """ extension: Optional[ListExtensionGrantsResponseRecordsItemExtension] = None """ Extension information """ call_pickup: Optional[bool] = None """ Specifies if picking up of other extensions' calls is allowed for the extension. If 'Presence' feature is disabled for the given extension, the flag is not returned """ call_monitoring: Optional[bool] = None """ Specifies if monitoring of other extensions' calls is allowed for the extension. If 'CallMonitoring' feature is disabled for the given extension, the flag is not returned """ call_on_behalf_of: Optional[bool] = None """ Specifies whether the current extension is able to make or receive calls on behalf of the user referenced in extension object """ call_delegation: Optional[bool] = None """ Specifies whether the current extension can delegate a call to the user referenced in extension object """ group_paging: Optional[bool] = None """ Specifies whether the current extension is allowed to call Paging Only group referenced to in extension object """ call_queue_setup: Optional[bool] = None """ Specifies whether the current extension is assigned as a Full-Access manager in the call queue referenced in extension object """ call_queue_members_setup: Optional[bool] = None """ Specifies whether the current extension is assigned as a Members-Only manager in the call queue referenced in extension object """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionGrantsResponseNavigationFirstPage(DataClassJsonMixin): """ Canonical URI for the first page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionGrantsResponseNavigationNextPage(DataClassJsonMixin): """ Canonical URI for the next page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionGrantsResponseNavigationPreviousPage(DataClassJsonMixin): """ Canonical URI for the previous page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionGrantsResponseNavigationLastPage(DataClassJsonMixin): """ Canonical URI for the last page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionGrantsResponseNavigation(DataClassJsonMixin): """ Information on navigation """ first_page: Optional[ListExtensionGrantsResponseNavigationFirstPage] = None """ Canonical URI for the first page of the list """ next_page: Optional[ListExtensionGrantsResponseNavigationNextPage] = None """ Canonical URI for the next page of the list """ previous_page: Optional[ListExtensionGrantsResponseNavigationPreviousPage] = None """ Canonical URI for the previous page of the list """ last_page: Optional[ListExtensionGrantsResponseNavigationLastPage] = None """ Canonical URI for the last page of the list """
/ringcentral_async_client-1.0.3-py3-none-any.whl/ringcentral_async_client/_code_gen/model/_11.py
0.829803
0.39905
_11.py
pypi
from ._13 import * @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserVideoConfigurationResponse(DataClassJsonMixin): provider: Optional[ReadUserVideoConfigurationResponseProvider] = None """ Video provider of the user """ class UpdateUserVideoConfigurationRequestProvider(Enum): """ Video provider of the user """ RCMeetings = 'RCMeetings' RCVideo = 'RCVideo' None_ = 'None' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateUserVideoConfigurationRequest(DataClassJsonMixin): provider: Optional[UpdateUserVideoConfigurationRequestProvider] = None """ Video provider of the user """ class UpdateUserVideoConfigurationResponseProvider(Enum): """ Video provider of the user """ RCMeetings = 'RCMeetings' RCVideo = 'RCVideo' None_ = 'None' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateUserVideoConfigurationResponse(DataClassJsonMixin): provider: Optional[UpdateUserVideoConfigurationResponseProvider] = None """ Video provider of the user """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCallQueuesResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a call queue """ name: Optional[str] = None """ Name of a call queue """ extension_number: Optional[str] = None """ Extension number of a call queue """ editable_member_status: Optional[bool] = None """ Flag allow members to change their queue status """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCallQueuesResponseNavigationFirstPage(DataClassJsonMixin): """ Canonical URI for the first page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCallQueuesResponseNavigationNextPage(DataClassJsonMixin): """ Canonical URI for the next page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCallQueuesResponseNavigationPreviousPage(DataClassJsonMixin): """ Canonical URI for the previous page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCallQueuesResponseNavigationLastPage(DataClassJsonMixin): """ Canonical URI for the last page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCallQueuesResponseNavigation(DataClassJsonMixin): """ Information on navigation """ first_page: Optional[ListCallQueuesResponseNavigationFirstPage] = None """ Canonical URI for the first page of the list """ next_page: Optional[ListCallQueuesResponseNavigationNextPage] = None """ Canonical URI for the next page of the list """ previous_page: Optional[ListCallQueuesResponseNavigationPreviousPage] = None """ Canonical URI for the previous page of the list """ last_page: Optional[ListCallQueuesResponseNavigationLastPage] = None """ Canonical URI for the last page of the list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCallQueuesResponsePaging(DataClassJsonMixin): """ Information on paging """ page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) """ per_page: Optional[int] = None """ Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty """ total_pages: Optional[int] = None """ The total number of pages in a dataset. May be omitted for some resources due to performance reasons """ total_elements: Optional[int] = None """ The total number of elements in a dataset. May be omitted for some resource due to performance reasons """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCallQueuesResponse(DataClassJsonMixin): """ Required Properties: - navigation - paging - records - uri Generated by Python OpenAPI Parser """ uri: str """ Link to a call queues resource """ records: List[ListCallQueuesResponseRecordsItem] """ List of call queues """ navigation: ListCallQueuesResponseNavigation """ Information on navigation """ paging: ListCallQueuesResponsePaging """ Information on paging """ class ReadCallQueueInfoResponseStatus(Enum): """ Call queue status """ Enabled = 'Enabled' Disabled = 'Disabled' NotActivated = 'NotActivated' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadCallQueueInfoResponseServiceLevelSettings(DataClassJsonMixin): """ Call queue service level settings """ sla_goal: Optional[int] = None """ Target percentage of calls that must be answered by agents within the service level time threshold """ sla_threshold_seconds: Optional[int] = None """ The period of time in seconds that is considered to be an acceptable service level """ include_abandoned_calls: Optional[bool] = None """ Includes abandoned calls (when callers hang up prior to being served by an agent) into service-level calculation """ abandoned_threshold_seconds: Optional[int] = None """ Abandoned calls that are shorter than the defined period of time in seconds will not be included into the calculation of Service Level """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadCallQueueInfoResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a call queue """ name: Optional[str] = None """ Call queue name """ extension_number: Optional[str] = None """ Call queue extension number """ status: Optional[ReadCallQueueInfoResponseStatus] = None """ Call queue status """ service_level_settings: Optional[ReadCallQueueInfoResponseServiceLevelSettings] = None """ Call queue service level settings """ editable_member_status: Optional[bool] = None """ Allows members to change their queue status """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCallQueueInfoRequestServiceLevelSettings(DataClassJsonMixin): """ Call queue service level settings """ sla_goal: Optional[int] = None """ Target percentage of calls that must be answered by agents within the service level time threshold """ sla_threshold_seconds: Optional[int] = None """ The period of time in seconds that is considered to be an acceptable service level """ include_abandoned_calls: Optional[bool] = None """ Includes abandoned calls (when callers hang up prior to being served by an agent) into service-level calculation """ abandoned_threshold_seconds: Optional[int] = None """ Abandoned calls that are shorter than the defined period of time in seconds will not be included into the calculation of Service Level """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCallQueueInfoRequest(DataClassJsonMixin): service_level_settings: Optional[UpdateCallQueueInfoRequestServiceLevelSettings] = None """ Call queue service level settings """ editable_member_status: Optional[bool] = None """ Allows members to change their queue status """ class UpdateCallQueueInfoResponseStatus(Enum): """ Call queue status """ Enabled = 'Enabled' Disabled = 'Disabled' NotActivated = 'NotActivated' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCallQueueInfoResponseServiceLevelSettings(DataClassJsonMixin): """ Call queue service level settings """ sla_goal: Optional[int] = None """ Target percentage of calls that must be answered by agents within the service level time threshold """ sla_threshold_seconds: Optional[int] = None """ The period of time in seconds that is considered to be an acceptable service level """ include_abandoned_calls: Optional[bool] = None """ Includes abandoned calls (when callers hang up prior to being served by an agent) into service-level calculation """ abandoned_threshold_seconds: Optional[int] = None """ Abandoned calls that are shorter than the defined period of time in seconds will not be included into the calculation of Service Level """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCallQueueInfoResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a call queue """ name: Optional[str] = None """ Call queue name """ extension_number: Optional[str] = None """ Call queue extension number """ status: Optional[UpdateCallQueueInfoResponseStatus] = None """ Call queue status """ service_level_settings: Optional[UpdateCallQueueInfoResponseServiceLevelSettings] = None """ Call queue service level settings """ editable_member_status: Optional[bool] = None """ Allows members to change their queue status """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCallQueueMembersResponseRecordsItem(DataClassJsonMixin): uri: Optional[str] = None """ Link to a call queue member """ id: Optional[int] = None """ Internal identifier of a call queue member """ extension_number: Optional[str] = None """ Extension number of a call queue member """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCallQueueMembersResponseNavigationFirstPage(DataClassJsonMixin): """ Canonical URI for the first page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCallQueueMembersResponseNavigationNextPage(DataClassJsonMixin): """ Canonical URI for the next page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCallQueueMembersResponseNavigationPreviousPage(DataClassJsonMixin): """ Canonical URI for the previous page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCallQueueMembersResponseNavigationLastPage(DataClassJsonMixin): """ Canonical URI for the last page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCallQueueMembersResponseNavigation(DataClassJsonMixin): """ Information on navigation """ first_page: Optional[ListCallQueueMembersResponseNavigationFirstPage] = None """ Canonical URI for the first page of the list """ next_page: Optional[ListCallQueueMembersResponseNavigationNextPage] = None """ Canonical URI for the next page of the list """ previous_page: Optional[ListCallQueueMembersResponseNavigationPreviousPage] = None """ Canonical URI for the previous page of the list """ last_page: Optional[ListCallQueueMembersResponseNavigationLastPage] = None """ Canonical URI for the last page of the list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCallQueueMembersResponsePaging(DataClassJsonMixin): """ Information on paging """ page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) """ per_page: Optional[int] = None """ Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty """ total_pages: Optional[int] = None """ The total number of pages in a dataset. May be omitted for some resources due to performance reasons """ total_elements: Optional[int] = None """ The total number of elements in a dataset. May be omitted for some resource due to performance reasons """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCallQueueMembersResponse(DataClassJsonMixin): """ Required Properties: - navigation - paging - records - uri Generated by Python OpenAPI Parser """ uri: str """ Link to a call queue members resource """ records: List[ListCallQueueMembersResponseRecordsItem] """ List of call queue members """ navigation: ListCallQueueMembersResponseNavigation """ Information on navigation """ paging: ListCallQueueMembersResponsePaging """ Information on paging """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AssignMultipleCallQueueMembersRequest(DataClassJsonMixin): added_extension_ids: Optional[List[str]] = None removed_extension_ids: Optional[List[str]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateUserCallQueuesRequestRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Call queue extension identifier """ name: Optional[str] = None """ Call queue name (read-only) """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateUserCallQueuesRequest(DataClassJsonMixin): records: Optional[List[UpdateUserCallQueuesRequestRecordsItem]] = None """ List of the queues where the extension is an agent """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateUserCallQueuesResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Call queue extension identifier """ name: Optional[str] = None """ Call queue name (read-only) """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateUserCallQueuesResponse(DataClassJsonMixin): records: Optional[List[UpdateUserCallQueuesResponseRecordsItem]] = None """ List of the queues where the extension is an agent """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListDepartmentMembersResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an extension """ uri: Optional[str] = None """ Canonical URI of an extension """ extension_number: Optional[str] = None """ Number of department extension """ partner_id: Optional[str] = None """ For Partner Applications Internal identifier of an extension created by partner. The RingCentral supports the mapping of accounts and stores the corresponding account ID/extension ID for each partner ID of a client application. In request URIs partner IDs are accepted instead of regular RingCentral native IDs as path parameters using pid = XXX clause. Though in response URIs contain the corresponding account IDs and extension IDs. In all request and response bodies these values are reflected via partnerId attributes of account and extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListDepartmentMembersResponseNavigationFirstPage(DataClassJsonMixin): """ Canonical URI for the first page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListDepartmentMembersResponseNavigationNextPage(DataClassJsonMixin): """ Canonical URI for the next page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListDepartmentMembersResponseNavigationPreviousPage(DataClassJsonMixin): """ Canonical URI for the previous page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListDepartmentMembersResponseNavigationLastPage(DataClassJsonMixin): """ Canonical URI for the last page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListDepartmentMembersResponseNavigation(DataClassJsonMixin): """ Information on navigation """ first_page: Optional[ListDepartmentMembersResponseNavigationFirstPage] = None """ Canonical URI for the first page of the list """ next_page: Optional[ListDepartmentMembersResponseNavigationNextPage] = None """ Canonical URI for the next page of the list """ previous_page: Optional[ListDepartmentMembersResponseNavigationPreviousPage] = None """ Canonical URI for the previous page of the list """ last_page: Optional[ListDepartmentMembersResponseNavigationLastPage] = None """ Canonical URI for the last page of the list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListDepartmentMembersResponsePaging(DataClassJsonMixin): """ Information on paging """ page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) """ per_page: Optional[int] = None """ Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty """ total_pages: Optional[int] = None """ The total number of pages in a dataset. May be omitted for some resources due to performance reasons """ total_elements: Optional[int] = None """ The total number of elements in a dataset. May be omitted for some resource due to performance reasons """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListDepartmentMembersResponse(DataClassJsonMixin): uri: Optional[str] = None """ Link to the list of department members """ records: Optional[List[ListDepartmentMembersResponseRecordsItem]] = None """ List of department members extensions """ navigation: Optional[ListDepartmentMembersResponseNavigation] = None """ Information on navigation """ paging: Optional[ListDepartmentMembersResponsePaging] = None """ Information on paging """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AssignMultipleDepartmentMembersRequestItemsItem(DataClassJsonMixin): department_id: Optional[str] = None added_extension_ids: Optional[List[str]] = None removed_extension_ids: Optional[List[str]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AssignMultipleDepartmentMembersRequest(DataClassJsonMixin): items: Optional[List[AssignMultipleDepartmentMembersRequestItemsItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListPagingGroupUsersResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a paging group user extension """ uri: Optional[str] = None """ Link to a paging group user extension """ extension_number: Optional[str] = None """ Extension number of a paging group user """ name: Optional[str] = None """ Name of a paging group user """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListPagingGroupUsersResponseNavigationFirstPage(DataClassJsonMixin): """ Canonical URI for the first page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListPagingGroupUsersResponseNavigationNextPage(DataClassJsonMixin): """ Canonical URI for the next page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListPagingGroupUsersResponseNavigationPreviousPage(DataClassJsonMixin): """ Canonical URI for the previous page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListPagingGroupUsersResponseNavigationLastPage(DataClassJsonMixin): """ Canonical URI for the last page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListPagingGroupUsersResponseNavigation(DataClassJsonMixin): """ Information on navigation """ first_page: Optional[ListPagingGroupUsersResponseNavigationFirstPage] = None """ Canonical URI for the first page of the list """ next_page: Optional[ListPagingGroupUsersResponseNavigationNextPage] = None """ Canonical URI for the next page of the list """ previous_page: Optional[ListPagingGroupUsersResponseNavigationPreviousPage] = None """ Canonical URI for the previous page of the list """ last_page: Optional[ListPagingGroupUsersResponseNavigationLastPage] = None """ Canonical URI for the last page of the list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListPagingGroupUsersResponsePaging(DataClassJsonMixin): """ Information on paging """ page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) """ per_page: Optional[int] = None """ Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty """ total_pages: Optional[int] = None """ The total number of pages in a dataset. May be omitted for some resources due to performance reasons """ total_elements: Optional[int] = None """ The total number of elements in a dataset. May be omitted for some resource due to performance reasons """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListPagingGroupUsersResponse(DataClassJsonMixin): uri: Optional[str] = None """ Link to the list of users allowed to page the Paging Only group """ records: Optional[List[ListPagingGroupUsersResponseRecordsItem]] = None """ List of users allowed to page the Paging Only group """ navigation: Optional[ListPagingGroupUsersResponseNavigation] = None """ Information on navigation """ paging: Optional[ListPagingGroupUsersResponsePaging] = None """ Information on paging """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListPagingGroupDevicesResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a paging device """ uri: Optional[str] = None """ Link to a paging device resource """ name: Optional[str] = None """ Name of a paging device """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListPagingGroupDevicesResponseNavigationFirstPage(DataClassJsonMixin): """ Canonical URI for the first page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListPagingGroupDevicesResponseNavigationNextPage(DataClassJsonMixin): """ Canonical URI for the next page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListPagingGroupDevicesResponseNavigationPreviousPage(DataClassJsonMixin): """ Canonical URI for the previous page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListPagingGroupDevicesResponseNavigationLastPage(DataClassJsonMixin): """ Canonical URI for the last page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListPagingGroupDevicesResponseNavigation(DataClassJsonMixin): """ Information on navigation """ first_page: Optional[ListPagingGroupDevicesResponseNavigationFirstPage] = None """ Canonical URI for the first page of the list """ next_page: Optional[ListPagingGroupDevicesResponseNavigationNextPage] = None """ Canonical URI for the next page of the list """ previous_page: Optional[ListPagingGroupDevicesResponseNavigationPreviousPage] = None """ Canonical URI for the previous page of the list """ last_page: Optional[ListPagingGroupDevicesResponseNavigationLastPage] = None """ Canonical URI for the last page of the list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListPagingGroupDevicesResponsePaging(DataClassJsonMixin): """ Information on paging """ page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) """ per_page: Optional[int] = None """ Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty """ total_pages: Optional[int] = None """ The total number of pages in a dataset. May be omitted for some resources due to performance reasons """ total_elements: Optional[int] = None """ The total number of elements in a dataset. May be omitted for some resource due to performance reasons """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListPagingGroupDevicesResponse(DataClassJsonMixin): uri: Optional[str] = None """ Link to the list of devices assigned to the paging only group """ records: Optional[List[ListPagingGroupDevicesResponseRecordsItem]] = None """ List of paging devices assigned to this group """ navigation: Optional[ListPagingGroupDevicesResponseNavigation] = None """ Information on navigation """ paging: Optional[ListPagingGroupDevicesResponsePaging] = None """ Information on paging """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AssignMultiplePagingGroupUsersDevicesRequest(DataClassJsonMixin): added_user_ids: Optional[List[str]] = None """ List of users that will be allowed to page a group specified """ removed_user_ids: Optional[List[str]] = None """ List of users that will be unallowed to page a group specified """ added_device_ids: Optional[List[str]] = None """ List of account devices that will be assigned to a paging group specified """ removed_device_ids: Optional[List[str]] = None """ List of account devices that will be unassigned from a paging group specified """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCallMonitoringGroupsResponseRecordsItem(DataClassJsonMixin): uri: Optional[str] = None """ Link to a call monitoring group resource """ id: Optional[str] = None """ Internal identifier of a group """ name: Optional[str] = None """ Name of a group """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCallMonitoringGroupsResponseNavigationFirstPage(DataClassJsonMixin): """ Canonical URI for the first page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCallMonitoringGroupsResponseNavigationNextPage(DataClassJsonMixin): """ Canonical URI for the next page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCallMonitoringGroupsResponseNavigationPreviousPage(DataClassJsonMixin): """ Canonical URI for the previous page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCallMonitoringGroupsResponseNavigationLastPage(DataClassJsonMixin): """ Canonical URI for the last page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCallMonitoringGroupsResponseNavigation(DataClassJsonMixin): """ Information on navigation """ first_page: Optional[ListCallMonitoringGroupsResponseNavigationFirstPage] = None """ Canonical URI for the first page of the list """ next_page: Optional[ListCallMonitoringGroupsResponseNavigationNextPage] = None """ Canonical URI for the next page of the list """ previous_page: Optional[ListCallMonitoringGroupsResponseNavigationPreviousPage] = None """ Canonical URI for the previous page of the list """ last_page: Optional[ListCallMonitoringGroupsResponseNavigationLastPage] = None """ Canonical URI for the last page of the list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCallMonitoringGroupsResponsePaging(DataClassJsonMixin): """ Information on paging """ page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) """ per_page: Optional[int] = None """ Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty """ total_pages: Optional[int] = None """ The total number of pages in a dataset. May be omitted for some resources due to performance reasons """ total_elements: Optional[int] = None """ The total number of elements in a dataset. May be omitted for some resource due to performance reasons """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCallMonitoringGroupsResponse(DataClassJsonMixin): """ Required Properties: - navigation - paging - records - uri Generated by Python OpenAPI Parser """ uri: str """ Link to a call monitoring groups resource """ records: List[ListCallMonitoringGroupsResponseRecordsItem] """ List of call monitoring group members """ navigation: ListCallMonitoringGroupsResponseNavigation """ Information on navigation """ paging: ListCallMonitoringGroupsResponsePaging """ Information on paging """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateCallMonitoringGroupRequest(DataClassJsonMixin): """ Required Properties: - name Generated by Python OpenAPI Parser """ name: str """ Name of a group """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateCallMonitoringGroupResponse(DataClassJsonMixin): uri: Optional[str] = None """ Link to a call monitoring group resource """ id: Optional[str] = None """ Internal identifier of a group """ name: Optional[str] = None """ Name of a group """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCallMonitoringGroupRequest(DataClassJsonMixin): """ Required Properties: - name Generated by Python OpenAPI Parser """ name: str """ Name of a group """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCallMonitoringGroupResponse(DataClassJsonMixin): uri: Optional[str] = None """ Link to a call monitoring group resource """ id: Optional[str] = None """ Internal identifier of a group """ name: Optional[str] = None """ Name of a group """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserFeaturesResponseRecordsItemParamsItem(DataClassJsonMixin): name: Optional[str] = None """ Parameter name """ value: Optional[str] = None """ Parameter value """ class ReadUserFeaturesResponseRecordsItemReasonCode(Enum): """ Reason code """ ServicePlanLimitation = 'ServicePlanLimitation' AccountLimitation = 'AccountLimitation' ExtensionTypeLimitation = 'ExtensionTypeLimitation' ExtensionLimitation = 'ExtensionLimitation' InsufficientPermissions = 'InsufficientPermissions' ConfigurationLimitation = 'ConfigurationLimitation' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserFeaturesResponseRecordsItemReason(DataClassJsonMixin): """ Reason of the feature unavailability. Returned only if `available` is set to 'false' """ code: Optional[ReadUserFeaturesResponseRecordsItemReasonCode] = None """ Reason code """ message: Optional[str] = None """ Reason description """ permission: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserFeaturesResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a feature """ available: Optional[bool] = None """ Specifies if the feature is available for the current user according to services enabled for the account, type, entitlements and permissions of the extension. If the authorized user gets features of the other extension, only features that can be delegated are returned (such as configuration by administrators). """ params: Optional[List[ReadUserFeaturesResponseRecordsItemParamsItem]] = None reason: Optional[ReadUserFeaturesResponseRecordsItemReason] = None """ Reason of the feature unavailability. Returned only if `available` is set to 'false' """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserFeaturesResponse(DataClassJsonMixin): records: Optional[List[ReadUserFeaturesResponseRecordsItem]] = None class ListCallMonitoringGroupMembersResponseRecordsItemPermissionsItem(Enum): """ Call monitoring permission; mltiple values are allowed: * `Monitoring` - User can monitor a group * `Monitored` - User can be monitored Generated by Python OpenAPI Parser """ Monitoring = 'Monitoring' Monitored = 'Monitored' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCallMonitoringGroupMembersResponseRecordsItem(DataClassJsonMixin): uri: Optional[str] = None """ Link to a call monitoring group member """ id: Optional[str] = None """ Internal identifier of a call monitoring group member """ extension_number: Optional[str] = None """ Extension number of a call monitoring group member """ permissions: Optional[List[ListCallMonitoringGroupMembersResponseRecordsItemPermissionsItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCallMonitoringGroupMembersResponseNavigationFirstPage(DataClassJsonMixin): """ Canonical URI for the first page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCallMonitoringGroupMembersResponseNavigationNextPage(DataClassJsonMixin): """ Canonical URI for the next page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCallMonitoringGroupMembersResponseNavigationPreviousPage(DataClassJsonMixin): """ Canonical URI for the previous page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCallMonitoringGroupMembersResponseNavigationLastPage(DataClassJsonMixin): """ Canonical URI for the last page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCallMonitoringGroupMembersResponseNavigation(DataClassJsonMixin): """ Information on navigation """ first_page: Optional[ListCallMonitoringGroupMembersResponseNavigationFirstPage] = None """ Canonical URI for the first page of the list """ next_page: Optional[ListCallMonitoringGroupMembersResponseNavigationNextPage] = None """ Canonical URI for the next page of the list """ previous_page: Optional[ListCallMonitoringGroupMembersResponseNavigationPreviousPage] = None """ Canonical URI for the previous page of the list """ last_page: Optional[ListCallMonitoringGroupMembersResponseNavigationLastPage] = None """ Canonical URI for the last page of the list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCallMonitoringGroupMembersResponsePaging(DataClassJsonMixin): """ Information on paging """ page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) """ per_page: Optional[int] = None """ Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty """ total_pages: Optional[int] = None """ The total number of pages in a dataset. May be omitted for some resources due to performance reasons """ total_elements: Optional[int] = None """ The total number of elements in a dataset. May be omitted for some resource due to performance reasons """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCallMonitoringGroupMembersResponse(DataClassJsonMixin): """ Required Properties: - navigation - paging - records - uri Generated by Python OpenAPI Parser """ uri: str """ Link to a call monitoring group members resource """ records: List[ListCallMonitoringGroupMembersResponseRecordsItem] """ List of a call monitoring group members """ navigation: ListCallMonitoringGroupMembersResponseNavigation """ Information on navigation """ paging: ListCallMonitoringGroupMembersResponsePaging """ Information on paging """ class UpdateCallMonitoringGroupListRequestAddedExtensionsItemPermissionsItem(Enum): Monitoring = 'Monitoring' Monitored = 'Monitored' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCallMonitoringGroupListRequestAddedExtensionsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an extension. Only the following extension types are allowed: User, DigitalUser, VirtualUser, FaxUser, Limited """ permissions: Optional[List[UpdateCallMonitoringGroupListRequestAddedExtensionsItemPermissionsItem]] = None """ Set of call monitoring group permissions granted to the specified extension. In order to remove the specified extension from a call monitoring group use an empty value """ class UpdateCallMonitoringGroupListRequestUpdatedExtensionsItemPermissionsItem(Enum): Monitoring = 'Monitoring' Monitored = 'Monitored' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCallMonitoringGroupListRequestUpdatedExtensionsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an extension. Only the following extension types are allowed: User, DigitalUser, VirtualUser, FaxUser, Limited """ permissions: Optional[List[UpdateCallMonitoringGroupListRequestUpdatedExtensionsItemPermissionsItem]] = None """ Set of call monitoring group permissions granted to the specified extension. In order to remove the specified extension from a call monitoring group use an empty value """ class UpdateCallMonitoringGroupListRequestRemovedExtensionsItemPermissionsItem(Enum): Monitoring = 'Monitoring' Monitored = 'Monitored' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCallMonitoringGroupListRequestRemovedExtensionsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an extension. Only the following extension types are allowed: User, DigitalUser, VirtualUser, FaxUser, Limited """ permissions: Optional[List[UpdateCallMonitoringGroupListRequestRemovedExtensionsItemPermissionsItem]] = None """ Set of call monitoring group permissions granted to the specified extension. In order to remove the specified extension from a call monitoring group use an empty value """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCallMonitoringGroupListRequest(DataClassJsonMixin): added_extensions: Optional[List[UpdateCallMonitoringGroupListRequestAddedExtensionsItem]] = None updated_extensions: Optional[List[UpdateCallMonitoringGroupListRequestUpdatedExtensionsItem]] = None removed_extensions: Optional[List[UpdateCallMonitoringGroupListRequestRemovedExtensionsItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ParsePhoneNumberRequest(DataClassJsonMixin): original_strings: Optional[List[str]] = None """ Phone numbers passed in a string. The maximum value of phone numbers is limited to 64. The maximum number of symbols in each phone number in a string is 64 """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ParsePhoneNumberResponseHomeCountry(DataClassJsonMixin): """ Information on a user home country """ id: Optional[str] = None """ Internal identifier of a country """ uri: Optional[str] = None """ Canonical URI of a country """ calling_code: Optional[str] = None """ Country calling code defined by ITU-T recommendations E.123 and E.164, see Calling Codes """ emergency_calling: Optional[bool] = None """ Emergency calling feature availability/emergency address requirement indicator """ iso_code: Optional[str] = None """ Country code according to the ISO standard, see ISO 3166 """ name: Optional[str] = None """ Official name of a country """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ParsePhoneNumberResponsePhoneNumbersItemCountry(DataClassJsonMixin): """ Information on a country the phone number belongs to """ id: Optional[str] = None """ Internal identifier of a country """ uri: Optional[str] = None """ Canonical URI of a country """ calling_code: Optional[str] = None """ Country calling code defined by ITU-T recommendations E.123 and E.164, see Calling Codes """ emergency_calling: Optional[bool] = None """ Emergency calling feature availability/emergency address requirement indicator """ iso_code: Optional[str] = None """ Country code according to the ISO standard, see ISO 3166 """ name: Optional[str] = None """ Official name of a country """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ParsePhoneNumberResponsePhoneNumbersItem(DataClassJsonMixin): area_code: Optional[str] = None """ Area code of location. The portion of the [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) number that identifies a specific geographic region/numbering area of the national numbering plan (NANP); that can be summarized as `NPA-NXX-xxxx` and covers Canada, the United States, parts of the Caribbean Sea, and some Atlantic and Pacific islands. See [North American Numbering Plan] (https://en.wikipedia.org/wiki/North_American_Numbering_Plan) for details """ country: Optional[ParsePhoneNumberResponsePhoneNumbersItemCountry] = None """ Information on a country the phone number belongs to """ dialable: Optional[str] = None """ Dialing format of a phone number """ e164: Optional[str] = None """ Phone number [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) format """ formatted_international: Optional[str] = None """ International format of a phone number """ formatted_national: Optional[str] = None """ Domestic format of a phone number """ original_string: Optional[str] = None """ One of the numbers to be parsed, passed as a string in response """ special: Optional[bool] = None """ 'True' if the number is in a special format (for example N11 code) """ normalized: Optional[str] = None """ Phone number [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) format without plus sign ('+') """ toll_free: Optional[bool] = None """ Specifies if a phone number is toll free or not """ sub_address: Optional[str] = None """ Sub-Address. The portion of the number that identifies a subscriber into the subscriber internal (non-public) network. """ subscriber_number: Optional[str] = None """ Subscriber number. The portion of the [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) number that identifies a subscriber in a network or numbering area. """ dtmf_postfix: Optional[str] = None """ DTMF (Dual Tone Multi-Frequency) postfix """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ParsePhoneNumberResponse(DataClassJsonMixin): """ Required Properties: - home_country - phone_numbers Generated by Python OpenAPI Parser """ home_country: ParsePhoneNumberResponseHomeCountry """ Information on a user home country """ phone_numbers: List[ParsePhoneNumberResponsePhoneNumbersItem] """ Parsed phone numbers data """ uri: Optional[str] = None """ Canonical URI of a resource """ class ReadDeviceResponseType(Enum): """ Device type """ BLA = 'BLA' SoftPhone = 'SoftPhone' OtherPhone = 'OtherPhone' HardPhone = 'HardPhone' WebPhone = 'WebPhone' Paging = 'Paging' class ReadDeviceResponseStatus(Enum): """ Device status """ Offline = 'Offline' Online = 'Online' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadDeviceResponseModelAddonsItem(DataClassJsonMixin): id: Optional[str] = None name: Optional[str] = None count: Optional[int] = None class ReadDeviceResponseModelFeaturesItem(Enum): BLA = 'BLA' CommonPhone = 'CommonPhone' Intercom = 'Intercom' Paging = 'Paging' HELD = 'HELD' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadDeviceResponseModel(DataClassJsonMixin): """ HardPhone model information """ id: Optional[str] = None """ Internal identifier of a HardPhone device model """ name: Optional[str] = None """ Device name """ addons: Optional[List[ReadDeviceResponseModelAddonsItem]] = None """ Addons description """ features: Optional[List[ReadDeviceResponseModelFeaturesItem]] = None """ Device feature or multiple features supported """ line_count: Optional[int] = None """ Max supported count of phone lines """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadDeviceResponseExtension(DataClassJsonMixin): """ This attribute can be omitted for unassigned devices """ id: Optional[int] = None """ Internal identifier of an extension """ uri: Optional[str] = None """ Canonical URI of an extension """ extension_number: Optional[str] = None """ Number of department extension """ partner_id: Optional[str] = None """ For Partner Applications Internal identifier of an extension created by partner. The RingCentral supports the mapping of accounts and stores the corresponding account ID/extension ID for each partner ID of a client application. In request URIs partner IDs are accepted instead of regular RingCentral native IDs as path parameters using pid = XXX clause. Though in response URIs contain the corresponding account IDs and extension IDs. In all request and response bodies these values are reflected via partnerId attributes of account and extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadDeviceResponseEmergencyAddress(DataClassJsonMixin): customer_name: Optional[str] = None """ Name of a customer """ street: Optional[str] = None """ Street address, line 1 - street address, P.O. box, company name, c/o """ street2: Optional[str] = None """ Street address, line 2 - apartment, suite, unit, building, floor, etc. """ city: Optional[str] = None """ City name """ zip: Optional[str] = None """ Zip code """ state: Optional[str] = None """ State/province name """ state_id: Optional[str] = None """ Internal identifier of a state """ state_iso_code: Optional[str] = None """ ISO code of a state """ state_name: Optional[str] = None """ Full name of a state """ country_id: Optional[str] = None """ Internal identifier of a country """ country_iso_code: Optional[str] = None """ ISO code of a country """ country: Optional[str] = None """ Country name """ country_name: Optional[str] = None """ Full name of a country """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadDeviceResponseEmergencyLocation(DataClassJsonMixin): """ Company emergency response location details """ id: Optional[str] = None """ Internal identifier of the emergency response location """ name: Optional[str] = None """ Location name """ class ReadDeviceResponseEmergencyAddressStatus(Enum): """ Emergency address status """ Valid = 'Valid' Invalid = 'Invalid' class ReadDeviceResponseEmergencySyncStatus(Enum): """ Resulting status of emergency address synchronization. Returned if `syncEmergencyAddress` parameter is set to 'True' Generated by Python OpenAPI Parser """ Verified = 'Verified' Updated = 'Updated' Deleted = 'Deleted' NotRequired = 'NotRequired' Unsupported = 'Unsupported' Failed = 'Failed' class ReadDeviceResponseEmergencyAddressEditableStatus(Enum): """ Ability to register new emergency address for a phone line using devices sharing this line or only main device (line owner) Generated by Python OpenAPI Parser """ MainDevice = 'MainDevice' AnyDevice = 'AnyDevice' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadDeviceResponseEmergency(DataClassJsonMixin): """ Device emergency settings """ address: Optional[ReadDeviceResponseEmergencyAddress] = None location: Optional[ReadDeviceResponseEmergencyLocation] = None """ Company emergency response location details """ out_of_country: Optional[bool] = None """ Specifies if emergency address is out of country """ address_status: Optional[ReadDeviceResponseEmergencyAddressStatus] = None """ Emergency address status """ sync_status: Optional[ReadDeviceResponseEmergencySyncStatus] = None """ Resulting status of emergency address synchronization. Returned if `syncEmergencyAddress` parameter is set to 'True' """ address_editable_status: Optional[ReadDeviceResponseEmergencyAddressEditableStatus] = None """ Ability to register new emergency address for a phone line using devices sharing this line or only main device (line owner) """ class ReadDeviceResponseEmergencyServiceAddressSyncStatus(Enum): """ Resulting status of emergency address synchronization. Returned if `syncEmergencyAddress` parameter is set to 'True' Generated by Python OpenAPI Parser """ Verified = 'Verified' Updated = 'Updated' Deleted = 'Deleted' NotRequired = 'NotRequired' Unsupported = 'Unsupported' Failed = 'Failed' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadDeviceResponseEmergencyServiceAddress(DataClassJsonMixin): """ Address for emergency cases. The same emergency address is assigned to all the numbers of one device Generated by Python OpenAPI Parser """ street: Optional[str] = None street2: Optional[str] = None city: Optional[str] = None zip: Optional[str] = None customer_name: Optional[str] = None state: Optional[str] = None """ State/province name """ state_id: Optional[str] = None """ Internal identifier of a state """ state_iso_code: Optional[str] = None """ ISO code of a state """ state_name: Optional[str] = None """ Full name of a state """ country_id: Optional[str] = None """ Internal identifier of a country """ country_iso_code: Optional[str] = None """ ISO code of a country """ country: Optional[str] = None """ Country name """ country_name: Optional[str] = None """ Full name of a country """ out_of_country: Optional[bool] = None """ Specifies if emergency address is out of country """ sync_status: Optional[ReadDeviceResponseEmergencyServiceAddressSyncStatus] = None """ Resulting status of emergency address synchronization. Returned if `syncEmergencyAddress` parameter is set to 'True' """ additional_customer_name: Optional[str] = None """ Name of an additional contact person. Should be specified for countries except the US, Canada, the UK and Australia. """ customer_email: Optional[str] = None """ Email of a primary contact person (receiver). Should be specified for countries except the US, Canada, the UK and Australia. """ additional_customer_email: Optional[str] = None """ Email of an additional contact person. Should be specified for countries except the US, Canada, the UK and Australia. """ customer_phone: Optional[str] = None """ Phone number of a primary contact person (receiver). Should be specified for countries except the US, Canada, the UK and Australia """ additional_customer_phone: Optional[str] = None """ Phone number of an additional contact person. Should be specified for countries except the US, Canada, the UK & Australia. """ tax_id: Optional[str] = None """ Internal identifier of a tax """ class ReadDeviceResponsePhoneLinesItemLineType(Enum): """ Type of phone line """ Standalone = 'Standalone' StandaloneFree = 'StandaloneFree' BlaPrimary = 'BlaPrimary' BlaSecondary = 'BlaSecondary' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadDeviceResponsePhoneLinesItemPhoneInfoCountry(DataClassJsonMixin): """ Brief information on a phone number country """ id: Optional[str] = None """ Internal identifier of a home country """ uri: Optional[str] = None """ Canonical URI of a home country """ name: Optional[str] = None """ Official name of a home country """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadDeviceResponsePhoneLinesItemPhoneInfoExtension(DataClassJsonMixin): """ Information on the extension, to which the phone number is assigned. Returned only for the request of Account phone number list Generated by Python OpenAPI Parser """ id: Optional[str] = None """ Internal identifier of an extension """ uri: Optional[str] = None """ Canonical URI of an extension """ extension_number: Optional[str] = None """ Number of department extension """ partner_id: Optional[str] = None """ For Partner Applications Internal identifier of an extension created by partner. The RingCentral supports the mapping of accounts and stores the corresponding account ID/extension ID for each partner ID of a client application. In request URIs partner IDs are accepted instead of regular RingCentral native IDs as path parameters using pid = XXX clause. Though in response URIs contain the corresponding account IDs and extension IDs. In all request and response bodies these values are reflected via partnerId attributes of account and extension """ class ReadDeviceResponsePhoneLinesItemPhoneInfoPaymentType(Enum): """ Payment type. 'External' is returned for forwarded numbers which are not terminated in the RingCentral phone system Generated by Python OpenAPI Parser """ External = 'External' TollFree = 'TollFree' Local = 'Local' class ReadDeviceResponsePhoneLinesItemPhoneInfoType(Enum): """ Phone number type """ VoiceFax = 'VoiceFax' FaxOnly = 'FaxOnly' VoiceOnly = 'VoiceOnly' class ReadDeviceResponsePhoneLinesItemPhoneInfoUsageType(Enum): """ Usage type of the phone number """ MainCompanyNumber = 'MainCompanyNumber' AdditionalCompanyNumber = 'AdditionalCompanyNumber' CompanyNumber = 'CompanyNumber' DirectNumber = 'DirectNumber' CompanyFaxNumber = 'CompanyFaxNumber' ForwardedNumber = 'ForwardedNumber' ForwardedCompanyNumber = 'ForwardedCompanyNumber' ContactCenterNumber = 'ContactCenterNumber' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadDeviceResponsePhoneLinesItemPhoneInfo(DataClassJsonMixin): """ Phone number information """ id: Optional[int] = None """ Internal identifier of a phone number """ country: Optional[ReadDeviceResponsePhoneLinesItemPhoneInfoCountry] = None """ Brief information on a phone number country """ extension: Optional[ReadDeviceResponsePhoneLinesItemPhoneInfoExtension] = None """ Information on the extension, to which the phone number is assigned. Returned only for the request of Account phone number list """ label: Optional[str] = None """ Custom user name of a phone number, if any """ location: Optional[str] = None """ Location (City, State). Filled for local US numbers """ payment_type: Optional[ReadDeviceResponsePhoneLinesItemPhoneInfoPaymentType] = None """ Payment type. 'External' is returned for forwarded numbers which are not terminated in the RingCentral phone system """ phone_number: Optional[str] = None """ Phone number """ status: Optional[str] = None """ Status of a phone number. If the value is 'Normal', the phone number is ready to be used. Otherwise it is an external number not yet ported to RingCentral """ type: Optional[ReadDeviceResponsePhoneLinesItemPhoneInfoType] = None """ Phone number type """ usage_type: Optional[ReadDeviceResponsePhoneLinesItemPhoneInfoUsageType] = None """ Usage type of the phone number """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadDeviceResponsePhoneLinesItemEmergencyAddress(DataClassJsonMixin): required: Optional[bool] = None """ 'True' if specifying of emergency address is required """ local_only: Optional[bool] = None """ 'True' if only local emergency address can be specified """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadDeviceResponsePhoneLinesItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a phone line """ line_type: Optional[ReadDeviceResponsePhoneLinesItemLineType] = None """ Type of phone line """ phone_info: Optional[ReadDeviceResponsePhoneLinesItemPhoneInfo] = None """ Phone number information """ emergency_address: Optional[ReadDeviceResponsePhoneLinesItemEmergencyAddress] = None class ReadDeviceResponseShippingStatus(Enum): """ Shipping status of the order item. It is set to 'Initial' when the order is submitted. Then it is changed to 'Accepted' when a distributor starts processing the order. Finally it is changed to Shipped which means that distributor has shipped the device. Generated by Python OpenAPI Parser """ Initial = 'Initial' Accepted = 'Accepted' Shipped = 'Shipped' WonTShip = "Won't ship" class ReadDeviceResponseShippingMethodId(Enum): """ Method identifier. The default value is 1 (Ground) """ OBJECT_1 = '1' OBJECT_2 = '2' OBJECT_3 = '3' class ReadDeviceResponseShippingMethodName(Enum): """ Method name, corresponding to the identifier """ Ground = 'Ground' OBJECT_2_Day = '2 Day' Overnight = 'Overnight' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadDeviceResponseShippingMethod(DataClassJsonMixin): """ Shipping method information """ id: Optional[ReadDeviceResponseShippingMethodId] = None """ Method identifier. The default value is 1 (Ground) """ name: Optional[ReadDeviceResponseShippingMethodName] = None """ Method name, corresponding to the identifier """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadDeviceResponseShippingAddress(DataClassJsonMixin): """ Shipping address for the order. If it coincides with the Emergency Service Address, then can be omitted. By default the same value as the emergencyServiceAddress. Multiple addresses can be specified; in case an order contains several devices, they can be delivered to different addresses Generated by Python OpenAPI Parser """ customer_name: Optional[str] = None """ Name of a primary contact person (receiver) """ additional_customer_name: Optional[str] = None """ Name of an additional contact person. Should be specified for countries except the US, Canada, the UK and Australia. """ customer_email: Optional[str] = None """ Email of a primary contact person (receiver). Should be specified for countries except the US, Canada, the UK and Australia. """ additional_customer_email: Optional[str] = None """ Email of an additional contact person. Should be specified for countries except the US, Canada, the UK and Australia. """ customer_phone: Optional[str] = None """ Phone number of a primary contact person (receiver). Should be specified for countries except the US, Canada, the UK and Australia """ additional_customer_phone: Optional[str] = None """ Phone number of an additional contact person. Should be specified for countries except the US, Canada, the UK & Australia. """ street: Optional[str] = None """ Street address, line 1 - street address, P.O. box, company name, c/o """ street2: Optional[str] = None """ Street address, line 2 - apartment, suite, unit, building, floor, etc. """ city: Optional[str] = None """ City name """ state: Optional[str] = None """ State/province name """ state_id: Optional[str] = None """ Internal identifier of a state """ state_iso_code: Optional[str] = None """ ISO code of a state """ state_name: Optional[str] = None """ Full name of a state """ country_id: Optional[str] = None """ Internal identifier of a country """ country_iso_code: Optional[str] = None """ ISO code of a country """ country: Optional[str] = None """ Country name """ country_name: Optional[str] = None """ Full name of a country """ zip: Optional[str] = None """ Zip code """ tax_id: Optional[str] = None """ National taxpayer identification number. Should be specified for Brazil (CNPJ/CPF number) and Argentina (CUIT number). """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadDeviceResponseShipping(DataClassJsonMixin): """ Shipping information, according to which devices (in case of HardPhone ) or e911 stickers (in case of SoftPhone and OtherPhone ) will be delivered to the customer Generated by Python OpenAPI Parser """ status: Optional[ReadDeviceResponseShippingStatus] = None """ Shipping status of the order item. It is set to 'Initial' when the order is submitted. Then it is changed to 'Accepted' when a distributor starts processing the order. Finally it is changed to Shipped which means that distributor has shipped the device. """ carrier: Optional[str] = None """ Shipping carrier name. Appears only if the device status is 'Shipped' """ tracking_number: Optional[str] = None """ Carrier-specific tracking number. Appears only if the device status is 'Shipped' """ method: Optional[ReadDeviceResponseShippingMethod] = None """ Shipping method information """ address: Optional[ReadDeviceResponseShippingAddress] = None """ Shipping address for the order. If it coincides with the Emergency Service Address, then can be omitted. By default the same value as the emergencyServiceAddress. Multiple addresses can be specified; in case an order contains several devices, they can be delivered to different addresses """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadDeviceResponseSite(DataClassJsonMixin): """ Site data """ id: Optional[str] = None """ Internal identifier of a site """ name: Optional[str] = None """ Name of a site """ class ReadDeviceResponseLinePooling(Enum): """ Pooling type of a deviceHost - device with standalone paid phone line which can be linked to Glip/Softphone instanceGuest - device with a linked phone lineNone - device without a phone line or with specific line (free, BLA, etc.) = ['Host', 'Guest', 'None'] Generated by Python OpenAPI Parser """ Host = 'Host' Guest = 'Guest' None_ = 'None' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadDeviceResponseBillingStatementChargesItem(DataClassJsonMixin): description: Optional[str] = None amount: Optional[float] = None feature: Optional[str] = None free_service_credit: Optional[float] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadDeviceResponseBillingStatementFeesItem(DataClassJsonMixin): description: Optional[str] = None amount: Optional[float] = None free_service_credit: Optional[float] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadDeviceResponseBillingStatement(DataClassJsonMixin): """ Billing information. Returned for device update request if `prestatement` query parameter is set to 'true' Generated by Python OpenAPI Parser """ currency: Optional[str] = None """ Currency code complying with [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217) standard """ charges: Optional[List[ReadDeviceResponseBillingStatementChargesItem]] = None fees: Optional[List[ReadDeviceResponseBillingStatementFeesItem]] = None total_charged: Optional[float] = None total_charges: Optional[float] = None total_fees: Optional[float] = None subtotal: Optional[float] = None total_free_service_credit: Optional[float] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadDeviceResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a device """ uri: Optional[str] = None """ Canonical URI of a device """ sku: Optional[str] = None """ Device identification number (stock keeping unit) in the format TP-ID [-AT-AC], where TP is device type (HP for RC HardPhone, DV for all other devices including softphone); ID - device model ID; AT -addon type ID; AC - addon count (if any). For example 'HP-56-2-2' """ type: Optional[ReadDeviceResponseType] = 'HardPhone' """ Device type """ name: Optional[str] = None """ Device name. Mandatory if ordering SoftPhone or OtherPhone. Optional for HardPhone. If not specified for HardPhone, then device model name is used as device name """ serial: Optional[str] = None """ Serial number for HardPhone (is returned only when the phone is shipped and provisioned); endpoint_id for softphone and mobile applications """ status: Optional[ReadDeviceResponseStatus] = None """ Device status """ computer_name: Optional[str] = None """ PC name for softphone """ model: Optional[ReadDeviceResponseModel] = None """ HardPhone model information """ extension: Optional[ReadDeviceResponseExtension] = None """ This attribute can be omitted for unassigned devices """ emergency: Optional[ReadDeviceResponseEmergency] = None """ Device emergency settings """ emergency_service_address: Optional[ReadDeviceResponseEmergencyServiceAddress] = None """ Address for emergency cases. The same emergency address is assigned to all the numbers of one device """ phone_lines: Optional[List[ReadDeviceResponsePhoneLinesItem]] = None """ Phone lines information """ shipping: Optional[ReadDeviceResponseShipping] = None """ Shipping information, according to which devices (in case of HardPhone ) or e911 stickers (in case of SoftPhone and OtherPhone ) will be delivered to the customer """ box_billing_id: Optional[int] = None """ Box billing identifier of a device. Applicable only for HardPhones. It is an alternative way to identify the device to be ordered. EitherT? model structure, or boxBillingId must be specified forT?HardPhone """ use_as_common_phone: Optional[bool] = None """ Supported only for devices assigned to Limited extensions. If true, enables users to log in to this phone as a common phone. """ in_company_net: Optional[bool] = None """ Network location status. 'True' if the device is located in the configured corporate network (On-Net); 'False' for Off-Net location. Parameter is not returned if `EmergencyAddressAutoUpdate` feature is not enabled for the account/user, or if device network location is not determined """ site: Optional[ReadDeviceResponseSite] = None """ Site data """ last_location_report_time: Optional[str] = None """ Datetime of receiving last location report in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format including timezone, for example *2016-03-10T18:07:52.534Z """ line_pooling: Optional[ReadDeviceResponseLinePooling] = None """ Pooling type of a deviceHost - device with standalone paid phone line which can be linked to Glip/Softphone instanceGuest - device with a linked phone lineNone - device without a phone line or with specific line (free, BLA, etc.) = ['Host', 'Guest', 'None'] """ billing_statement: Optional[ReadDeviceResponseBillingStatement] = None """ Billing information. Returned for device update request if `prestatement` query parameter is set to 'true' """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateDeviceRequestEmergencyServiceAddress(DataClassJsonMixin): """ Address for emergency cases. The same emergency address is assigned to all numbers of a single device. If the emergency address is also specified in `emergency` resource, then this value is ignored Generated by Python OpenAPI Parser """ street: Optional[str] = None street2: Optional[str] = None city: Optional[str] = None zip: Optional[str] = None customer_name: Optional[str] = None state: Optional[str] = None """ State/province name """ state_id: Optional[str] = None """ Internal identifier of a state """ country: Optional[str] = None """ Country name """ country_id: Optional[str] = None """ Internal identifier of a country """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateDeviceRequestEmergencyAddress(DataClassJsonMixin): customer_name: Optional[str] = None """ Name of a customer """ street: Optional[str] = None """ Street address, line 1 - street address, P.O. box, company name, c/o """ street2: Optional[str] = None """ Street address, line 2 - apartment, suite, unit, building, floor, etc. """ city: Optional[str] = None """ City name """ zip: Optional[str] = None """ Zip code """ state: Optional[str] = None """ State/province name """ state_id: Optional[str] = None """ Internal identifier of a state """ state_iso_code: Optional[str] = None """ ISO code of a state """ state_name: Optional[str] = None """ Full name of a state """ country_id: Optional[str] = None """ Internal identifier of a country """ country_iso_code: Optional[str] = None """ ISO code of a country """ country: Optional[str] = None """ Country name """ country_name: Optional[str] = None """ Full name of a country """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateDeviceRequestEmergencyLocation(DataClassJsonMixin): """ Company emergency response location details """ id: Optional[str] = None """ Internal identifier of the emergency response location """ name: Optional[str] = None """ Location name """ class UpdateDeviceRequestEmergencyAddressStatus(Enum): """ Emergency address status """ Valid = 'Valid' Invalid = 'Invalid' class UpdateDeviceRequestEmergencySyncStatus(Enum): """ Resulting status of emergency address synchronization. Returned if `syncEmergencyAddress` parameter is set to 'True' Generated by Python OpenAPI Parser """ Verified = 'Verified' Updated = 'Updated' Deleted = 'Deleted' NotRequired = 'NotRequired' Unsupported = 'Unsupported' Failed = 'Failed' class UpdateDeviceRequestEmergencyAddressEditableStatus(Enum): """ Ability to register new emergency address for a phone line using devices sharing this line or only main device (line owner) Generated by Python OpenAPI Parser """ MainDevice = 'MainDevice' AnyDevice = 'AnyDevice' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateDeviceRequestEmergency(DataClassJsonMixin): """ Device emergency settings """ address: Optional[UpdateDeviceRequestEmergencyAddress] = None location: Optional[UpdateDeviceRequestEmergencyLocation] = None """ Company emergency response location details """ out_of_country: Optional[bool] = None """ Specifies if emergency address is out of country """ address_status: Optional[UpdateDeviceRequestEmergencyAddressStatus] = None """ Emergency address status """ sync_status: Optional[UpdateDeviceRequestEmergencySyncStatus] = None """ Resulting status of emergency address synchronization. Returned if `syncEmergencyAddress` parameter is set to 'True' """ address_editable_status: Optional[UpdateDeviceRequestEmergencyAddressEditableStatus] = None """ Ability to register new emergency address for a phone line using devices sharing this line or only main device (line owner) """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateDeviceRequestExtension(DataClassJsonMixin): """ Information on extension that the device is assigned to """ id: Optional[str] = None """ Internal identifier of an extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateDeviceRequestPhoneLinesPhoneLinesItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a phone number """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateDeviceRequestPhoneLines(DataClassJsonMixin): """ Information on phone lines added to a device """ phone_lines: Optional[List[UpdateDeviceRequestPhoneLinesPhoneLinesItem]] = None """ Information on phone lines added to a device """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateDeviceRequest(DataClassJsonMixin): emergency_service_address: Optional[UpdateDeviceRequestEmergencyServiceAddress] = None """ Address for emergency cases. The same emergency address is assigned to all numbers of a single device. If the emergency address is also specified in `emergency` resource, then this value is ignored """ emergency: Optional[UpdateDeviceRequestEmergency] = None """ Device emergency settings """ extension: Optional[UpdateDeviceRequestExtension] = None """ Information on extension that the device is assigned to """ phone_lines: Optional[UpdateDeviceRequestPhoneLines] = None """ Information on phone lines added to a device """ use_as_common_phone: Optional[bool] = None """ Supported only for devices assigned to Limited extensions. If true, enables users to log in to this phone as a common phone. """ class UpdateDeviceResponseType(Enum): """ Device type """ BLA = 'BLA' SoftPhone = 'SoftPhone' OtherPhone = 'OtherPhone' HardPhone = 'HardPhone' WebPhone = 'WebPhone' Paging = 'Paging' class UpdateDeviceResponseStatus(Enum): """ Device status """ Offline = 'Offline' Online = 'Online' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateDeviceResponseModelAddonsItem(DataClassJsonMixin): id: Optional[str] = None name: Optional[str] = None count: Optional[int] = None class UpdateDeviceResponseModelFeaturesItem(Enum): BLA = 'BLA' CommonPhone = 'CommonPhone' Intercom = 'Intercom' Paging = 'Paging' HELD = 'HELD' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateDeviceResponseModel(DataClassJsonMixin): """ HardPhone model information """ id: Optional[str] = None """ Internal identifier of a HardPhone device model """ name: Optional[str] = None """ Device name """ addons: Optional[List[UpdateDeviceResponseModelAddonsItem]] = None """ Addons description """ features: Optional[List[UpdateDeviceResponseModelFeaturesItem]] = None """ Device feature or multiple features supported """ line_count: Optional[int] = None """ Max supported count of phone lines """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateDeviceResponseExtension(DataClassJsonMixin): """ This attribute can be omitted for unassigned devices """ id: Optional[int] = None """ Internal identifier of an extension """ uri: Optional[str] = None """ Canonical URI of an extension """ extension_number: Optional[str] = None """ Number of department extension """ partner_id: Optional[str] = None """ For Partner Applications Internal identifier of an extension created by partner. The RingCentral supports the mapping of accounts and stores the corresponding account ID/extension ID for each partner ID of a client application. In request URIs partner IDs are accepted instead of regular RingCentral native IDs as path parameters using pid = XXX clause. Though in response URIs contain the corresponding account IDs and extension IDs. In all request and response bodies these values are reflected via partnerId attributes of account and extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateDeviceResponseEmergencyAddress(DataClassJsonMixin): customer_name: Optional[str] = None """ Name of a customer """ street: Optional[str] = None """ Street address, line 1 - street address, P.O. box, company name, c/o """ street2: Optional[str] = None """ Street address, line 2 - apartment, suite, unit, building, floor, etc. """ city: Optional[str] = None """ City name """ zip: Optional[str] = None """ Zip code """ state: Optional[str] = None """ State/province name """ state_id: Optional[str] = None """ Internal identifier of a state """ state_iso_code: Optional[str] = None """ ISO code of a state """ state_name: Optional[str] = None """ Full name of a state """ country_id: Optional[str] = None """ Internal identifier of a country """ country_iso_code: Optional[str] = None """ ISO code of a country """ country: Optional[str] = None """ Country name """ country_name: Optional[str] = None """ Full name of a country """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateDeviceResponseEmergencyLocation(DataClassJsonMixin): """ Company emergency response location details """ id: Optional[str] = None """ Internal identifier of the emergency response location """ name: Optional[str] = None """ Location name """ class UpdateDeviceResponseEmergencyAddressStatus(Enum): """ Emergency address status """ Valid = 'Valid' Invalid = 'Invalid' class UpdateDeviceResponseEmergencySyncStatus(Enum): """ Resulting status of emergency address synchronization. Returned if `syncEmergencyAddress` parameter is set to 'True' Generated by Python OpenAPI Parser """ Verified = 'Verified' Updated = 'Updated' Deleted = 'Deleted' NotRequired = 'NotRequired' Unsupported = 'Unsupported' Failed = 'Failed' class UpdateDeviceResponseEmergencyAddressEditableStatus(Enum): """ Ability to register new emergency address for a phone line using devices sharing this line or only main device (line owner) Generated by Python OpenAPI Parser """ MainDevice = 'MainDevice' AnyDevice = 'AnyDevice' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateDeviceResponseEmergency(DataClassJsonMixin): """ Device emergency settings """ address: Optional[UpdateDeviceResponseEmergencyAddress] = None location: Optional[UpdateDeviceResponseEmergencyLocation] = None """ Company emergency response location details """ out_of_country: Optional[bool] = None """ Specifies if emergency address is out of country """ address_status: Optional[UpdateDeviceResponseEmergencyAddressStatus] = None """ Emergency address status """ sync_status: Optional[UpdateDeviceResponseEmergencySyncStatus] = None """ Resulting status of emergency address synchronization. Returned if `syncEmergencyAddress` parameter is set to 'True' """ address_editable_status: Optional[UpdateDeviceResponseEmergencyAddressEditableStatus] = None """ Ability to register new emergency address for a phone line using devices sharing this line or only main device (line owner) """ class UpdateDeviceResponseEmergencyServiceAddressSyncStatus(Enum): """ Resulting status of emergency address synchronization. Returned if `syncEmergencyAddress` parameter is set to 'True' Generated by Python OpenAPI Parser """ Verified = 'Verified' Updated = 'Updated' Deleted = 'Deleted' NotRequired = 'NotRequired' Unsupported = 'Unsupported' Failed = 'Failed' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateDeviceResponseEmergencyServiceAddress(DataClassJsonMixin): """ Address for emergency cases. The same emergency address is assigned to all the numbers of one device Generated by Python OpenAPI Parser """ street: Optional[str] = None street2: Optional[str] = None city: Optional[str] = None zip: Optional[str] = None customer_name: Optional[str] = None state: Optional[str] = None """ State/province name """ state_id: Optional[str] = None """ Internal identifier of a state """ state_iso_code: Optional[str] = None """ ISO code of a state """ state_name: Optional[str] = None """ Full name of a state """ country_id: Optional[str] = None """ Internal identifier of a country """ country_iso_code: Optional[str] = None """ ISO code of a country """ country: Optional[str] = None """ Country name """ country_name: Optional[str] = None """ Full name of a country """ out_of_country: Optional[bool] = None """ Specifies if emergency address is out of country """ sync_status: Optional[UpdateDeviceResponseEmergencyServiceAddressSyncStatus] = None """ Resulting status of emergency address synchronization. Returned if `syncEmergencyAddress` parameter is set to 'True' """ additional_customer_name: Optional[str] = None """ Name of an additional contact person. Should be specified for countries except the US, Canada, the UK and Australia. """ customer_email: Optional[str] = None """ Email of a primary contact person (receiver). Should be specified for countries except the US, Canada, the UK and Australia. """ additional_customer_email: Optional[str] = None """ Email of an additional contact person. Should be specified for countries except the US, Canada, the UK and Australia. """ customer_phone: Optional[str] = None """ Phone number of a primary contact person (receiver). Should be specified for countries except the US, Canada, the UK and Australia """ additional_customer_phone: Optional[str] = None """ Phone number of an additional contact person. Should be specified for countries except the US, Canada, the UK & Australia. """ tax_id: Optional[str] = None """ Internal identifier of a tax """ class UpdateDeviceResponsePhoneLinesItemLineType(Enum): """ Type of phone line """ Standalone = 'Standalone' StandaloneFree = 'StandaloneFree' BlaPrimary = 'BlaPrimary' BlaSecondary = 'BlaSecondary' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateDeviceResponsePhoneLinesItemPhoneInfoCountry(DataClassJsonMixin): """ Brief information on a phone number country """ id: Optional[str] = None """ Internal identifier of a home country """ uri: Optional[str] = None """ Canonical URI of a home country """ name: Optional[str] = None """ Official name of a home country """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateDeviceResponsePhoneLinesItemPhoneInfoExtension(DataClassJsonMixin): """ Information on the extension, to which the phone number is assigned. Returned only for the request of Account phone number list Generated by Python OpenAPI Parser """ id: Optional[str] = None """ Internal identifier of an extension """ uri: Optional[str] = None """ Canonical URI of an extension """ extension_number: Optional[str] = None """ Number of department extension """ partner_id: Optional[str] = None """ For Partner Applications Internal identifier of an extension created by partner. The RingCentral supports the mapping of accounts and stores the corresponding account ID/extension ID for each partner ID of a client application. In request URIs partner IDs are accepted instead of regular RingCentral native IDs as path parameters using pid = XXX clause. Though in response URIs contain the corresponding account IDs and extension IDs. In all request and response bodies these values are reflected via partnerId attributes of account and extension """ class UpdateDeviceResponsePhoneLinesItemPhoneInfoPaymentType(Enum): """ Payment type. 'External' is returned for forwarded numbers which are not terminated in the RingCentral phone system Generated by Python OpenAPI Parser """ External = 'External' TollFree = 'TollFree' Local = 'Local' class UpdateDeviceResponsePhoneLinesItemPhoneInfoType(Enum): """ Phone number type """ VoiceFax = 'VoiceFax' FaxOnly = 'FaxOnly' VoiceOnly = 'VoiceOnly' class UpdateDeviceResponsePhoneLinesItemPhoneInfoUsageType(Enum): """ Usage type of the phone number """ MainCompanyNumber = 'MainCompanyNumber' AdditionalCompanyNumber = 'AdditionalCompanyNumber' CompanyNumber = 'CompanyNumber' DirectNumber = 'DirectNumber' CompanyFaxNumber = 'CompanyFaxNumber' ForwardedNumber = 'ForwardedNumber' ForwardedCompanyNumber = 'ForwardedCompanyNumber' ContactCenterNumber = 'ContactCenterNumber' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateDeviceResponsePhoneLinesItemPhoneInfo(DataClassJsonMixin): """ Phone number information """ id: Optional[int] = None """ Internal identifier of a phone number """ country: Optional[UpdateDeviceResponsePhoneLinesItemPhoneInfoCountry] = None """ Brief information on a phone number country """ extension: Optional[UpdateDeviceResponsePhoneLinesItemPhoneInfoExtension] = None """ Information on the extension, to which the phone number is assigned. Returned only for the request of Account phone number list """ label: Optional[str] = None """ Custom user name of a phone number, if any """ location: Optional[str] = None """ Location (City, State). Filled for local US numbers """ payment_type: Optional[UpdateDeviceResponsePhoneLinesItemPhoneInfoPaymentType] = None """ Payment type. 'External' is returned for forwarded numbers which are not terminated in the RingCentral phone system """ phone_number: Optional[str] = None """ Phone number """ status: Optional[str] = None """ Status of a phone number. If the value is 'Normal', the phone number is ready to be used. Otherwise it is an external number not yet ported to RingCentral """ type: Optional[UpdateDeviceResponsePhoneLinesItemPhoneInfoType] = None """ Phone number type """ usage_type: Optional[UpdateDeviceResponsePhoneLinesItemPhoneInfoUsageType] = None """ Usage type of the phone number """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateDeviceResponsePhoneLinesItemEmergencyAddress(DataClassJsonMixin): required: Optional[bool] = None """ 'True' if specifying of emergency address is required """ local_only: Optional[bool] = None """ 'True' if only local emergency address can be specified """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateDeviceResponsePhoneLinesItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a phone line """ line_type: Optional[UpdateDeviceResponsePhoneLinesItemLineType] = None """ Type of phone line """ phone_info: Optional[UpdateDeviceResponsePhoneLinesItemPhoneInfo] = None """ Phone number information """ emergency_address: Optional[UpdateDeviceResponsePhoneLinesItemEmergencyAddress] = None class UpdateDeviceResponseShippingStatus(Enum): """ Shipping status of the order item. It is set to 'Initial' when the order is submitted. Then it is changed to 'Accepted' when a distributor starts processing the order. Finally it is changed to Shipped which means that distributor has shipped the device. Generated by Python OpenAPI Parser """ Initial = 'Initial' Accepted = 'Accepted' Shipped = 'Shipped' WonTShip = "Won't ship" class UpdateDeviceResponseShippingMethodId(Enum): """ Method identifier. The default value is 1 (Ground) """ OBJECT_1 = '1' OBJECT_2 = '2' OBJECT_3 = '3' class UpdateDeviceResponseShippingMethodName(Enum): """ Method name, corresponding to the identifier """ Ground = 'Ground' OBJECT_2_Day = '2 Day' Overnight = 'Overnight' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateDeviceResponseShippingMethod(DataClassJsonMixin): """ Shipping method information """ id: Optional[UpdateDeviceResponseShippingMethodId] = None """ Method identifier. The default value is 1 (Ground) """ name: Optional[UpdateDeviceResponseShippingMethodName] = None """ Method name, corresponding to the identifier """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateDeviceResponseShippingAddress(DataClassJsonMixin): """ Shipping address for the order. If it coincides with the Emergency Service Address, then can be omitted. By default the same value as the emergencyServiceAddress. Multiple addresses can be specified; in case an order contains several devices, they can be delivered to different addresses Generated by Python OpenAPI Parser """ customer_name: Optional[str] = None """ Name of a primary contact person (receiver) """ additional_customer_name: Optional[str] = None """ Name of an additional contact person. Should be specified for countries except the US, Canada, the UK and Australia. """ customer_email: Optional[str] = None """ Email of a primary contact person (receiver). Should be specified for countries except the US, Canada, the UK and Australia. """ additional_customer_email: Optional[str] = None """ Email of an additional contact person. Should be specified for countries except the US, Canada, the UK and Australia. """ customer_phone: Optional[str] = None """ Phone number of a primary contact person (receiver). Should be specified for countries except the US, Canada, the UK and Australia """ additional_customer_phone: Optional[str] = None """ Phone number of an additional contact person. Should be specified for countries except the US, Canada, the UK & Australia. """ street: Optional[str] = None """ Street address, line 1 - street address, P.O. box, company name, c/o """ street2: Optional[str] = None """ Street address, line 2 - apartment, suite, unit, building, floor, etc. """ city: Optional[str] = None """ City name """ state: Optional[str] = None """ State/province name """ state_id: Optional[str] = None """ Internal identifier of a state """ state_iso_code: Optional[str] = None """ ISO code of a state """ state_name: Optional[str] = None """ Full name of a state """ country_id: Optional[str] = None """ Internal identifier of a country """ country_iso_code: Optional[str] = None """ ISO code of a country """ country: Optional[str] = None """ Country name """ country_name: Optional[str] = None """ Full name of a country """ zip: Optional[str] = None """ Zip code """ tax_id: Optional[str] = None """ National taxpayer identification number. Should be specified for Brazil (CNPJ/CPF number) and Argentina (CUIT number). """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateDeviceResponseShipping(DataClassJsonMixin): """ Shipping information, according to which devices (in case of HardPhone ) or e911 stickers (in case of SoftPhone and OtherPhone ) will be delivered to the customer Generated by Python OpenAPI Parser """ status: Optional[UpdateDeviceResponseShippingStatus] = None """ Shipping status of the order item. It is set to 'Initial' when the order is submitted. Then it is changed to 'Accepted' when a distributor starts processing the order. Finally it is changed to Shipped which means that distributor has shipped the device. """ carrier: Optional[str] = None """ Shipping carrier name. Appears only if the device status is 'Shipped' """ tracking_number: Optional[str] = None """ Carrier-specific tracking number. Appears only if the device status is 'Shipped' """ method: Optional[UpdateDeviceResponseShippingMethod] = None """ Shipping method information """ address: Optional[UpdateDeviceResponseShippingAddress] = None """ Shipping address for the order. If it coincides with the Emergency Service Address, then can be omitted. By default the same value as the emergencyServiceAddress. Multiple addresses can be specified; in case an order contains several devices, they can be delivered to different addresses """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateDeviceResponseSite(DataClassJsonMixin): """ Site data """ id: Optional[str] = None """ Internal identifier of a site """ name: Optional[str] = None """ Name of a site """ class UpdateDeviceResponseLinePooling(Enum): """ Pooling type of a deviceHost - device with standalone paid phone line which can be linked to Glip/Softphone instanceGuest - device with a linked phone lineNone - device without a phone line or with specific line (free, BLA, etc.) = ['Host', 'Guest', 'None'] Generated by Python OpenAPI Parser """ Host = 'Host' Guest = 'Guest' None_ = 'None' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateDeviceResponseBillingStatementChargesItem(DataClassJsonMixin): description: Optional[str] = None amount: Optional[float] = None feature: Optional[str] = None free_service_credit: Optional[float] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateDeviceResponseBillingStatementFeesItem(DataClassJsonMixin): description: Optional[str] = None amount: Optional[float] = None free_service_credit: Optional[float] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateDeviceResponseBillingStatement(DataClassJsonMixin): """ Billing information. Returned for device update request if `prestatement` query parameter is set to 'true' Generated by Python OpenAPI Parser """ currency: Optional[str] = None """ Currency code complying with [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217) standard """ charges: Optional[List[UpdateDeviceResponseBillingStatementChargesItem]] = None fees: Optional[List[UpdateDeviceResponseBillingStatementFeesItem]] = None total_charged: Optional[float] = None total_charges: Optional[float] = None total_fees: Optional[float] = None subtotal: Optional[float] = None total_free_service_credit: Optional[float] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateDeviceResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a device """ uri: Optional[str] = None """ Canonical URI of a device """ sku: Optional[str] = None """ Device identification number (stock keeping unit) in the format TP-ID [-AT-AC], where TP is device type (HP for RC HardPhone, DV for all other devices including softphone); ID - device model ID; AT -addon type ID; AC - addon count (if any). For example 'HP-56-2-2' """ type: Optional[UpdateDeviceResponseType] = 'HardPhone' """ Device type """ name: Optional[str] = None """ Device name. Mandatory if ordering SoftPhone or OtherPhone. Optional for HardPhone. If not specified for HardPhone, then device model name is used as device name """ serial: Optional[str] = None """ Serial number for HardPhone (is returned only when the phone is shipped and provisioned); endpoint_id for softphone and mobile applications """ status: Optional[UpdateDeviceResponseStatus] = None """ Device status """ computer_name: Optional[str] = None """ PC name for softphone """ model: Optional[UpdateDeviceResponseModel] = None """ HardPhone model information """ extension: Optional[UpdateDeviceResponseExtension] = None """ This attribute can be omitted for unassigned devices """ emergency: Optional[UpdateDeviceResponseEmergency] = None """ Device emergency settings """ emergency_service_address: Optional[UpdateDeviceResponseEmergencyServiceAddress] = None """ Address for emergency cases. The same emergency address is assigned to all the numbers of one device """ phone_lines: Optional[List[UpdateDeviceResponsePhoneLinesItem]] = None """ Phone lines information """ shipping: Optional[UpdateDeviceResponseShipping] = None """ Shipping information, according to which devices (in case of HardPhone ) or e911 stickers (in case of SoftPhone and OtherPhone ) will be delivered to the customer """ box_billing_id: Optional[int] = None """ Box billing identifier of a device. Applicable only for HardPhones. It is an alternative way to identify the device to be ordered. EitherT? model structure, or boxBillingId must be specified forT?HardPhone """ use_as_common_phone: Optional[bool] = None """ Supported only for devices assigned to Limited extensions. If true, enables users to log in to this phone as a common phone. """ in_company_net: Optional[bool] = None """ Network location status. 'True' if the device is located in the configured corporate network (On-Net); 'False' for Off-Net location. Parameter is not returned if `EmergencyAddressAutoUpdate` feature is not enabled for the account/user, or if device network location is not determined """ site: Optional[UpdateDeviceResponseSite] = None """ Site data """ last_location_report_time: Optional[str] = None """ Datetime of receiving last location report in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format including timezone, for example *2016-03-10T18:07:52.534Z """ line_pooling: Optional[UpdateDeviceResponseLinePooling] = None """ Pooling type of a deviceHost - device with standalone paid phone line which can be linked to Glip/Softphone instanceGuest - device with a linked phone lineNone - device without a phone line or with specific line (free, BLA, etc.) = ['Host', 'Guest', 'None'] """ billing_statement: Optional[UpdateDeviceResponseBillingStatement] = None """ Billing information. Returned for device update request if `prestatement` query parameter is set to 'true' """ class ListExtensionDevicesLinePooling(Enum): Host = 'Host' Guest = 'Guest' None_ = 'None' class ListExtensionDevicesFeature(Enum): Intercom = 'Intercom' Paging = 'Paging' BLA = 'BLA' HELD = 'HELD' class ListExtensionDevicesResponseRecordsItemType(Enum): """ Device type """ SoftPhone = 'SoftPhone' OtherPhone = 'OtherPhone' HardPhone = 'HardPhone' Paging = 'Paging' class ListExtensionDevicesResponseRecordsItemStatus(Enum): """ Device status """ Offline = 'Offline' Online = 'Online' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionDevicesResponseRecordsItemModelAddonsItem(DataClassJsonMixin): id: Optional[str] = None name: Optional[str] = None count: Optional[int] = None class ListExtensionDevicesResponseRecordsItemModelFeaturesItem(Enum): BLA = 'BLA' CommonPhone = 'CommonPhone' Intercom = 'Intercom' Paging = 'Paging' HELD = 'HELD' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionDevicesResponseRecordsItemModel(DataClassJsonMixin): """ HardPhone model information """ id: Optional[str] = None """ Internal identifier of a HardPhone device model """ name: Optional[str] = None """ Device name """ addons: Optional[List[ListExtensionDevicesResponseRecordsItemModelAddonsItem]] = None """ Addons description """ features: Optional[List[ListExtensionDevicesResponseRecordsItemModelFeaturesItem]] = None """ Device feature or multiple features supported """ line_count: Optional[int] = None """ Max supported count of phone lines """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionDevicesResponseRecordsItemExtension(DataClassJsonMixin): """ This attribute can be omitted for unassigned devices """ id: Optional[int] = None """ Internal identifier of an extension """ uri: Optional[str] = None """ Canonical URI of an extension """ extension_number: Optional[str] = None """ Number of department extension """ partner_id: Optional[str] = None """ For Partner Applications Internal identifier of an extension created by partner. The RingCentral supports the mapping of accounts and stores the corresponding account ID/extension ID for each partner ID of a client application. In request URIs partner IDs are accepted instead of regular RingCentral native IDs as path parameters using pid = XXX clause. Though in response URIs contain the corresponding account IDs and extension IDs. In all request and response bodies these values are reflected via partnerId attributes of account and extension """ class ListExtensionDevicesResponseRecordsItemEmergencyServiceAddressSyncStatus(Enum): """ Resulting status of emergency address synchronization. Returned if `syncEmergencyAddress` parameter is set to 'True' Generated by Python OpenAPI Parser """ Verified = 'Verified' Updated = 'Updated' Deleted = 'Deleted' NotRequired = 'NotRequired' Unsupported = 'Unsupported' Failed = 'Failed' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionDevicesResponseRecordsItemEmergencyServiceAddress(DataClassJsonMixin): """ Address for emergency cases. The same emergency address is assigned to all the numbers of one device Generated by Python OpenAPI Parser """ street: Optional[str] = None street2: Optional[str] = None city: Optional[str] = None zip: Optional[str] = None customer_name: Optional[str] = None state: Optional[str] = None """ State/province name """ state_id: Optional[str] = None """ Internal identifier of a state """ state_iso_code: Optional[str] = None """ ISO code of a state """ state_name: Optional[str] = None """ Full name of a state """ country_id: Optional[str] = None """ Internal identifier of a country """ country_iso_code: Optional[str] = None """ ISO code of a country """ country: Optional[str] = None """ Country name """ country_name: Optional[str] = None """ Full name of a country """ out_of_country: Optional[bool] = None """ Specifies if emergency address is out of country """ sync_status: Optional[ListExtensionDevicesResponseRecordsItemEmergencyServiceAddressSyncStatus] = None """ Resulting status of emergency address synchronization. Returned if `syncEmergencyAddress` parameter is set to 'True' """ additional_customer_name: Optional[str] = None """ Name of an additional contact person. Should be specified for countries except the US, Canada, the UK and Australia. """ customer_email: Optional[str] = None """ Email of a primary contact person (receiver). Should be specified for countries except the US, Canada, the UK and Australia. """ additional_customer_email: Optional[str] = None """ Email of an additional contact person. Should be specified for countries except the US, Canada, the UK and Australia. """ customer_phone: Optional[str] = None """ Phone number of a primary contact person (receiver). Should be specified for countries except the US, Canada, the UK and Australia """ additional_customer_phone: Optional[str] = None """ Phone number of an additional contact person. Should be specified for countries except the US, Canada, the UK & Australia. """ tax_id: Optional[str] = None """ Internal identifier of a tax """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionDevicesResponseRecordsItemEmergencyAddress(DataClassJsonMixin): customer_name: Optional[str] = None """ Name of a customer """ street: Optional[str] = None """ Street address, line 1 - street address, P.O. box, company name, c/o """ street2: Optional[str] = None """ Street address, line 2 - apartment, suite, unit, building, floor, etc. """ city: Optional[str] = None """ City name """ zip: Optional[str] = None """ Zip code """ state: Optional[str] = None """ State/province name """ state_id: Optional[str] = None """ Internal identifier of a state """ state_iso_code: Optional[str] = None """ ISO code of a state """ state_name: Optional[str] = None """ Full name of a state """ country_id: Optional[str] = None """ Internal identifier of a country """ country_iso_code: Optional[str] = None """ ISO code of a country """ country: Optional[str] = None """ Country name """ country_name: Optional[str] = None """ Full name of a country """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionDevicesResponseRecordsItemEmergencyLocation(DataClassJsonMixin): """ Company emergency response location details """ id: Optional[str] = None """ Internal identifier of the emergency response location """ name: Optional[str] = None """ Location name """ class ListExtensionDevicesResponseRecordsItemEmergencyAddressStatus(Enum): """ Emergency address status """ Valid = 'Valid' Invalid = 'Invalid' class ListExtensionDevicesResponseRecordsItemEmergencySyncStatus(Enum): """ Resulting status of emergency address synchronization. Returned if `syncEmergencyAddress` parameter is set to 'True' Generated by Python OpenAPI Parser """ Verified = 'Verified' Updated = 'Updated' Deleted = 'Deleted' NotRequired = 'NotRequired' Unsupported = 'Unsupported' Failed = 'Failed' class ListExtensionDevicesResponseRecordsItemEmergencyAddressEditableStatus(Enum): """ Ability to register new emergency address for a phone line using devices sharing this line or only main device (line owner) Generated by Python OpenAPI Parser """ MainDevice = 'MainDevice' AnyDevice = 'AnyDevice' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionDevicesResponseRecordsItemEmergency(DataClassJsonMixin): """ Device emergency settings """ address: Optional[ListExtensionDevicesResponseRecordsItemEmergencyAddress] = None location: Optional[ListExtensionDevicesResponseRecordsItemEmergencyLocation] = None """ Company emergency response location details """ out_of_country: Optional[bool] = None """ Specifies if emergency address is out of country """ address_status: Optional[ListExtensionDevicesResponseRecordsItemEmergencyAddressStatus] = None """ Emergency address status """ sync_status: Optional[ListExtensionDevicesResponseRecordsItemEmergencySyncStatus] = None """ Resulting status of emergency address synchronization. Returned if `syncEmergencyAddress` parameter is set to 'True' """ address_editable_status: Optional[ListExtensionDevicesResponseRecordsItemEmergencyAddressEditableStatus] = None """ Ability to register new emergency address for a phone line using devices sharing this line or only main device (line owner) """ class ListExtensionDevicesResponseRecordsItemPhoneLinesItemLineType(Enum): """ Type of phone line """ Standalone = 'Standalone' StandaloneFree = 'StandaloneFree' BlaPrimary = 'BlaPrimary' BlaSecondary = 'BlaSecondary' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionDevicesResponseRecordsItemPhoneLinesItemPhoneInfoCountry(DataClassJsonMixin): """ Brief information on a phone number country """ id: Optional[str] = None """ Internal identifier of a home country """ uri: Optional[str] = None """ Canonical URI of a home country """ name: Optional[str] = None """ Official name of a home country """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionDevicesResponseRecordsItemPhoneLinesItemPhoneInfoExtension(DataClassJsonMixin): """ Information on the extension, to which the phone number is assigned. Returned only for the request of Account phone number list Generated by Python OpenAPI Parser """ id: Optional[str] = None """ Internal identifier of an extension """ uri: Optional[str] = None """ Canonical URI of an extension """ extension_number: Optional[str] = None """ Number of department extension """ partner_id: Optional[str] = None """ For Partner Applications Internal identifier of an extension created by partner. The RingCentral supports the mapping of accounts and stores the corresponding account ID/extension ID for each partner ID of a client application. In request URIs partner IDs are accepted instead of regular RingCentral native IDs as path parameters using pid = XXX clause. Though in response URIs contain the corresponding account IDs and extension IDs. In all request and response bodies these values are reflected via partnerId attributes of account and extension """ class ListExtensionDevicesResponseRecordsItemPhoneLinesItemPhoneInfoPaymentType(Enum): """ Payment type. 'External' is returned for forwarded numbers which are not terminated in the RingCentral phone system Generated by Python OpenAPI Parser """ External = 'External' TollFree = 'TollFree' Local = 'Local' class ListExtensionDevicesResponseRecordsItemPhoneLinesItemPhoneInfoType(Enum): """ Phone number type """ VoiceFax = 'VoiceFax' FaxOnly = 'FaxOnly' VoiceOnly = 'VoiceOnly' class ListExtensionDevicesResponseRecordsItemPhoneLinesItemPhoneInfoUsageType(Enum): """ Usage type of the phone number """ MainCompanyNumber = 'MainCompanyNumber' AdditionalCompanyNumber = 'AdditionalCompanyNumber' CompanyNumber = 'CompanyNumber' DirectNumber = 'DirectNumber' CompanyFaxNumber = 'CompanyFaxNumber' ForwardedNumber = 'ForwardedNumber' ForwardedCompanyNumber = 'ForwardedCompanyNumber' ContactCenterNumber = 'ContactCenterNumber' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionDevicesResponseRecordsItemPhoneLinesItemPhoneInfo(DataClassJsonMixin): """ Phone number information """ id: Optional[int] = None """ Internal identifier of a phone number """ country: Optional[ListExtensionDevicesResponseRecordsItemPhoneLinesItemPhoneInfoCountry] = None """ Brief information on a phone number country """ extension: Optional[ListExtensionDevicesResponseRecordsItemPhoneLinesItemPhoneInfoExtension] = None """ Information on the extension, to which the phone number is assigned. Returned only for the request of Account phone number list """ label: Optional[str] = None """ Custom user name of a phone number, if any """ location: Optional[str] = None """ Location (City, State). Filled for local US numbers """ payment_type: Optional[ListExtensionDevicesResponseRecordsItemPhoneLinesItemPhoneInfoPaymentType] = None """ Payment type. 'External' is returned for forwarded numbers which are not terminated in the RingCentral phone system """ phone_number: Optional[str] = None """ Phone number """ status: Optional[str] = None """ Status of a phone number. If the value is 'Normal', the phone number is ready to be used. Otherwise it is an external number not yet ported to RingCentral """ type: Optional[ListExtensionDevicesResponseRecordsItemPhoneLinesItemPhoneInfoType] = None """ Phone number type """ usage_type: Optional[ListExtensionDevicesResponseRecordsItemPhoneLinesItemPhoneInfoUsageType] = None """ Usage type of the phone number """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionDevicesResponseRecordsItemPhoneLinesItemEmergencyAddress(DataClassJsonMixin): required: Optional[bool] = None """ 'True' if specifying of emergency address is required """ local_only: Optional[bool] = None """ 'True' if only local emergency address can be specified """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionDevicesResponseRecordsItemPhoneLinesItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a phone line """ line_type: Optional[ListExtensionDevicesResponseRecordsItemPhoneLinesItemLineType] = None """ Type of phone line """ phone_info: Optional[ListExtensionDevicesResponseRecordsItemPhoneLinesItemPhoneInfo] = None """ Phone number information """ emergency_address: Optional[ListExtensionDevicesResponseRecordsItemPhoneLinesItemEmergencyAddress] = None class ListExtensionDevicesResponseRecordsItemShippingStatus(Enum): """ Shipping status of the order item. It is set to 'Initial' when the order is submitted. Then it is changed to 'Accepted' when a distributor starts processing the order. Finally it is changed to Shipped which means that distributor has shipped the device. Generated by Python OpenAPI Parser """ Initial = 'Initial' Accepted = 'Accepted' Shipped = 'Shipped' WonTShip = "Won't ship" class ListExtensionDevicesResponseRecordsItemShippingMethodId(Enum): """ Method identifier. The default value is 1 (Ground) """ OBJECT_1 = '1' OBJECT_2 = '2' OBJECT_3 = '3' class ListExtensionDevicesResponseRecordsItemShippingMethodName(Enum): """ Method name, corresponding to the identifier """ Ground = 'Ground' OBJECT_2_Day = '2 Day' Overnight = 'Overnight' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionDevicesResponseRecordsItemShippingMethod(DataClassJsonMixin): """ Shipping method information """ id: Optional[ListExtensionDevicesResponseRecordsItemShippingMethodId] = None """ Method identifier. The default value is 1 (Ground) """ name: Optional[ListExtensionDevicesResponseRecordsItemShippingMethodName] = None """ Method name, corresponding to the identifier """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionDevicesResponseRecordsItemShippingAddress(DataClassJsonMixin): """ Shipping address for the order. If it coincides with the Emergency Service Address, then can be omitted. By default the same value as the emergencyServiceAddress. Multiple addresses can be specified; in case an order contains several devices, they can be delivered to different addresses Generated by Python OpenAPI Parser """ customer_name: Optional[str] = None """ Name of a primary contact person (receiver) """ additional_customer_name: Optional[str] = None """ Name of an additional contact person. Should be specified for countries except the US, Canada, the UK and Australia. """ customer_email: Optional[str] = None """ Email of a primary contact person (receiver). Should be specified for countries except the US, Canada, the UK and Australia. """ additional_customer_email: Optional[str] = None """ Email of an additional contact person. Should be specified for countries except the US, Canada, the UK and Australia. """ customer_phone: Optional[str] = None """ Phone number of a primary contact person (receiver). Should be specified for countries except the US, Canada, the UK and Australia """ additional_customer_phone: Optional[str] = None """ Phone number of an additional contact person. Should be specified for countries except the US, Canada, the UK & Australia. """ street: Optional[str] = None """ Street address, line 1 - street address, P.O. box, company name, c/o """ street2: Optional[str] = None """ Street address, line 2 - apartment, suite, unit, building, floor, etc. """ city: Optional[str] = None """ City name """ state: Optional[str] = None """ State/province name """ state_id: Optional[str] = None """ Internal identifier of a state """ state_iso_code: Optional[str] = None """ ISO code of a state """ state_name: Optional[str] = None """ Full name of a state """ country_id: Optional[str] = None """ Internal identifier of a country """ country_iso_code: Optional[str] = None """ ISO code of a country """ country: Optional[str] = None """ Country name """ country_name: Optional[str] = None """ Full name of a country """ zip: Optional[str] = None """ Zip code """ tax_id: Optional[str] = None """ National taxpayer identification number. Should be specified for Brazil (CNPJ/CPF number) and Argentina (CUIT number). """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionDevicesResponseRecordsItemShipping(DataClassJsonMixin): """ Shipping information, according to which devices (in case of HardPhone ) or e911 stickers (in case of SoftPhone and OtherPhone ) will be delivered to the customer Generated by Python OpenAPI Parser """ status: Optional[ListExtensionDevicesResponseRecordsItemShippingStatus] = None """ Shipping status of the order item. It is set to 'Initial' when the order is submitted. Then it is changed to 'Accepted' when a distributor starts processing the order. Finally it is changed to Shipped which means that distributor has shipped the device. """ carrier: Optional[str] = None """ Shipping carrier name. Appears only if the device status is 'Shipped' """ tracking_number: Optional[str] = None """ Carrier-specific tracking number. Appears only if the device status is 'Shipped' """ method: Optional[ListExtensionDevicesResponseRecordsItemShippingMethod] = None """ Shipping method information """ address: Optional[ListExtensionDevicesResponseRecordsItemShippingAddress] = None """ Shipping address for the order. If it coincides with the Emergency Service Address, then can be omitted. By default the same value as the emergencyServiceAddress. Multiple addresses can be specified; in case an order contains several devices, they can be delivered to different addresses """ class ListExtensionDevicesResponseRecordsItemLinePooling(Enum): """ Pooling type of a deviceHost - device with standalone paid phone line which can be linked to Glip/Softphone instanceGuest - device with a linked phone lineNone - device without a phone line or with specific line (free, BLA, etc.) = ['Host', 'Guest', 'None'] Generated by Python OpenAPI Parser """ Host = 'Host' Guest = 'Guest' None_ = 'None' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionDevicesResponseRecordsItemSite(DataClassJsonMixin): """ Site data """ id: Optional[str] = None """ Internal identifier of a site """ name: Optional[str] = None """ Name of a site """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionDevicesResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a device """ uri: Optional[str] = None """ Canonical URI of a device """ sku: Optional[str] = None """ Device identification number (stock keeping unit) in the format TP-ID [-AT-AC], where TP is device type (HP for RC HardPhone, DV for all other devices including softphone); ID - device model ID; AT -addon type ID; AC - addon count (if any). For example 'HP-56-2-2' """ type: Optional[ListExtensionDevicesResponseRecordsItemType] = 'HardPhone' """ Device type """ name: Optional[str] = None """ Device name. Mandatory if ordering SoftPhone or OtherPhone. Optional for HardPhone. If not specified for HardPhone, then device model name is used as device name """ status: Optional[ListExtensionDevicesResponseRecordsItemStatus] = None """ Device status """ serial: Optional[str] = None """ Serial number for HardPhone (is returned only when the phone is shipped and provisioned); endpoint_id for softphone and mobile applications """ computer_name: Optional[str] = None """ PC name for softphone """ model: Optional[ListExtensionDevicesResponseRecordsItemModel] = None """ HardPhone model information """ extension: Optional[ListExtensionDevicesResponseRecordsItemExtension] = None """ This attribute can be omitted for unassigned devices """ emergency_service_address: Optional[ListExtensionDevicesResponseRecordsItemEmergencyServiceAddress] = None """ Address for emergency cases. The same emergency address is assigned to all the numbers of one device """ emergency: Optional[ListExtensionDevicesResponseRecordsItemEmergency] = None """ Device emergency settings """ phone_lines: Optional[List[ListExtensionDevicesResponseRecordsItemPhoneLinesItem]] = None """ Phone lines information """ shipping: Optional[ListExtensionDevicesResponseRecordsItemShipping] = None """ Shipping information, according to which devices (in case of HardPhone ) or e911 stickers (in case of SoftPhone and OtherPhone ) will be delivered to the customer """ box_billing_id: Optional[int] = None """ Box billing identifier of a device. Applicable only for HardPhones. It is an alternative way to identify the device to be ordered. EitherT? model structure, or boxBillingId must be specified forT?HardPhone """ use_as_common_phone: Optional[bool] = None """ Supported only for devices assigned to Limited extensions. If true, enables users to log in to this phone as a common phone. """ line_pooling: Optional[ListExtensionDevicesResponseRecordsItemLinePooling] = None """ Pooling type of a deviceHost - device with standalone paid phone line which can be linked to Glip/Softphone instanceGuest - device with a linked phone lineNone - device without a phone line or with specific line (free, BLA, etc.) = ['Host', 'Guest', 'None'] """ in_company_net: Optional[bool] = None """ Network location status. 'True' if the device is located in the configured corporate network (On-Net); 'False' for Off-Net location. Parameter is not returned if `EmergencyAddressAutoUpdate` feature is not enabled for the account/user, or if device network location is not determined """ site: Optional[ListExtensionDevicesResponseRecordsItemSite] = None """ Site data """ last_location_report_time: Optional[str] = None """ Datetime of receiving last location report in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format including timezone, for example *2016-03-10T18:07:52.534Z """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionDevicesResponseNavigationFirstPage(DataClassJsonMixin): """ Canonical URI for the first page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionDevicesResponseNavigationNextPage(DataClassJsonMixin): """ Canonical URI for the next page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionDevicesResponseNavigationPreviousPage(DataClassJsonMixin): """ Canonical URI for the previous page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionDevicesResponseNavigationLastPage(DataClassJsonMixin): """ Canonical URI for the last page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionDevicesResponseNavigation(DataClassJsonMixin): """ Information on navigation """ first_page: Optional[ListExtensionDevicesResponseNavigationFirstPage] = None """ Canonical URI for the first page of the list """ next_page: Optional[ListExtensionDevicesResponseNavigationNextPage] = None """ Canonical URI for the next page of the list """ previous_page: Optional[ListExtensionDevicesResponseNavigationPreviousPage] = None """ Canonical URI for the previous page of the list """ last_page: Optional[ListExtensionDevicesResponseNavigationLastPage] = None """ Canonical URI for the last page of the list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionDevicesResponsePaging(DataClassJsonMixin): """ Information on paging """ page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) """ per_page: Optional[int] = None """ Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty """ total_pages: Optional[int] = None """ The total number of pages in a dataset. May be omitted for some resources due to performance reasons """ total_elements: Optional[int] = None """ The total number of elements in a dataset. May be omitted for some resource due to performance reasons """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionDevicesResponse(DataClassJsonMixin): """ Required Properties: - navigation - paging - records Generated by Python OpenAPI Parser """ records: List[ListExtensionDevicesResponseRecordsItem] """ List of extension devices """ navigation: ListExtensionDevicesResponseNavigation """ Information on navigation """ paging: ListExtensionDevicesResponsePaging """ Information on paging """ uri: Optional[str] = None """ Link to the list of extension devices """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadServiceProviderConfig2ResponseAuthenticationSchemesItem(DataClassJsonMixin): description: Optional[str] = None documentation_uri: Optional[str] = None name: Optional[str] = None spec_uri: Optional[str] = None primary: Optional[bool] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadServiceProviderConfig2ResponseBulk(DataClassJsonMixin): max_operations: Optional[int] = None max_payload_size: Optional[int] = None supported: Optional[bool] = False @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadServiceProviderConfig2ResponseChangePassword(DataClassJsonMixin): supported: Optional[bool] = False @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadServiceProviderConfig2ResponseEtag(DataClassJsonMixin): supported: Optional[bool] = False @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadServiceProviderConfig2ResponseFilter(DataClassJsonMixin): max_results: Optional[int] = None supported: Optional[bool] = False @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadServiceProviderConfig2ResponsePatch(DataClassJsonMixin): supported: Optional[bool] = False class ReadServiceProviderConfig2ResponseSchemasItem(Enum): UrnIetfParamsScimSchemasCore_2_0_ServiceProviderConfig = 'urn:ietf:params:scim:schemas:core:2.0:ServiceProviderConfig' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadServiceProviderConfig2ResponseSort(DataClassJsonMixin): supported: Optional[bool] = False @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadServiceProviderConfig2ResponseXmlDataFormat(DataClassJsonMixin): supported: Optional[bool] = False @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadServiceProviderConfig2Response(DataClassJsonMixin): authentication_schemes: Optional[List[ReadServiceProviderConfig2ResponseAuthenticationSchemesItem]] = None bulk: Optional[ReadServiceProviderConfig2ResponseBulk] = None change_password: Optional[ReadServiceProviderConfig2ResponseChangePassword] = None etag: Optional[ReadServiceProviderConfig2ResponseEtag] = None filter: Optional[ReadServiceProviderConfig2ResponseFilter] = None patch: Optional[ReadServiceProviderConfig2ResponsePatch] = None schemas: Optional[List[ReadServiceProviderConfig2ResponseSchemasItem]] = None sort: Optional[ReadServiceProviderConfig2ResponseSort] = None xml_data_format: Optional[ReadServiceProviderConfig2ResponseXmlDataFormat] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadServiceProviderConfigResponseAuthenticationSchemesItem(DataClassJsonMixin): description: Optional[str] = None documentation_uri: Optional[str] = None name: Optional[str] = None spec_uri: Optional[str] = None primary: Optional[bool] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadServiceProviderConfigResponseBulk(DataClassJsonMixin): max_operations: Optional[int] = None max_payload_size: Optional[int] = None supported: Optional[bool] = False @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadServiceProviderConfigResponseChangePassword(DataClassJsonMixin): supported: Optional[bool] = False @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadServiceProviderConfigResponseEtag(DataClassJsonMixin): supported: Optional[bool] = False @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadServiceProviderConfigResponseFilter(DataClassJsonMixin): max_results: Optional[int] = None supported: Optional[bool] = False @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadServiceProviderConfigResponsePatch(DataClassJsonMixin): supported: Optional[bool] = False class ReadServiceProviderConfigResponseSchemasItem(Enum): UrnIetfParamsScimSchemasCore_2_0_ServiceProviderConfig = 'urn:ietf:params:scim:schemas:core:2.0:ServiceProviderConfig' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadServiceProviderConfigResponseSort(DataClassJsonMixin): supported: Optional[bool] = False @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadServiceProviderConfigResponseXmlDataFormat(DataClassJsonMixin): supported: Optional[bool] = False @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadServiceProviderConfigResponse(DataClassJsonMixin): authentication_schemes: Optional[List[ReadServiceProviderConfigResponseAuthenticationSchemesItem]] = None bulk: Optional[ReadServiceProviderConfigResponseBulk] = None change_password: Optional[ReadServiceProviderConfigResponseChangePassword] = None etag: Optional[ReadServiceProviderConfigResponseEtag] = None filter: Optional[ReadServiceProviderConfigResponseFilter] = None patch: Optional[ReadServiceProviderConfigResponsePatch] = None schemas: Optional[List[ReadServiceProviderConfigResponseSchemasItem]] = None sort: Optional[ReadServiceProviderConfigResponseSort] = None xml_data_format: Optional[ReadServiceProviderConfigResponseXmlDataFormat] = None class SearchViaGet2Response_ResourcesItemAddressesItemType(Enum): Work = 'work' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SearchViaGet2Response_ResourcesItemAddressesItem(DataClassJsonMixin): """ Required Properties: - type Generated by Python OpenAPI Parser """ type: SearchViaGet2Response_ResourcesItemAddressesItemType country: Optional[str] = None locality: Optional[str] = None postal_code: Optional[str] = None region: Optional[str] = None street_address: Optional[str] = None class SearchViaGet2Response_ResourcesItemEmailsItemType(Enum): Work = 'work' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SearchViaGet2Response_ResourcesItemEmailsItem(DataClassJsonMixin): """ Required Properties: - type - value Generated by Python OpenAPI Parser """ type: SearchViaGet2Response_ResourcesItemEmailsItemType value: str @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SearchViaGet2Response_ResourcesItemName(DataClassJsonMixin): """ Required Properties: - family_name - given_name Generated by Python OpenAPI Parser """ family_name: str given_name: str class SearchViaGet2Response_ResourcesItemPhoneNumbersItemType(Enum): Work = 'work' Mobile = 'mobile' Other = 'other' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SearchViaGet2Response_ResourcesItemPhoneNumbersItem(DataClassJsonMixin): """ Required Properties: - type - value Generated by Python OpenAPI Parser """ type: SearchViaGet2Response_ResourcesItemPhoneNumbersItemType value: str class SearchViaGet2Response_ResourcesItemPhotosItemType(Enum): Photo = 'photo' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SearchViaGet2Response_ResourcesItemPhotosItem(DataClassJsonMixin): """ Required Properties: - type - value Generated by Python OpenAPI Parser """ type: SearchViaGet2Response_ResourcesItemPhotosItemType value: str class SearchViaGet2Response_ResourcesItemSchemasItem(Enum): UrnIetfParamsScimSchemasCore_2_0_User = 'urn:ietf:params:scim:schemas:core:2.0:User' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SearchViaGet2Response_ResourcesItemUrnIetfParamsScimSchemasExtensionEnterprise_2_0_User(DataClassJsonMixin): department: Optional[str] = None class SearchViaGet2Response_ResourcesItemMetaResourceType(Enum): User = 'User' Group = 'Group' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SearchViaGet2Response_ResourcesItemMeta(DataClassJsonMixin): """ resource metadata """ created: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) last_modified: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) location: Optional[str] = None """ resource location URI """ resource_type: Optional[SearchViaGet2Response_ResourcesItemMetaResourceType] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SearchViaGet2Response_ResourcesItem(DataClassJsonMixin): """ Required Properties: - emails - name - schemas - user_name Generated by Python OpenAPI Parser """ emails: List[SearchViaGet2Response_ResourcesItemEmailsItem] name: SearchViaGet2Response_ResourcesItemName schemas: List[SearchViaGet2Response_ResourcesItemSchemasItem] user_name: str """ MUST be same as work type email address """ active: Optional[bool] = False """ user status """ addresses: Optional[List[SearchViaGet2Response_ResourcesItemAddressesItem]] = None external_id: Optional[str] = None """ external unique resource id defined by provisioning client """ id: Optional[str] = None """ unique resource id defined by RingCentral """ phone_numbers: Optional[List[SearchViaGet2Response_ResourcesItemPhoneNumbersItem]] = None photos: Optional[List[SearchViaGet2Response_ResourcesItemPhotosItem]] = None urn_ietf_params_scim_schemas_extension_enterprise_2_0_user: Optional[SearchViaGet2Response_ResourcesItemUrnIetfParamsScimSchemasExtensionEnterprise_2_0_User] = None meta: Optional[SearchViaGet2Response_ResourcesItemMeta] = None """ resource metadata """ class SearchViaGet2ResponseSchemasItem(Enum): UrnIetfParamsScimApiMessages_2_0_ListResponse = 'urn:ietf:params:scim:api:messages:2.0:ListResponse' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SearchViaGet2Response(DataClassJsonMixin): resources: Optional[List[SearchViaGet2Response_ResourcesItem]] = None """ user list """ items_per_page: Optional[int] = None schemas: Optional[List[SearchViaGet2ResponseSchemasItem]] = None start_index: Optional[int] = None total_results: Optional[int] = None class SearchViaGet2ResponseSchemasItem(Enum): UrnIetfParamsScimApiMessages_2_0_Error = 'urn:ietf:params:scim:api:messages:2.0:Error' class SearchViaGet2ResponseScimType(Enum): """ bad request type when status code is 400 """ Uniqueness = 'uniqueness' TooMany = 'tooMany' Mutability = 'mutability' Sensitive = 'sensitive' InvalidSyntax = 'invalidSyntax' InvalidFilter = 'invalidFilter' InvalidPath = 'invalidPath' InvalidValue = 'invalidValue' InvalidVers = 'invalidVers' NoTarget = 'noTarget' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SearchViaGet2Response(DataClassJsonMixin): detail: Optional[str] = None """ detail error message """ schemas: Optional[List[SearchViaGet2ResponseSchemasItem]] = None scim_type: Optional[SearchViaGet2ResponseScimType] = None """ bad request type when status code is 400 """ status: Optional[str] = None """ same as HTTP status code, e.g. 400, 401, etc. """ class SearchViaGet2ResponseSchemasItem(Enum): UrnIetfParamsScimApiMessages_2_0_Error = 'urn:ietf:params:scim:api:messages:2.0:Error' class SearchViaGet2ResponseScimType(Enum): """ bad request type when status code is 400 """ Uniqueness = 'uniqueness' TooMany = 'tooMany' Mutability = 'mutability' Sensitive = 'sensitive' InvalidSyntax = 'invalidSyntax' InvalidFilter = 'invalidFilter' InvalidPath = 'invalidPath' InvalidValue = 'invalidValue' InvalidVers = 'invalidVers' NoTarget = 'noTarget' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SearchViaGet2Response(DataClassJsonMixin): detail: Optional[str] = None """ detail error message """ schemas: Optional[List[SearchViaGet2ResponseSchemasItem]] = None scim_type: Optional[SearchViaGet2ResponseScimType] = None """ bad request type when status code is 400 """ status: Optional[str] = None """ same as HTTP status code, e.g. 400, 401, etc. """ class SearchViaGet2ResponseSchemasItem(Enum): UrnIetfParamsScimApiMessages_2_0_Error = 'urn:ietf:params:scim:api:messages:2.0:Error' class SearchViaGet2ResponseScimType(Enum): """ bad request type when status code is 400 """ Uniqueness = 'uniqueness' TooMany = 'tooMany' Mutability = 'mutability' Sensitive = 'sensitive' InvalidSyntax = 'invalidSyntax' InvalidFilter = 'invalidFilter' InvalidPath = 'invalidPath' InvalidValue = 'invalidValue' InvalidVers = 'invalidVers' NoTarget = 'noTarget' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SearchViaGet2Response(DataClassJsonMixin): detail: Optional[str] = None """ detail error message """ schemas: Optional[List[SearchViaGet2ResponseSchemasItem]] = None scim_type: Optional[SearchViaGet2ResponseScimType] = None """ bad request type when status code is 400 """ status: Optional[str] = None """ same as HTTP status code, e.g. 400, 401, etc. """ class SearchViaGet2ResponseSchemasItem(Enum): UrnIetfParamsScimApiMessages_2_0_Error = 'urn:ietf:params:scim:api:messages:2.0:Error' class SearchViaGet2ResponseScimType(Enum): """ bad request type when status code is 400 """ Uniqueness = 'uniqueness' TooMany = 'tooMany' Mutability = 'mutability' Sensitive = 'sensitive' InvalidSyntax = 'invalidSyntax' InvalidFilter = 'invalidFilter' InvalidPath = 'invalidPath' InvalidValue = 'invalidValue' InvalidVers = 'invalidVers' NoTarget = 'noTarget' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SearchViaGet2Response(DataClassJsonMixin): detail: Optional[str] = None """ detail error message """ schemas: Optional[List[SearchViaGet2ResponseSchemasItem]] = None scim_type: Optional[SearchViaGet2ResponseScimType] = None """ bad request type when status code is 400 """ status: Optional[str] = None """ same as HTTP status code, e.g. 400, 401, etc. """ class SearchViaGet2ResponseSchemasItem(Enum): UrnIetfParamsScimApiMessages_2_0_Error = 'urn:ietf:params:scim:api:messages:2.0:Error' class SearchViaGet2ResponseScimType(Enum): """ bad request type when status code is 400 """ Uniqueness = 'uniqueness' TooMany = 'tooMany' Mutability = 'mutability' Sensitive = 'sensitive' InvalidSyntax = 'invalidSyntax' InvalidFilter = 'invalidFilter' InvalidPath = 'invalidPath' InvalidValue = 'invalidValue' InvalidVers = 'invalidVers' NoTarget = 'noTarget' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SearchViaGet2Response(DataClassJsonMixin): detail: Optional[str] = None """ detail error message """ schemas: Optional[List[SearchViaGet2ResponseSchemasItem]] = None scim_type: Optional[SearchViaGet2ResponseScimType] = None """ bad request type when status code is 400 """ status: Optional[str] = None """ same as HTTP status code, e.g. 400, 401, etc. """ class CreateUser2RequestAddressesItemType(Enum): Work = 'work' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateUser2RequestAddressesItem(DataClassJsonMixin): """ Required Properties: - type Generated by Python OpenAPI Parser """ type: CreateUser2RequestAddressesItemType country: Optional[str] = None locality: Optional[str] = None postal_code: Optional[str] = None region: Optional[str] = None street_address: Optional[str] = None class CreateUser2RequestEmailsItemType(Enum): Work = 'work' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateUser2RequestEmailsItem(DataClassJsonMixin): """ Required Properties: - type - value Generated by Python OpenAPI Parser """ type: CreateUser2RequestEmailsItemType value: str @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateUser2RequestName(DataClassJsonMixin): """ Required Properties: - family_name - given_name Generated by Python OpenAPI Parser """ family_name: str given_name: str class CreateUser2RequestPhoneNumbersItemType(Enum): Work = 'work' Mobile = 'mobile' Other = 'other' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateUser2RequestPhoneNumbersItem(DataClassJsonMixin): """ Required Properties: - type - value Generated by Python OpenAPI Parser """ type: CreateUser2RequestPhoneNumbersItemType value: str class CreateUser2RequestPhotosItemType(Enum): Photo = 'photo' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateUser2RequestPhotosItem(DataClassJsonMixin): """ Required Properties: - type - value Generated by Python OpenAPI Parser """ type: CreateUser2RequestPhotosItemType value: str class CreateUser2RequestSchemasItem(Enum): UrnIetfParamsScimSchemasCore_2_0_User = 'urn:ietf:params:scim:schemas:core:2.0:User' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateUser2RequestUrnIetfParamsScimSchemasExtensionEnterprise_2_0_User(DataClassJsonMixin): department: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateUser2Request(DataClassJsonMixin): """ Required Properties: - emails - name - schemas - user_name Generated by Python OpenAPI Parser """ emails: List[CreateUser2RequestEmailsItem] name: CreateUser2RequestName schemas: List[CreateUser2RequestSchemasItem] user_name: str """ MUST be same as work type email address """ active: Optional[bool] = False """ User status """ addresses: Optional[List[CreateUser2RequestAddressesItem]] = None external_id: Optional[str] = None """ external unique resource id defined by provisioning client """ phone_numbers: Optional[List[CreateUser2RequestPhoneNumbersItem]] = None photos: Optional[List[CreateUser2RequestPhotosItem]] = None urn_ietf_params_scim_schemas_extension_enterprise_2_0_user: Optional[CreateUser2RequestUrnIetfParamsScimSchemasExtensionEnterprise_2_0_User] = None class CreateUser2ResponseAddressesItemType(Enum): Work = 'work' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateUser2ResponseAddressesItem(DataClassJsonMixin): """ Required Properties: - type Generated by Python OpenAPI Parser """ type: CreateUser2ResponseAddressesItemType country: Optional[str] = None locality: Optional[str] = None postal_code: Optional[str] = None region: Optional[str] = None street_address: Optional[str] = None class CreateUser2ResponseEmailsItemType(Enum): Work = 'work' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateUser2ResponseEmailsItem(DataClassJsonMixin): """ Required Properties: - type - value Generated by Python OpenAPI Parser """ type: CreateUser2ResponseEmailsItemType value: str @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateUser2ResponseName(DataClassJsonMixin): """ Required Properties: - family_name - given_name Generated by Python OpenAPI Parser """ family_name: str given_name: str class CreateUser2ResponsePhoneNumbersItemType(Enum): Work = 'work' Mobile = 'mobile' Other = 'other' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateUser2ResponsePhoneNumbersItem(DataClassJsonMixin): """ Required Properties: - type - value Generated by Python OpenAPI Parser """ type: CreateUser2ResponsePhoneNumbersItemType value: str class CreateUser2ResponsePhotosItemType(Enum): Photo = 'photo' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateUser2ResponsePhotosItem(DataClassJsonMixin): """ Required Properties: - type - value Generated by Python OpenAPI Parser """ type: CreateUser2ResponsePhotosItemType value: str class CreateUser2ResponseSchemasItem(Enum): UrnIetfParamsScimSchemasCore_2_0_User = 'urn:ietf:params:scim:schemas:core:2.0:User' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateUser2ResponseUrnIetfParamsScimSchemasExtensionEnterprise_2_0_User(DataClassJsonMixin): department: Optional[str] = None class CreateUser2ResponseMetaResourceType(Enum): User = 'User' Group = 'Group' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateUser2ResponseMeta(DataClassJsonMixin): """ resource metadata """ created: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) last_modified: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) location: Optional[str] = None """ resource location URI """ resource_type: Optional[CreateUser2ResponseMetaResourceType] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateUser2Response(DataClassJsonMixin): """ Required Properties: - emails - name - schemas - user_name Generated by Python OpenAPI Parser """ emails: List[CreateUser2ResponseEmailsItem] name: CreateUser2ResponseName schemas: List[CreateUser2ResponseSchemasItem] user_name: str """ MUST be same as work type email address """ active: Optional[bool] = False """ user status """ addresses: Optional[List[CreateUser2ResponseAddressesItem]] = None external_id: Optional[str] = None """ external unique resource id defined by provisioning client """ id: Optional[str] = None """ unique resource id defined by RingCentral """ phone_numbers: Optional[List[CreateUser2ResponsePhoneNumbersItem]] = None photos: Optional[List[CreateUser2ResponsePhotosItem]] = None urn_ietf_params_scim_schemas_extension_enterprise_2_0_user: Optional[CreateUser2ResponseUrnIetfParamsScimSchemasExtensionEnterprise_2_0_User] = None meta: Optional[CreateUser2ResponseMeta] = None """ resource metadata """ class CreateUser2ResponseSchemasItem(Enum): UrnIetfParamsScimApiMessages_2_0_Error = 'urn:ietf:params:scim:api:messages:2.0:Error' class CreateUser2ResponseScimType(Enum): """ bad request type when status code is 400 """ Uniqueness = 'uniqueness' TooMany = 'tooMany' Mutability = 'mutability' Sensitive = 'sensitive' InvalidSyntax = 'invalidSyntax' InvalidFilter = 'invalidFilter' InvalidPath = 'invalidPath' InvalidValue = 'invalidValue' InvalidVers = 'invalidVers' NoTarget = 'noTarget' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateUser2Response(DataClassJsonMixin): detail: Optional[str] = None """ detail error message """ schemas: Optional[List[CreateUser2ResponseSchemasItem]] = None scim_type: Optional[CreateUser2ResponseScimType] = None """ bad request type when status code is 400 """ status: Optional[str] = None """ same as HTTP status code, e.g. 400, 401, etc. """ class CreateUser2ResponseSchemasItem(Enum): UrnIetfParamsScimApiMessages_2_0_Error = 'urn:ietf:params:scim:api:messages:2.0:Error' class CreateUser2ResponseScimType(Enum): """ bad request type when status code is 400 """ Uniqueness = 'uniqueness' TooMany = 'tooMany' Mutability = 'mutability' Sensitive = 'sensitive' InvalidSyntax = 'invalidSyntax' InvalidFilter = 'invalidFilter' InvalidPath = 'invalidPath' InvalidValue = 'invalidValue' InvalidVers = 'invalidVers' NoTarget = 'noTarget' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateUser2Response(DataClassJsonMixin): detail: Optional[str] = None """ detail error message """ schemas: Optional[List[CreateUser2ResponseSchemasItem]] = None scim_type: Optional[CreateUser2ResponseScimType] = None """ bad request type when status code is 400 """ status: Optional[str] = None """ same as HTTP status code, e.g. 400, 401, etc. """ class CreateUser2ResponseSchemasItem(Enum): UrnIetfParamsScimApiMessages_2_0_Error = 'urn:ietf:params:scim:api:messages:2.0:Error' class CreateUser2ResponseScimType(Enum): """ bad request type when status code is 400 """ Uniqueness = 'uniqueness' TooMany = 'tooMany' Mutability = 'mutability' Sensitive = 'sensitive' InvalidSyntax = 'invalidSyntax' InvalidFilter = 'invalidFilter' InvalidPath = 'invalidPath' InvalidValue = 'invalidValue' InvalidVers = 'invalidVers' NoTarget = 'noTarget' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateUser2Response(DataClassJsonMixin): detail: Optional[str] = None """ detail error message """ schemas: Optional[List[CreateUser2ResponseSchemasItem]] = None scim_type: Optional[CreateUser2ResponseScimType] = None """ bad request type when status code is 400 """ status: Optional[str] = None """ same as HTTP status code, e.g. 400, 401, etc. """ class CreateUser2ResponseSchemasItem(Enum): UrnIetfParamsScimApiMessages_2_0_Error = 'urn:ietf:params:scim:api:messages:2.0:Error' class CreateUser2ResponseScimType(Enum): """ bad request type when status code is 400 """ Uniqueness = 'uniqueness' TooMany = 'tooMany' Mutability = 'mutability' Sensitive = 'sensitive' InvalidSyntax = 'invalidSyntax' InvalidFilter = 'invalidFilter' InvalidPath = 'invalidPath' InvalidValue = 'invalidValue' InvalidVers = 'invalidVers' NoTarget = 'noTarget' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateUser2Response(DataClassJsonMixin): detail: Optional[str] = None """ detail error message """ schemas: Optional[List[CreateUser2ResponseSchemasItem]] = None scim_type: Optional[CreateUser2ResponseScimType] = None """ bad request type when status code is 400 """ status: Optional[str] = None """ same as HTTP status code, e.g. 400, 401, etc. """ class CreateUser2ResponseSchemasItem(Enum): UrnIetfParamsScimApiMessages_2_0_Error = 'urn:ietf:params:scim:api:messages:2.0:Error' class CreateUser2ResponseScimType(Enum): """ bad request type when status code is 400 """ Uniqueness = 'uniqueness' TooMany = 'tooMany' Mutability = 'mutability' Sensitive = 'sensitive' InvalidSyntax = 'invalidSyntax' InvalidFilter = 'invalidFilter' InvalidPath = 'invalidPath' InvalidValue = 'invalidValue' InvalidVers = 'invalidVers' NoTarget = 'noTarget' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateUser2Response(DataClassJsonMixin): detail: Optional[str] = None """ detail error message """ schemas: Optional[List[CreateUser2ResponseSchemasItem]] = None scim_type: Optional[CreateUser2ResponseScimType] = None """ bad request type when status code is 400 """ status: Optional[str] = None """ same as HTTP status code, e.g. 400, 401, etc. """ class CreateUser2ResponseSchemasItem(Enum): UrnIetfParamsScimApiMessages_2_0_Error = 'urn:ietf:params:scim:api:messages:2.0:Error' class CreateUser2ResponseScimType(Enum): """ bad request type when status code is 400 """ Uniqueness = 'uniqueness' TooMany = 'tooMany' Mutability = 'mutability' Sensitive = 'sensitive' InvalidSyntax = 'invalidSyntax' InvalidFilter = 'invalidFilter' InvalidPath = 'invalidPath' InvalidValue = 'invalidValue' InvalidVers = 'invalidVers' NoTarget = 'noTarget' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateUser2Response(DataClassJsonMixin): detail: Optional[str] = None """ detail error message """ schemas: Optional[List[CreateUser2ResponseSchemasItem]] = None scim_type: Optional[CreateUser2ResponseScimType] = None """ bad request type when status code is 400 """ status: Optional[str] = None """ same as HTTP status code, e.g. 400, 401, etc. """ class CreateUser2ResponseSchemasItem(Enum): UrnIetfParamsScimApiMessages_2_0_Error = 'urn:ietf:params:scim:api:messages:2.0:Error' class CreateUser2ResponseScimType(Enum): """ bad request type when status code is 400 """ Uniqueness = 'uniqueness' TooMany = 'tooMany' Mutability = 'mutability' Sensitive = 'sensitive' InvalidSyntax = 'invalidSyntax' InvalidFilter = 'invalidFilter' InvalidPath = 'invalidPath' InvalidValue = 'invalidValue' InvalidVers = 'invalidVers' NoTarget = 'noTarget' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateUser2Response(DataClassJsonMixin): detail: Optional[str] = None """ detail error message """ schemas: Optional[List[CreateUser2ResponseSchemasItem]] = None scim_type: Optional[CreateUser2ResponseScimType] = None """ bad request type when status code is 400 """ status: Optional[str] = None """ same as HTTP status code, e.g. 400, 401, etc. """ class SearchViaGetResponse_ResourcesItemAddressesItemType(Enum): Work = 'work' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class SearchViaGetResponse_ResourcesItemAddressesItem(DataClassJsonMixin): """ Required Properties: - type Generated by Python OpenAPI Parser """ type: SearchViaGetResponse_ResourcesItemAddressesItemType country: Optional[str] = None locality: Optional[str] = None postal_code: Optional[str] = None region: Optional[str] = None street_address: Optional[str] = None
/ringcentral_async_client-1.0.3-py3-none-any.whl/ringcentral_async_client/_code_gen/model/_14.py
0.80871
0.223335
_14.py
pypi
from ._1 import * @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GlipCreatePost(DataClassJsonMixin): activity: Optional[str] = None title: Optional[str] = None """ Title of a message. (Can be set for bot's messages only). """ text: Optional[str] = None """ Text of a post """ group_id: Optional[str] = None """ Internal identifier of a group """ attachments: Optional[List[GlipCreatePostAttachmentsItem]] = None """ List of attachments to be posted """ person_ids: Optional[List[str]] = None system: Optional[bool] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GlipPostTeamBody(DataClassJsonMixin): """ Required Properties: - name Generated by Python OpenAPI Parser """ name: str """ Team name. """ public: Optional[bool] = None """ Team access level. """ description: Optional[str] = None """ Team description. """ members: Optional[List[dict]] = None """ List of glip members """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GlipPatchTeamBody(DataClassJsonMixin): public: Optional[bool] = None """ Team access level """ name: Optional[str] = None """ Team name. Maximum number of characters supported is 250 """ description: Optional[str] = None """ Team description. Maximum number of characters supported is 1000 """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GlipPostsList(DataClassJsonMixin): """ Required Properties: - records Generated by Python OpenAPI Parser """ records: list """ List of posts """ class GetGlipNoteInfoStatus(Enum): """ Note publishing status. Any note is created in 'Draft' status. After it is posted it becomes 'Active' Generated by Python OpenAPI Parser """ Active = 'Active' Draft = 'Draft' class GetGlipNoteInfoType(Enum): Note = 'Note' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetGlipNoteInfo(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a note """ title: Optional[str] = None """ Title of a note """ chat_ids: Optional[List[str]] = None """ Internal identifiers of the chat(s) where the note is posted or shared. """ preview: Optional[str] = None """ Preview of a note (first 150 characters of a body) """ body: Optional[str] = None """ Text of a note """ creator: Optional[dict] = None """ Note creator information """ last_modified_by: Optional[dict] = None """ Note last modification information """ locked_by: Optional[dict] = None """ Returned for the note being edited (locked) at the current moment. Information on the user editing the note """ status: Optional[GetGlipNoteInfoStatus] = None """ Note publishing status. Any note is created in 'Draft' status. After it is posted it becomes 'Active' """ creation_time: Optional[str] = None """ Creation time """ last_modified_time: Optional[str] = None """ Datetime of the note last update """ type: Optional[GetGlipNoteInfoType] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class EditGroupRequest(DataClassJsonMixin): added_person_ids: Optional[List[str]] = None """ List of users to be added to a team """ added_person_emails: Optional[List[str]] = None """ List of user email addresses to be added to a team (i.e. as guests) """ removed_person_ids: Optional[List[str]] = None """ List of users to be removed from a team """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GlipChatsList(DataClassJsonMixin): """ Required Properties: - records Generated by Python OpenAPI Parser """ records: list """ List of chats """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateGlipEveryoneRequest(DataClassJsonMixin): name: Optional[int] = None """ Everyone chat name. Maximum number of characters supported is 250 """ description: Optional[str] = None """ Everyone chat description. Maximum number of characters supported is 1000 """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GlipNotesInfo(DataClassJsonMixin): records: Optional[list] = None class MeetingResponseResourceMeetingType(Enum): Instant = 'Instant' Scheduled = 'Scheduled' ScheduledRecurring = 'ScheduledRecurring' Recurring = 'Recurring' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class MeetingResponseResourceLinks(DataClassJsonMixin): start_uri: Optional[str] = None join_uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class MeetingResponseResourceScheduleTimeZone(DataClassJsonMixin): uri: Optional[str] = None id: Optional[str] = None name: Optional[str] = None description: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class MeetingResponseResourceSchedule(DataClassJsonMixin): start_time: Optional[str] = None duration_in_minutes: Optional[int] = None time_zone: Optional[MeetingResponseResourceScheduleTimeZone] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class MeetingResponseResourceHost(DataClassJsonMixin): uri: Optional[str] = None """ Link to the meeting host resource """ id: Optional[str] = None """ Internal identifier of an extension which is assigned to be a meeting host. The default value is currently logged-in extension identifier """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class MeetingResponseResourceOccurrencesItem(DataClassJsonMixin): id: Optional[str] = None """ Identifier of a meeting occurrence """ start_time: Optional[str] = None """ Starting time of a meeting occurrence """ duration_in_minutes: Optional[int] = None """ Duration of a meeting occurrence """ status: Optional[str] = None """ Status of a meeting occurrence """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class MeetingResponseResource(DataClassJsonMixin): uri: Optional[str] = None uuid: Optional[str] = None id: Optional[str] = None topic: Optional[str] = None meeting_type: Optional[MeetingResponseResourceMeetingType] = None password: Optional[str] = None h323_password: Optional[str] = None status: Optional[str] = None links: Optional[MeetingResponseResourceLinks] = None schedule: Optional[MeetingResponseResourceSchedule] = None host: Optional[MeetingResponseResourceHost] = None allow_join_before_host: Optional[bool] = False start_host_video: Optional[bool] = False start_participants_video: Optional[bool] = False audio_options: Optional[List[str]] = None occurrences: Optional[List[MeetingResponseResourceOccurrencesItem]] = None """ List of meeting occurrences """ class MeetingUserSettingsResponseRecordingAutoRecording(Enum): """ Automatical recording (local/cloud/none) of meetings as they start """ Local = 'local' Cloud = 'cloud' None_ = 'none' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class MeetingUserSettingsResponseRecording(DataClassJsonMixin): local_recording: Optional[bool] = None """ Allows hosts and participants to record a meeting to a local file """ cloud_recording: Optional[bool] = None """ Allows hosts to record and save a meeting/webinar in the cloud """ record_speaker_view: Optional[bool] = False """ Allows to record active speaker with the shared screen """ record_gallery_view: Optional[bool] = False """ Allows to record gallery view with the shared screen """ record_audio_file: Optional[bool] = False """ Allows to record an audio-only file """ save_chat_text: Optional[bool] = False """ Allows to save chat text from a meeting """ show_timestamp: Optional[bool] = False """ Allows to show timestamp on video """ auto_recording: Optional[MeetingUserSettingsResponseRecordingAutoRecording] = 'local' """ Automatical recording (local/cloud/none) of meetings as they start """ auto_delete_cmr: Optional[str] = False """ Automatical deletion of cloud recordings """ auto_delete_cmr_days: Optional[int] = None """ A specified number of days for automatical deletion of cloud recordings, the value range is 1-60 """ class MeetingUserSettingsResponseScheduleMeetingAudioOptionsItem(Enum): Phone = 'Phone' ComputerAudio = 'ComputerAudio' class MeetingUserSettingsResponseScheduleMeetingRequirePasswordForPmiMeetings(Enum): """ Specifies whether to require a password for meetings using Personal Meeting ID (PMI). The supported values are: 'none', 'all' and 'jbhOnly' (joined before host only) Generated by Python OpenAPI Parser """ All = 'all' None_ = 'none' JbhOnly = 'jbhOnly' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class MeetingUserSettingsResponseScheduleMeeting(DataClassJsonMixin): """ Settings defining how to schedule user meetings """ start_host_video: Optional[bool] = None """ Starting meetings with host video on/off (true/false) """ start_participants_video: Optional[bool] = None """ Starting meetings with participant video on/off (true/false) """ audio_options: Optional[List[MeetingUserSettingsResponseScheduleMeetingAudioOptionsItem]] = None """ Determines how participants can join the audio channel of a meeting """ allow_join_before_host: Optional[bool] = None """ Allows participants to join the meeting before the host arrives """ use_pmi_for_scheduled_meetings: Optional[bool] = None """ Determines whether to use Personal Meeting ID (PMI) when scheduling a meeting """ use_pmi_for_instant_meetings: Optional[bool] = None """ Determines whether to use Personal Meeting ID (PMI) when starting an instant meeting """ require_password_for_scheduling_new_meetings: Optional[bool] = None """ A password will be generated when scheduling a meeting and participants will require password to join a meeting. The Personal Meeting ID (PMI) meetings are not included """ require_password_for_scheduled_meetings: Optional[bool] = None """ Specifies whether to require a password for meetings which have already been scheduled """ default_password_for_scheduled_meetings: Optional[str] = None """ Password for already scheduled meetings. Users can set it individually """ require_password_for_instant_meetings: Optional[bool] = None """ A random password will be generated for an instant meeting, if set to 'True'. If you use PMI for your instant meetings, this option will be disabled """ require_password_for_pmi_meetings: Optional[MeetingUserSettingsResponseScheduleMeetingRequirePasswordForPmiMeetings] = None """ Specifies whether to require a password for meetings using Personal Meeting ID (PMI). The supported values are: 'none', 'all' and 'jbhOnly' (joined before host only) """ pmi_password: Optional[str] = None """ The default password for Personal Meeting ID (PMI) meetings """ pstn_password_protected: Optional[bool] = None """ Specifies whether to generate and require a password for participants joining by phone """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class MeetingUserSettingsResponse(DataClassJsonMixin): recording: Optional[MeetingUserSettingsResponseRecording] = None schedule_meeting: Optional[MeetingUserSettingsResponseScheduleMeeting] = None """ Settings defining how to schedule user meetings """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class MeetingServiceInfoRequestExternalUserInfo(DataClassJsonMixin): uri: Optional[str] = None user_id: Optional[str] = None account_id: Optional[str] = None user_type: Optional[int] = None user_token: Optional[str] = None host_key: Optional[str] = None personal_meeting_id: Optional[str] = None personal_link: Optional[str] = None """ Link to the user's personal meeting room, used as an alias for personal meeting URL (with personal meeting ID) Example: `https://meetings.ringcentral.com/my/jsmith` """ use_pmi_for_instant_meetings: Optional[bool] = False """ Enables using personal meeting ID for instant meetings """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class MeetingServiceInfoRequest(DataClassJsonMixin): external_user_info: Optional[MeetingServiceInfoRequestExternalUserInfo] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AssistedUsersResourceRecordsItem(DataClassJsonMixin): id: Optional[str] = None name: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AssistedUsersResource(DataClassJsonMixin): records: Optional[List[AssistedUsersResourceRecordsItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class MeetingsResourcePaging(DataClassJsonMixin): page: Optional[int] = None total_pages: Optional[int] = None per_page: Optional[int] = None total_elements: Optional[int] = None page_start: Optional[int] = None page_end: Optional[int] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class MeetingsResourceNavigationNextPage(DataClassJsonMixin): uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class MeetingsResourceNavigation(DataClassJsonMixin): next_page: Optional[MeetingsResourceNavigationNextPage] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class MeetingsResource(DataClassJsonMixin): uri: Optional[str] = None records: Optional[list] = None paging: Optional[MeetingsResourcePaging] = None navigation: Optional[MeetingsResourceNavigation] = None class MeetingRequestResourceMeetingType(Enum): Instant = 'Instant' Scheduled = 'Scheduled' ScheduledRecurring = 'ScheduledRecurring' Recurring = 'Recurring' class MeetingRequestResourceRecurrenceFrequency(Enum): """ Recurrence time frame """ Daily = 'Daily' Weekly = 'Weekly' Monthly = 'Monthly' class MeetingRequestResourceRecurrenceMonthlyByWeek(Enum): """ Supported together with `weeklyByDay` """ Last = 'Last' First = 'First' Second = 'Second' Third = 'Third' Fourth = 'Fourth' class MeetingRequestResourceRecurrenceWeeklyByDay(Enum): Sunday = 'Sunday' Monday = 'Monday' Tuesday = 'Tuesday' Wednesday = 'Wednesday' Thursday = 'Thursday' Friday = 'Friday' Saturday = 'Saturday' class MeetingRequestResourceRecurrenceWeeklyByDays(Enum): """ Multiple values are supported, should be specified separated by comma """ Sunday = 'Sunday' Monday = 'Monday' Tuesday = 'Tuesday' Wednesday = 'Wednesday' Thursday = 'Thursday' Friday = 'Friday' Saturday = 'Saturday' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class MeetingRequestResourceRecurrence(DataClassJsonMixin): """ Recurrence settings """ frequency: Optional[MeetingRequestResourceRecurrenceFrequency] = None """ Recurrence time frame """ interval: Optional[int] = None """ Reccurence interval. The supported ranges are: 1-90 for `Daily`; 1-12 for `Weekly`; 1-3 for `Monthly` """ monthly_by_week: Optional[MeetingRequestResourceRecurrenceMonthlyByWeek] = None """ Supported together with `weeklyByDay` """ weekly_by_day: Optional[MeetingRequestResourceRecurrenceWeeklyByDay] = None weekly_by_days: Optional[MeetingRequestResourceRecurrenceWeeklyByDays] = None """ Multiple values are supported, should be specified separated by comma """ monthly_by_day: Optional[int] = None """ The supported range is 1-31 """ count: Optional[int] = None """ Number of occurences """ until: Optional[str] = None """ Meeting expiration datetime """ class MeetingRequestResourceAutoRecordType(Enum): """ Automatic record type """ Local = 'local' Cloud = 'cloud' None_ = 'none' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class MeetingRequestResource(DataClassJsonMixin): topic: Optional[str] = None meeting_type: Optional[MeetingRequestResourceMeetingType] = None password: Optional[str] = None allow_join_before_host: Optional[bool] = False start_host_video: Optional[bool] = False start_participants_video: Optional[bool] = False use_personal_meeting_id: Optional[bool] = None audio_options: Optional[List[str]] = None recurrence: Optional[MeetingRequestResourceRecurrence] = None """ Recurrence settings """ auto_record_type: Optional[MeetingRequestResourceAutoRecordType] = 'local' """ Automatic record type """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AccountLockedSettingResponse(DataClassJsonMixin): schedule_meeting: Optional[dict] = None """ Scheduling meeting settings locked on account level """ recording: Optional[dict] = None """ Meeting recording settings locked on account level """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class MeetingServiceInfoResourceDialInNumbersItemCountry(DataClassJsonMixin): uri: Optional[str] = None id: Optional[str] = None name: Optional[str] = None iso_code: Optional[str] = None calling_code: Optional[str] = None emergency_calling: Optional[bool] = False number_selling: Optional[bool] = False login_allowed: Optional[bool] = False @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class MeetingServiceInfoResourceDialInNumbersItem(DataClassJsonMixin): phone_number: Optional[str] = None formatted_number: Optional[str] = None location: Optional[str] = None country: Optional[MeetingServiceInfoResourceDialInNumbersItemCountry] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class MeetingServiceInfoResource(DataClassJsonMixin): uri: Optional[str] = None support_uri: Optional[str] = None intl_dial_in_numbers_uri: Optional[str] = None dial_in_numbers: Optional[List[MeetingServiceInfoResourceDialInNumbersItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AssistantsResourceRecordsItem(DataClassJsonMixin): id: Optional[str] = None name: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AssistantsResource(DataClassJsonMixin): records: Optional[List[AssistantsResourceRecordsItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class PublicMeetingInvitationResponse(DataClassJsonMixin): invitation: Optional[str] = None """ Meeting invitation """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class RecordsCollectionResourceSubscriptionResponseRecordsItemDisabledFiltersItem(DataClassJsonMixin): filter: Optional[str] = None """ Event filter that is disabled for the user """ reason: Optional[str] = None """ Reason why the filter is disabled for the user """ message: Optional[str] = None """ Error message """ class RecordsCollectionResourceSubscriptionResponseRecordsItemStatus(Enum): """ Subscription status """ Active = 'Active' Suspended = 'Suspended' Blacklisted = 'Blacklisted' class RecordsCollectionResourceSubscriptionResponseRecordsItemDeliveryModeTransportType(Enum): """ Notifications transportation provider name """ PubNub = 'PubNub' WebHook = 'WebHook' RC_APNS = 'RC/APNS' RC_GCM = 'RC/GCM' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class RecordsCollectionResourceSubscriptionResponseRecordsItemDeliveryMode(DataClassJsonMixin): """ Delivery mode data """ encryption: Optional[bool] = None """ Optional parameter. Specifies if the message will be encrypted or not """ address: Optional[str] = None """ PubNub channel name """ subscriber_key: Optional[str] = None """ PubNub subscriber credentials required to subscribe to the channel """ secret_key: Optional[str] = None """ PubNub subscriber credentials required to subscribe to the channel. Optional (for PubNub transport type only) """ encryption_algorithm: Optional[str] = None """ Encryption algorithm 'AES' (for PubNub transport type only) """ encryption_key: Optional[str] = None """ Key for notification message decryption (for PubNub transport type only) """ transport_type: Optional[RecordsCollectionResourceSubscriptionResponseRecordsItemDeliveryModeTransportType] = None """ Notifications transportation provider name """ certificate_name: Optional[str] = None """ Name of a certificate. Supported for 'RC/APNS' and 'RC/GCM' transport types """ registration_id: Optional[str] = None """ Identifier of a registration. Supported for 'RC/APNS' and 'RC/GCM' transport types """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class RecordsCollectionResourceSubscriptionResponseRecordsItemBlacklistedData(DataClassJsonMixin): """ Returned if WebHook subscription is blacklisted """ blacklisted_at: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Time of adding subscrition to a black list in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format including timezone, for example *2016-03-10T18:07:52.534Z* """ reason: Optional[str] = None """ Reason for adding subscrition to a black list """ class RecordsCollectionResourceSubscriptionResponseRecordsItemTransportType(Enum): """ Notifications transportation provider name """ PubNub = 'PubNub' WebHook = 'WebHook' RC_APNS = 'RC/APNS' RC_GCM = 'RC/GCM' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class RecordsCollectionResourceSubscriptionResponseRecordsItem(DataClassJsonMixin): """ Required Properties: - delivery_mode Generated by Python OpenAPI Parser """ delivery_mode: RecordsCollectionResourceSubscriptionResponseRecordsItemDeliveryMode """ Delivery mode data """ id: Optional[str] = None """ Internal identifier of a subscription """ uri: Optional[str] = None """ Canonical URI of a subscription """ event_filters: Optional[List[str]] = None """ Collection of API resources (message-store/presence/detailed presence) corresponding to events the user is subscribed to """ disabled_filters: Optional[List[RecordsCollectionResourceSubscriptionResponseRecordsItemDisabledFiltersItem]] = None """ Collection of API resources (message-store/presence/detailed presence) corresponding to events the user is not subscribed to due to certain limitations """ expiration_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Subscription expiration datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format including timezone, for example 2016-03-10T18:07:52.534Z """ expires_in: Optional[int] = 900 """ Subscription lifetime in seconds """ status: Optional[RecordsCollectionResourceSubscriptionResponseRecordsItemStatus] = None """ Subscription status """ creation_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Subscription creation datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format including timezone, for example 2016-03-10T18:07:52.534Z """ blacklisted_data: Optional[RecordsCollectionResourceSubscriptionResponseRecordsItemBlacklistedData] = None """ Returned if WebHook subscription is blacklisted """ transport_type: Optional[RecordsCollectionResourceSubscriptionResponseRecordsItemTransportType] = None """ Notifications transportation provider name """ certificate_name: Optional[str] = None """ Name of a certificate. Supported for 'RC/APNS' and 'RC/GCM' transport types """ registration_id: Optional[str] = None """ Identifier of a registration. Supported for 'RC/APNS' and 'RC/GCM' transport types """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class RecordsCollectionResourceSubscriptionResponse(DataClassJsonMixin): uri: Optional[str] = None records: Optional[List[RecordsCollectionResourceSubscriptionResponseRecordsItem]] = None class CreateSubscriptionRequestDeliveryModeTransportType(Enum): """ Notifications transportation provider name """ PubNub = 'PubNub' WebHook = 'WebHook' RC_APNS = 'RC/APNS' RC_GCM = 'RC/GCM' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSubscriptionRequestDeliveryMode(DataClassJsonMixin): """ Notification delivery settings """ transport_type: Optional[CreateSubscriptionRequestDeliveryModeTransportType] = None """ Notifications transportation provider name """ address: Optional[str] = None """ Mandatory for 'WebHook' transport type, URL of a consumer service (cannot be changed during subscription update) """ encryption: Optional[bool] = None """ Optional parameter. Specifies if the message will be encrypted or not. If request contains any presence event filter the value by default is 'True' (even if specified as 'false'). If request contains only message event filters the value by default is 'False' """ certificate_name: Optional[str] = None """ Name of a certificate. Supported for 'RC/APNS' and 'RC/GCM' transport types """ registration_id: Optional[str] = None """ Identifier of a registration. Supported for 'RC/APNS' and 'RC/GCM' transport types """ verification_token: Optional[str] = None """ Verification key of a subscription ensuring data security. Supported for 'Webhook' transport type """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSubscriptionRequest(DataClassJsonMixin): """ Required Properties: - delivery_mode - event_filters Generated by Python OpenAPI Parser """ event_filters: List[str] """ Collection of URIs to API resources """ delivery_mode: CreateSubscriptionRequestDeliveryMode """ Notification delivery settings """ expires_in: Optional[int] = 604800 """ Subscription lifetime in seconds. Max value is 7 days (604800 sec). For *WebHook* transport type max value might be set up to 630720000 seconds (20 years) """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ModifySubscriptionRequest(DataClassJsonMixin): """ Required Properties: - event_filters Generated by Python OpenAPI Parser """ event_filters: List[str] """ Collection of URIs to API resources """ delivery_mode: Optional[dict] = None """ Notification delivery settings """ expires_in: Optional[int] = 604800 """ Subscription lifetime in seconds. Max value is 7 days (604800 sec). For *WebHook* transport type max value might be set up to 630720000 seconds (20 years) """ class AuthProfileResourcePermissionsItemPermissionSiteCompatible(Enum): """ Site compatibility flag set for permission """ Compatible = 'Compatible' Incompatible = 'Incompatible' Independent = 'Independent' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AuthProfileResourcePermissionsItemPermission(DataClassJsonMixin): uri: Optional[str] = None id: Optional[str] = None site_compatible: Optional[AuthProfileResourcePermissionsItemPermissionSiteCompatible] = None """ Site compatibility flag set for permission """ read_only: Optional[bool] = None """ Specifies if the permission is editable on UI (if set to 'True') or not (if set to 'False') """ assignable: Optional[bool] = None """ Specifies if the permission can be assigned by the account administrator """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AuthProfileResourcePermissionsItemEffectiveRole(DataClassJsonMixin): uri: Optional[str] = None id: Optional[str] = None class AuthProfileResourcePermissionsItemScopesItem(Enum): Account = 'Account' AllExtensions = 'AllExtensions' Federation = 'Federation' NonUserExtensions = 'NonUserExtensions' RoleBased = 'RoleBased' Self = 'Self' UserExtensions = 'UserExtensions' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AuthProfileResourcePermissionsItem(DataClassJsonMixin): permission: Optional[AuthProfileResourcePermissionsItemPermission] = None effective_role: Optional[AuthProfileResourcePermissionsItemEffectiveRole] = None scopes: Optional[List[AuthProfileResourcePermissionsItemScopesItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AuthProfileResource(DataClassJsonMixin): uri: Optional[str] = None permissions: Optional[List[AuthProfileResourcePermissionsItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AuthProfileCheckResource(DataClassJsonMixin): uri: Optional[str] = None successful: Optional[bool] = False class AnsweringRuleInfoType(Enum): """ Type of an answering rule """ BusinessHours = 'BusinessHours' AfterHours = 'AfterHours' Custom = 'Custom' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AnsweringRuleInfoScheduleWeeklyRangesMondayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AnsweringRuleInfoScheduleWeeklyRanges(DataClassJsonMixin): """ Weekly schedule """ monday: Optional[List[AnsweringRuleInfoScheduleWeeklyRangesMondayItem]] = None """ Time intervals for a particular day """ tuesday: Optional[list] = None """ Time intervals for a particular day """ wednesday: Optional[list] = None """ Time intervals for a particular day """ thursday: Optional[list] = None """ Time intervals for a particular day """ friday: Optional[list] = None """ Time intervals for a particular day """ saturday: Optional[list] = None """ Time intervals for a particular day """ sunday: Optional[list] = None """ Time intervals for a particular day """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AnsweringRuleInfoScheduleRangesItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Starting datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), for example *2018-10-29T14:00:00*, *2018-10-29T14:00:00Z*, *2018-10-29T14:00:00+0100* """ to: Optional[str] = None """ Ending datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), for example *2018-10-29T14:00:00*, *2018-10-29T14:00:00Z*, *2018-10-29T14:00:00+0100* """ class AnsweringRuleInfoScheduleRef(Enum): """ The user's schedule specified for business hours or after hours; it can also be set/retrieved calling the corresponding method Generated by Python OpenAPI Parser """ BusinessHours = 'BusinessHours' AfterHours = 'AfterHours' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AnsweringRuleInfoSchedule(DataClassJsonMixin): """ Schedule when an answering rule should be applied """ weekly_ranges: Optional[AnsweringRuleInfoScheduleWeeklyRanges] = None """ Weekly schedule """ ranges: Optional[List[AnsweringRuleInfoScheduleRangesItem]] = None """ Specific data ranges """ ref: Optional[AnsweringRuleInfoScheduleRef] = None """ The user's schedule specified for business hours or after hours; it can also be set/retrieved calling the corresponding method """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AnsweringRuleInfoCalledNumbersItem(DataClassJsonMixin): phone_number: Optional[str] = None """ Called phone number """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AnsweringRuleInfoCallersItem(DataClassJsonMixin): caller_id: Optional[str] = None """ Phone number of a caller """ name: Optional[str] = None """ Contact name of a caller """ class AnsweringRuleInfoCallHandlingAction(Enum): """ Specifies how incoming calls are forwarded """ ForwardCalls = 'ForwardCalls' UnconditionalForwarding = 'UnconditionalForwarding' AgentQueue = 'AgentQueue' TransferToExtension = 'TransferToExtension' TakeMessagesOnly = 'TakeMessagesOnly' PlayAnnouncementOnly = 'PlayAnnouncementOnly' SharedLines = 'SharedLines' class AnsweringRuleInfoForwardingRingingMode(Enum): """ Specifies the order in which forwarding numbers ring. 'Sequentially' means that forwarding numbers are ringing one at a time, in order of priority. 'Simultaneously' means that forwarding numbers are ring all at the same time Generated by Python OpenAPI Parser """ Sequentially = 'Sequentially' Simultaneously = 'Simultaneously' class AnsweringRuleInfoForwardingRulesItemForwardingNumbersItemLabel(Enum): """ Forwarding/Call flip number title """ Business_Mobile_Phone = 'Business Mobile Phone' class AnsweringRuleInfoForwardingRulesItemForwardingNumbersItemType(Enum): """ Type of a forwarding number """ Home = 'Home' Mobile = 'Mobile' Work = 'Work' PhoneLine = 'PhoneLine' Outage = 'Outage' Other = 'Other' BusinessMobilePhone = 'BusinessMobilePhone' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AnsweringRuleInfoForwardingRulesItemForwardingNumbersItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a forwarding number """ uri: Optional[str] = None """ Canonical URI of a forwarding/call flip phone number """ phone_number: Optional[str] = None """ Forwarding/Call flip phone number """ label: Optional[AnsweringRuleInfoForwardingRulesItemForwardingNumbersItemLabel] = None """ Forwarding/Call flip number title """ type: Optional[AnsweringRuleInfoForwardingRulesItemForwardingNumbersItemType] = None """ Type of a forwarding number """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AnsweringRuleInfoForwardingRulesItem(DataClassJsonMixin): index: Optional[int] = None """ Forwarding number (or group) ordinal """ ring_count: Optional[int] = None """ Number of rings for a forwarding number (or group) """ enabled: Optional[bool] = None """ Forwarding number status. Returned only if `showInactiveNumbers` is set to `true` """ forwarding_numbers: Optional[List[AnsweringRuleInfoForwardingRulesItemForwardingNumbersItem]] = None """ Forwarding number (or group) data """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AnsweringRuleInfoForwarding(DataClassJsonMixin): """ Forwarding parameters. Returned if 'ForwardCalls' is specified in 'callHandlingAction'. These settings determine the forwarding numbers to which the call will be forwarded Generated by Python OpenAPI Parser """ notify_my_soft_phones: Optional[bool] = None """ Specifies if the user's softphone(s) are notified before forwarding the incoming call to desk phones and forwarding numbers """ notify_admin_soft_phones: Optional[bool] = None """ Specifies if the administrator's softphone is notified before forwarding the incoming call to desk phones and forwarding numbers. The default value is 'False' """ soft_phones_ring_count: Optional[int] = None """ Number of rings before forwarding starts """ ringing_mode: Optional[AnsweringRuleInfoForwardingRingingMode] = None """ Specifies the order in which forwarding numbers ring. 'Sequentially' means that forwarding numbers are ringing one at a time, in order of priority. 'Simultaneously' means that forwarding numbers are ring all at the same time """ rules: Optional[List[AnsweringRuleInfoForwardingRulesItem]] = None """ Information on a call forwarding rule """ mobile_timeout: Optional[bool] = None """ Specifies if mobile timeout is activated for the rule """ class AnsweringRuleInfoUnconditionalForwardingAction(Enum): """ Event that initiates forwarding to the specified phone number """ HoldTimeExpiration = 'HoldTimeExpiration' MaxCallers = 'MaxCallers' NoAnswer = 'NoAnswer' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AnsweringRuleInfoUnconditionalForwarding(DataClassJsonMixin): """ Unconditional forwarding parameters. Returned if 'UnconditionalForwarding' is specified in 'callHandlingAction' Generated by Python OpenAPI Parser """ phone_number: Optional[str] = None """ Phone number to which the call is forwarded. In addition to common e.164 format, the following number patterns are supported: 11xxxxxxxxxxx, 444xxxxxxxxxxx, 616xxxxxxxxxxx; where xxxxxxxxxxx is a phone number in e.164 format (without '+' sign) """ action: Optional[AnsweringRuleInfoUnconditionalForwardingAction] = None """ Event that initiates forwarding to the specified phone number """ class AnsweringRuleInfoQueueTransferMode(Enum): """ Specifies how calls are transferred to group members """ Rotating = 'Rotating' Simultaneous = 'Simultaneous' FixedOrder = 'FixedOrder' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AnsweringRuleInfoQueueTransferItemExtension(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an extension the call is transferred to """ name: Optional[str] = None """ Extension name """ extension_number: Optional[str] = None """ Extension number """ class AnsweringRuleInfoQueueTransferItemAction(Enum): """ Event that initiates transferring to the specified extension """ HoldTimeExpiration = 'HoldTimeExpiration' MaxCallers = 'MaxCallers' NoAnswer = 'NoAnswer' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AnsweringRuleInfoQueueTransferItem(DataClassJsonMixin): extension: Optional[AnsweringRuleInfoQueueTransferItemExtension] = None action: Optional[AnsweringRuleInfoQueueTransferItemAction] = None """ Event that initiates transferring to the specified extension """ class AnsweringRuleInfoQueueNoAnswerAction(Enum): """ Specifies the type of action to be taken if: members are available but no one answers, or all members are busy/unavailable. This option is available for Business hours only. For simultaneous transfer mode only 'WaitPrimaryMembers' and 'WaitPrimaryAndOverflowMembers' are supported Generated by Python OpenAPI Parser """ WaitPrimaryMembers = 'WaitPrimaryMembers' WaitPrimaryAndOverflowMembers = 'WaitPrimaryAndOverflowMembers' Voicemail = 'Voicemail' TransferToExtension = 'TransferToExtension' UnconditionalForwarding = 'UnconditionalForwarding' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AnsweringRuleInfoQueueFixedOrderAgentsItemExtension(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an extension """ uri: Optional[str] = None """ Canonical URI of an extension """ extension_number: Optional[str] = None """ Number of department extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AnsweringRuleInfoQueueFixedOrderAgentsItem(DataClassJsonMixin): extension: Optional[AnsweringRuleInfoQueueFixedOrderAgentsItemExtension] = None index: Optional[int] = None """ Ordinal of an agent (call queue member) """ class AnsweringRuleInfoQueueHoldAudioInterruptionMode(Enum): """ Connecting audio interruption mode """ Never = 'Never' WhenMusicEnds = 'WhenMusicEnds' Periodically = 'Periodically' class AnsweringRuleInfoQueueHoldTimeExpirationAction(Enum): """ Specifies the type of action to be taken after the hold time (waiting for an available call queue member) expires. If 'TransferToExtension' option is selected, the extension specified in `transfer` field is used. The default value is `Voicemail` Generated by Python OpenAPI Parser """ TransferToExtension = 'TransferToExtension' UnconditionalForwarding = 'UnconditionalForwarding' Voicemail = 'Voicemail' class AnsweringRuleInfoQueueMaxCallersAction(Enum): """ Specifies the type of action to be taken if count of callers on hold exceeds the supported maximum Generated by Python OpenAPI Parser """ Voicemail = 'Voicemail' Announcement = 'Announcement' TransferToExtension = 'TransferToExtension' UnconditionalForwarding = 'UnconditionalForwarding' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AnsweringRuleInfoQueue(DataClassJsonMixin): """ Queue settings applied for department (call queue) extension type, with the 'AgentQueue' value specified as a call handling action Generated by Python OpenAPI Parser """ transfer_mode: Optional[AnsweringRuleInfoQueueTransferMode] = None """ Specifies how calls are transferred to group members """ transfer: Optional[List[AnsweringRuleInfoQueueTransferItem]] = None """ Call transfer information """ no_answer_action: Optional[AnsweringRuleInfoQueueNoAnswerAction] = None """ Specifies the type of action to be taken if: members are available but no one answers, or all members are busy/unavailable. This option is available for Business hours only. For simultaneous transfer mode only 'WaitPrimaryMembers' and 'WaitPrimaryAndOverflowMembers' are supported """ fixed_order_agents: Optional[List[AnsweringRuleInfoQueueFixedOrderAgentsItem]] = None """ Information on a call forwarding rule """ hold_audio_interruption_mode: Optional[AnsweringRuleInfoQueueHoldAudioInterruptionMode] = None """ Connecting audio interruption mode """ hold_audio_interruption_period: Optional[int] = None """ Connecting audio interruption message period in seconds """ hold_time_expiration_action: Optional[AnsweringRuleInfoQueueHoldTimeExpirationAction] = 'Voicemail' """ Specifies the type of action to be taken after the hold time (waiting for an available call queue member) expires. If 'TransferToExtension' option is selected, the extension specified in `transfer` field is used. The default value is `Voicemail` """ agent_timeout: Optional[int] = None """ Maximum time in seconds to wait for a call queue member before trying the next member """ wrap_up_time: Optional[int] = None """ Minimum post-call wrap up time in seconds before agent status is automatically set; the value range is from 180 to 300 """ hold_time: Optional[int] = None """ Maximum hold time in seconds to wait for an available call queue member """ max_callers: Optional[int] = None """ Maximum count of callers on hold; the limitation is 25 callers """ max_callers_action: Optional[AnsweringRuleInfoQueueMaxCallersAction] = None """ Specifies the type of action to be taken if count of callers on hold exceeds the supported maximum """ unconditional_forwarding: Optional[List[dict]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AnsweringRuleInfoTransferExtension(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an extension """ uri: Optional[str] = None """ Canonical URI of an extension """ extension_number: Optional[str] = None """ Number of department extension """ partner_id: Optional[str] = None """ For Partner Applications Internal identifier of an extension created by partner. The RingCentral supports the mapping of accounts and stores the corresponding account ID/extension ID for each partner ID of a client application. In request URIs partner IDs are accepted instead of regular RingCentral native IDs as path parameters using pid = XXX clause. Though in response URIs contain the corresponding account IDs and extension IDs. In all request and response bodies these values are reflected via partnerId attributes of account and extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AnsweringRuleInfoTransfer(DataClassJsonMixin): """ Transfer settings applied for department (call queue) extension type, with 'TransferToExtension' call handling action Generated by Python OpenAPI Parser """ extension: Optional[AnsweringRuleInfoTransferExtension] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AnsweringRuleInfoVoicemailRecipient(DataClassJsonMixin): """ Recipient data """ uri: Optional[str] = None """ Link to a recipient extension resource """ id: Optional[int] = None """ Internal identifier of a recipient extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AnsweringRuleInfoVoicemail(DataClassJsonMixin): """ Specifies whether to take a voicemail and who should do it """ enabled: Optional[bool] = None """ If 'True' then voicemails are allowed to be received """ recipient: Optional[AnsweringRuleInfoVoicemailRecipient] = None """ Recipient data """ class AnsweringRuleInfoGreetingsItemType(Enum): """ Type of a greeting, specifying the case when the greeting is played. """ Introductory = 'Introductory' Announcement = 'Announcement' ConnectingMessage = 'ConnectingMessage' ConnectingAudio = 'ConnectingAudio' Voicemail = 'Voicemail' Unavailable = 'Unavailable' InterruptPrompt = 'InterruptPrompt' HoldMusic = 'HoldMusic' Custom = 'Custom' Company = 'Company' BlockedCallersSpecific = 'BlockedCallersSpecific' BlockedCallersAll = 'BlockedCallersAll' BlockedNoCallerId = 'BlockedNoCallerId' BlockedPayPhones = 'BlockedPayPhones' StartRecording = 'StartRecording' StopRecording = 'StopRecording' AutomaticRecording = 'AutomaticRecording' class AnsweringRuleInfoGreetingsItemUsageType(Enum): """ Usage type of a greeting, specifying if the greeting is applied to user extension or department extension. Generated by Python OpenAPI Parser """ UserExtensionAnsweringRule = 'UserExtensionAnsweringRule' ExtensionAnsweringRule = 'ExtensionAnsweringRule' DepartmentExtensionAnsweringRule = 'DepartmentExtensionAnsweringRule' CompanyAnsweringRule = 'CompanyAnsweringRule' CompanyAfterHoursAnsweringRule = 'CompanyAfterHoursAnsweringRule' VoicemailExtensionAnsweringRule = 'VoicemailExtensionAnsweringRule' AnnouncementExtensionAnsweringRule = 'AnnouncementExtensionAnsweringRule' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AnsweringRuleInfoGreetingsItemPreset(DataClassJsonMixin): uri: Optional[str] = None """ Link to a greeting resource """ id: Optional[str] = None """ Internal identifier of a greeting """ name: Optional[str] = None """ Name of a greeting """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AnsweringRuleInfoGreetingsItemCustom(DataClassJsonMixin): uri: Optional[str] = None """ Link to a custom user greeting """ id: Optional[str] = None """ Internal identifier of a custom user greeting """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AnsweringRuleInfoGreetingsItem(DataClassJsonMixin): type: Optional[AnsweringRuleInfoGreetingsItemType] = None """ Type of a greeting, specifying the case when the greeting is played. """ usage_type: Optional[AnsweringRuleInfoGreetingsItemUsageType] = None """ Usage type of a greeting, specifying if the greeting is applied to user extension or department extension. """ preset: Optional[AnsweringRuleInfoGreetingsItemPreset] = None custom: Optional[AnsweringRuleInfoGreetingsItemCustom] = None class AnsweringRuleInfoScreening(Enum): """ Call screening status. 'Off' - no call screening; 'NoCallerId' - if caller ID is missing, then callers are asked to say their name before connecting; 'UnknownCallerId' - if caller ID is not in contact list, then callers are asked to say their name before connecting; 'Always' - the callers are always asked to say their name before connecting. The default value is 'Off' Generated by Python OpenAPI Parser """ Off = 'Off' NoCallerId = 'NoCallerId' UnknownCallerId = 'UnknownCallerId' Always = 'Always' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AnsweringRuleInfoSharedLines(DataClassJsonMixin): """ SharedLines call handling action settings """ timeout: Optional[int] = None """ Number of seconds to wait before forwarding unanswered calls. The value range is 10 - 80 """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AnsweringRuleInfo(DataClassJsonMixin): uri: Optional[str] = None """ Canonical URI to an answering rule resource """ id: Optional[str] = None """ Internal identifier of an answering rule """ type: Optional[AnsweringRuleInfoType] = None """ Type of an answering rule """ name: Optional[str] = None """ Name of an answering rule specified by user """ enabled: Optional[bool] = None """ Specifies if an answering rule is active or inactive """ schedule: Optional[AnsweringRuleInfoSchedule] = None """ Schedule when an answering rule should be applied """ called_numbers: Optional[List[AnsweringRuleInfoCalledNumbersItem]] = None """ Answering rules are applied when calling to selected number(s) """ callers: Optional[List[AnsweringRuleInfoCallersItem]] = None """ Answering rules are applied when calls are received from specified caller(s) """ call_handling_action: Optional[AnsweringRuleInfoCallHandlingAction] = None """ Specifies how incoming calls are forwarded """ forwarding: Optional[AnsweringRuleInfoForwarding] = None """ Forwarding parameters. Returned if 'ForwardCalls' is specified in 'callHandlingAction'. These settings determine the forwarding numbers to which the call will be forwarded """ unconditional_forwarding: Optional[AnsweringRuleInfoUnconditionalForwarding] = None """ Unconditional forwarding parameters. Returned if 'UnconditionalForwarding' is specified in 'callHandlingAction' """ queue: Optional[AnsweringRuleInfoQueue] = None """ Queue settings applied for department (call queue) extension type, with the 'AgentQueue' value specified as a call handling action """ transfer: Optional[AnsweringRuleInfoTransfer] = None """ Transfer settings applied for department (call queue) extension type, with 'TransferToExtension' call handling action """ voicemail: Optional[AnsweringRuleInfoVoicemail] = None """ Specifies whether to take a voicemail and who should do it """ greetings: Optional[List[AnsweringRuleInfoGreetingsItem]] = None """ Greetings applied for an answering rule; only predefined greetings can be applied, see Dictionary Greeting List """ screening: Optional[AnsweringRuleInfoScreening] = None """ Call screening status. 'Off' - no call screening; 'NoCallerId' - if caller ID is missing, then callers are asked to say their name before connecting; 'UnknownCallerId' - if caller ID is not in contact list, then callers are asked to say their name before connecting; 'Always' - the callers are always asked to say their name before connecting. The default value is 'Off' """ shared_lines: Optional[AnsweringRuleInfoSharedLines] = None """ SharedLines call handling action settings """ class CustomCompanyGreetingInfoType(Enum): """ Type of a company greeting """ Company = 'Company' StartRecording = 'StartRecording' StopRecording = 'StopRecording' AutomaticRecording = 'AutomaticRecording' class CustomCompanyGreetingInfoContentType(Enum): """ Content media type """ AudioMpeg = 'audio/mpeg' AudioWav = 'audio/wav' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CustomCompanyGreetingInfoAnsweringRule(DataClassJsonMixin): """ Information on an answering rule that the greeting is applied to """ uri: Optional[str] = None """ Canonical URI of an answering rule """ id: Optional[str] = None """ Internal identifier of an answering rule """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CustomCompanyGreetingInfoLanguage(DataClassJsonMixin): """ Information on a greeting language. Supported for types 'StopRecording', 'StartRecording', 'AutomaticRecording' Generated by Python OpenAPI Parser """ id: Optional[str] = None """ Internal identifier of a greeting language """ uri: Optional[str] = None """ Link to a greeting language """ name: Optional[str] = None """ Name of a greeting language """ locale_code: Optional[str] = None """ Locale code of a greeting language """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CustomCompanyGreetingInfo(DataClassJsonMixin): uri: Optional[str] = None """ Link to an extension custom greeting """ id: Optional[str] = None """ Internal identifier of an answering rule """ type: Optional[CustomCompanyGreetingInfoType] = None """ Type of a company greeting """ content_type: Optional[CustomCompanyGreetingInfoContentType] = None """ Content media type """ content_uri: Optional[str] = None """ Link to a greeting content (audio file) """ answering_rule: Optional[CustomCompanyGreetingInfoAnsweringRule] = None """ Information on an answering rule that the greeting is applied to """ language: Optional[CustomCompanyGreetingInfoLanguage] = None """ Information on a greeting language. Supported for types 'StopRecording', 'StartRecording', 'AutomaticRecording' """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateIVRPromptRequest(DataClassJsonMixin): filename: Optional[str] = None """ Name of a file to be uploaded as a prompt """ class GetExtensionForwardingNumberListResponseRecordsItemLabel(Enum): """ Forwarding/Call flip number title """ Business_Mobile_Phone = 'Business Mobile Phone' class GetExtensionForwardingNumberListResponseRecordsItemFeaturesItem(Enum): CallFlip = 'CallFlip' CallForwarding = 'CallForwarding' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetExtensionForwardingNumberListResponseRecordsItemDevice(DataClassJsonMixin): """ Forwarding device information """ id: Optional[str] = None """ Internal identifier of the other extension device """ class GetExtensionForwardingNumberListResponseRecordsItemType(Enum): """ Forwarding phone number type """ Home = 'Home' Mobile = 'Mobile' Work = 'Work' PhoneLine = 'PhoneLine' Outage = 'Outage' Other = 'Other' BusinessMobilePhone = 'BusinessMobilePhone' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetExtensionForwardingNumberListResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a forwarding/call flip phone number """ uri: Optional[str] = None """ Canonical URI of a forwarding/call flip phone number """ phone_number: Optional[str] = None """ Forwarding/Call flip phone number """ label: Optional[GetExtensionForwardingNumberListResponseRecordsItemLabel] = None """ Forwarding/Call flip number title """ features: Optional[List[GetExtensionForwardingNumberListResponseRecordsItemFeaturesItem]] = None """ Type of option this phone number is used for. Multiple values are accepted """ flip_number: Optional[str] = None """ Number assigned to the call flip phone number, corresponds to the shortcut dial number """ device: Optional[GetExtensionForwardingNumberListResponseRecordsItemDevice] = None """ Forwarding device information """ type: Optional[GetExtensionForwardingNumberListResponseRecordsItemType] = None """ Forwarding phone number type """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetExtensionForwardingNumberListResponseNavigationFirstPage(DataClassJsonMixin): """ Canonical URI for the first page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetExtensionForwardingNumberListResponseNavigation(DataClassJsonMixin): """ Information on navigation """ first_page: Optional[GetExtensionForwardingNumberListResponseNavigationFirstPage] = None """ Canonical URI for the first page of the list """ next_page: Optional[dict] = None """ Canonical URI for the next page of the list """ previous_page: Optional[dict] = None """ Canonical URI for the previous page of the list """ last_page: Optional[dict] = None """ Canonical URI for the last page of the list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetExtensionForwardingNumberListResponsePaging(DataClassJsonMixin): """ Information on paging """ page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) """ per_page: Optional[int] = None """ Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty """ total_pages: Optional[int] = None """ The total number of pages in a dataset. May be omitted for some resources due to performance reasons """ total_elements: Optional[int] = None """ The total number of elements in a dataset. May be omitted for some resource due to performance reasons """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetExtensionForwardingNumberListResponse(DataClassJsonMixin): uri: Optional[str] = None """ Link to the forwarding number list resource """ records: Optional[List[GetExtensionForwardingNumberListResponseRecordsItem]] = None """ List of forwarding phone numbers """ navigation: Optional[GetExtensionForwardingNumberListResponseNavigation] = None """ Information on navigation """ paging: Optional[GetExtensionForwardingNumberListResponsePaging] = None """ Information on paging """ class BlockedAllowedPhoneNumbersListRecordsItemStatus(Enum): """ Status of a phone number """ Blocked = 'Blocked' Allowed = 'Allowed' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class BlockedAllowedPhoneNumbersListRecordsItem(DataClassJsonMixin): """ Information on a blocked/allowed phone number """ uri: Optional[str] = None """ Link to a blocked/allowed phone number """ id: Optional[str] = None """ Internal identifier of a blocked/allowed phone number """ phone_number: Optional[str] = None """ A blocked/allowed phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) format """ label: Optional[str] = None """ Custom name of a blocked/allowed phone number """ status: Optional[BlockedAllowedPhoneNumbersListRecordsItemStatus] = None """ Status of a phone number """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class BlockedAllowedPhoneNumbersList(DataClassJsonMixin): """ List of blocked or allowed phone numbers """ uri: Optional[str] = None """ Link to a list of blocked/allowed phone numbers resource """ records: Optional[List[BlockedAllowedPhoneNumbersListRecordsItem]] = None navigation: Optional[dict] = None """ Information on navigation """ paging: Optional[dict] = None """ Information on paging """ class CreateForwardingNumberRequestType(Enum): """ Forwarding/Call flip phone type. If specified, 'label' attribute value is ignored. The default value is 'Other' Generated by Python OpenAPI Parser """ PhoneLine = 'PhoneLine' Home = 'Home' Mobile = 'Mobile' Work = 'Work' Other = 'Other' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateForwardingNumberRequest(DataClassJsonMixin): flip_number: Optional[int] = None """ Number assigned to the call flip phone number, corresponds to the shortcut dial number """ phone_number: Optional[str] = None """ Forwarding/Call flip phone number """ label: Optional[str] = None """ Forwarding/Call flip number title """ type: Optional[CreateForwardingNumberRequestType] = None """ Forwarding/Call flip phone type. If specified, 'label' attribute value is ignored. The default value is 'Other' """ device: Optional[dict] = None """ Reference to the other extension device. Applicable for 'PhoneLine' type only. Cannot be specified together with 'phoneNumber' parameter. """ class CustomAnsweringRuleInfoType(Enum): """ Type of an answering rule """ BusinessHours = 'BusinessHours' AfterHours = 'AfterHours' Custom = 'Custom' class CustomAnsweringRuleInfoCallHandlingAction(Enum): """ Specifies how incoming calls are forwarded """ ForwardCalls = 'ForwardCalls' UnconditionalForwarding = 'UnconditionalForwarding' AgentQueue = 'AgentQueue' TransferToExtension = 'TransferToExtension' TakeMessagesOnly = 'TakeMessagesOnly' PlayAnnouncementOnly = 'PlayAnnouncementOnly' SharedLines = 'SharedLines' class CustomAnsweringRuleInfoScreening(Enum): """ Call screening status. 'Off' - no call screening; 'NoCallerId' - if caller ID is missing, then callers are asked to say their name before connecting; 'UnknownCallerId' - if caller ID is not in contact list, then callers are asked to say their name before connecting; 'Always' - the callers are always asked to say their name before connecting. The default value is 'Off' Generated by Python OpenAPI Parser """ Off = 'Off' NoCallerId = 'NoCallerId' UnknownCallerId = 'UnknownCallerId' Always = 'Always' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CustomAnsweringRuleInfo(DataClassJsonMixin): uri: Optional[str] = None """ Canonical URI to an answering rule resource """ id: Optional[str] = None """ Internal identifier of an answering rule """ type: Optional[CustomAnsweringRuleInfoType] = None """ Type of an answering rule """ name: Optional[str] = None """ Name of an answering rule specified by user """ enabled: Optional[bool] = None """ Specifies if an answering rule is active or inactive """ schedule: Optional[dict] = None """ Schedule when an answering rule should be applied """ called_numbers: Optional[list] = None """ Answering rules are applied when calling to selected number(s) """ callers: Optional[list] = None """ Answering rules are applied when calls are received from specified caller(s) """ call_handling_action: Optional[CustomAnsweringRuleInfoCallHandlingAction] = None """ Specifies how incoming calls are forwarded """ forwarding: Optional[dict] = None """ Forwarding parameters. Returned if 'ForwardCalls' is specified in 'callHandlingAction'. These settings determine the forwarding numbers to which the call will be forwarded """ unconditional_forwarding: Optional[dict] = None """ Unconditional forwarding parameters. Returned if 'UnconditionalForwarding' is specified in 'callHandlingAction' """ queue: Optional[dict] = None """ Queue settings applied for department (call queue) extension type, with the 'AgentQueue' value specified as a call handling action """ transfer: Optional[dict] = None """ Transfer settings applied for department (call queue) extension type, with 'TransferToExtension' call handling action """ voicemail: Optional[dict] = None """ Specifies whether to take a voicemail and who should do it """ greetings: Optional[list] = None """ Greetings applied for an answering rule; only predefined greetings can be applied, see Dictionary Greeting List """ screening: Optional[CustomAnsweringRuleInfoScreening] = None """ Call screening status. 'Off' - no call screening; 'NoCallerId' - if caller ID is missing, then callers are asked to say their name before connecting; 'UnknownCallerId' - if caller ID is not in contact list, then callers are asked to say their name before connecting; 'Always' - the callers are always asked to say their name before connecting. The default value is 'Off' """ shared_lines: Optional[dict] = None """ SharedLines call handling action settings """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CompanyBusinessHoursSchedule(DataClassJsonMixin): """ Schedule when an answering rule is applied """ weekly_ranges: Optional[dict] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CompanyBusinessHours(DataClassJsonMixin): """ Example: ```json { "uri": "https.../restapi/v1.0/account/401800045008/business-hours", "schedule": { "weeklyRanges": { "wednesday": [ { "from": "09:00", "to": "18:00" } ], "friday": [ { "from": "09:00", "to": "18:00" } ], "tuesday": [ { "from": "09:00", "to": "18:00" } ], "monday": [ { "from": "09:00", "to": "18:00" } ], "thursday": [ { "from": "09:00", "to": "18:00" } ] } } } ``` Generated by Python OpenAPI Parser """ uri: Optional[str] = None """ Canonical URI of a business-hours resource """ schedule: Optional[CompanyBusinessHoursSchedule] = None """ Schedule when an answering rule is applied """ class CustomUserGreetingInfoType(Enum): """ Type of a custom user greeting """ Introductory = 'Introductory' Announcement = 'Announcement' InterruptPrompt = 'InterruptPrompt' ConnectingAudio = 'ConnectingAudio' ConnectingMessage = 'ConnectingMessage' Voicemail = 'Voicemail' Unavailable = 'Unavailable' HoldMusic = 'HoldMusic' PronouncedName = 'PronouncedName' class CustomUserGreetingInfoContentType(Enum): """ Content media type """ AudioMpeg = 'audio/mpeg' AudioWav = 'audio/wav' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CustomUserGreetingInfo(DataClassJsonMixin): uri: Optional[str] = None """ Link to a custom user greeting """ id: Optional[str] = None """ Internal identifier of a custom user greeting """ type: Optional[CustomUserGreetingInfoType] = None """ Type of a custom user greeting """ content_type: Optional[CustomUserGreetingInfoContentType] = None """ Content media type """ content_uri: Optional[str] = None """ Link to a greeting content (audio file) """ answering_rule: Optional[dict] = None """ Information on an answering rule that the greeting is applied to """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class PromptInfo(DataClassJsonMixin): uri: Optional[str] = None """ Internal identifier of a prompt """ id: Optional[str] = None """ Link to a prompt metadata """ content_type: Optional[str] = None """ Type of a prompt media content """ content_uri: Optional[str] = None """ Link to a prompt media content """ filename: Optional[str] = None """ Name of a prompt """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UserBusinessHoursUpdateResponseSchedule(DataClassJsonMixin): """ Schedule when an answering rule is applied """ weekly_ranges: Optional[dict] = None """ Weekly schedule """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UserBusinessHoursUpdateResponse(DataClassJsonMixin): uri: Optional[str] = None """ Canonical URI of a business-hours resource """ schedule: Optional[UserBusinessHoursUpdateResponseSchedule] = None """ Schedule when an answering rule is applied """ class CallerBlockingSettingsUpdateMode(Enum): """ Call blocking options: either specific or all calls and faxes """ Specific = 'Specific' All = 'All' class CallerBlockingSettingsUpdateNoCallerId(Enum): """ Determines how to handle calls with no caller ID in 'Specific' mode """ BlockCallsAndFaxes = 'BlockCallsAndFaxes' BlockFaxes = 'BlockFaxes' Allow = 'Allow' class CallerBlockingSettingsUpdatePayPhones(Enum): """ Blocking settings for pay phones """ Block = 'Block' Allow = 'Allow' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallerBlockingSettingsUpdateGreetingsItem(DataClassJsonMixin): type: Optional[str] = None """ Type of a greeting """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallerBlockingSettingsUpdate(DataClassJsonMixin): """ Returns the lists of blocked and allowed phone numbers """ mode: Optional[CallerBlockingSettingsUpdateMode] = None """ Call blocking options: either specific or all calls and faxes """ no_caller_id: Optional[CallerBlockingSettingsUpdateNoCallerId] = None """ Determines how to handle calls with no caller ID in 'Specific' mode """ pay_phones: Optional[CallerBlockingSettingsUpdatePayPhones] = None """ Blocking settings for pay phones """ greetings: Optional[List[CallerBlockingSettingsUpdateGreetingsItem]] = None """ List of greetings played for blocked callers """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleRequestCallersItem(DataClassJsonMixin): caller_id: Optional[str] = None """ Phone number of a caller """ name: Optional[str] = None """ Contact name of a caller """ class CreateAnsweringRuleRequestCallHandlingAction(Enum): """ Specifies how incoming calls are forwarded """ ForwardCalls = 'ForwardCalls' UnconditionalForwarding = 'UnconditionalForwarding' AgentQueue = 'AgentQueue' TransferToExtension = 'TransferToExtension' TakeMessagesOnly = 'TakeMessagesOnly' PlayAnnouncementOnly = 'PlayAnnouncementOnly' SharedLines = 'SharedLines' class CreateAnsweringRuleRequestScreening(Enum): """ Call screening status. 'Off' - no call screening; 'NoCallerId' - if caller ID is missing, then callers are asked to say their name before connecting; 'UnknownCallerId' - if caller ID is not in contact list, then callers are asked to say their name before connecting; 'Always' - the callers are always asked to say their name before connecting. The default value is 'Off' Generated by Python OpenAPI Parser """ Off = 'Off' NoCallerId = 'NoCallerId' UnknownCallerId = 'UnknownCallerId' Always = 'Always' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleRequest(DataClassJsonMixin): enabled: Optional[bool] = None """ Specifies if the rule is active or inactive. The default value is 'True' """ type: Optional[str] = None """ Type of an answering rule. The 'Custom' value should be specified """ name: Optional[str] = None """ Name of an answering rule specified by user """ callers: Optional[List[CreateAnsweringRuleRequestCallersItem]] = None """ Answering rule will be applied when calls are received from the specified caller(s) """ called_numbers: Optional[list] = None """ Answering rules are applied when calling to selected number(s) """ schedule: Optional[dict] = None """ Schedule when an answering rule should be applied """ call_handling_action: Optional[CreateAnsweringRuleRequestCallHandlingAction] = None """ Specifies how incoming calls are forwarded """ forwarding: Optional[dict] = None """ Forwarding parameters. Returned if 'ForwardCalls' is specified in 'callHandlingAction'. These settings determine the forwarding numbers to which the call will be forwarded """ unconditional_forwarding: Optional[dict] = None """ Unconditional forwarding parameters. Returned if 'UnconditionalForwarding' is specified in 'callHandlingAction' """ queue: Optional[dict] = None """ Queue settings applied for department (call queue) extension type, with the 'AgentQueue' value specified as a call handling action """ transfer: Optional[dict] = None """ Transfer settings applied for department (call queue) extension type, with 'TransferToExtension' call handling action """ voicemail: Optional[dict] = None """ Specifies whether to take a voicemail and who should do it """ greetings: Optional[list] = None """ Greetings applied for an answering rule; only predefined greetings can be applied, see Dictionary Greeting List """ screening: Optional[CreateAnsweringRuleRequestScreening] = None """ Call screening status. 'Off' - no call screening; 'NoCallerId' - if caller ID is missing, then callers are asked to say their name before connecting; 'UnknownCallerId' - if caller ID is not in contact list, then callers are asked to say their name before connecting; 'Always' - the callers are always asked to say their name before connecting. The default value is 'Off' """ class DictionaryGreetingListRecordsItemUsageType(Enum): """ Usage type of a greeting, specifying if the greeting is applied for user extension or department extension. Generated by Python OpenAPI Parser """ UserExtensionAnsweringRule = 'UserExtensionAnsweringRule' ExtensionAnsweringRule = 'ExtensionAnsweringRule' DepartmentExtensionAnsweringRule = 'DepartmentExtensionAnsweringRule' BlockedCalls = 'BlockedCalls' CallRecording = 'CallRecording' CompanyAnsweringRule = 'CompanyAnsweringRule' CompanyAfterHoursAnsweringRule = 'CompanyAfterHoursAnsweringRule' LimitedExtensionAnsweringRule = 'LimitedExtensionAnsweringRule' VoicemailExtensionAnsweringRule = 'VoicemailExtensionAnsweringRule' AnnouncementExtensionAnsweringRule = 'AnnouncementExtensionAnsweringRule' SharedLinesGroupAnsweringRule = 'SharedLinesGroupAnsweringRule' class DictionaryGreetingListRecordsItemType(Enum): """ Type of a greeting, specifying the case when the greeting is played. """ Introductory = 'Introductory' Announcement = 'Announcement' AutomaticRecording = 'AutomaticRecording' BlockedCallersAll = 'BlockedCallersAll' BlockedCallersSpecific = 'BlockedCallersSpecific' BlockedNoCallerId = 'BlockedNoCallerId' BlockedPayPhones = 'BlockedPayPhones' ConnectingMessage = 'ConnectingMessage' ConnectingAudio = 'ConnectingAudio' StartRecording = 'StartRecording' StopRecording = 'StopRecording' Voicemail = 'Voicemail' Unavailable = 'Unavailable' InterruptPrompt = 'InterruptPrompt' HoldMusic = 'HoldMusic' Company = 'Company' class DictionaryGreetingListRecordsItemCategory(Enum): """ Category of a greeting, specifying data form. The category value 'None' specifies that greetings of a certain type ('Introductory', 'ConnectingAudio', etc.) are switched off for an extension = ['Music', 'Message', 'RingTones', 'None'] Generated by Python OpenAPI Parser """ Music = 'Music' Message = 'Message' RingTones = 'RingTones' None_ = 'None' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class DictionaryGreetingListRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a greeting """ uri: Optional[str] = None """ Link to a greeting """ name: Optional[str] = None """ Name of a greeting """ usage_type: Optional[DictionaryGreetingListRecordsItemUsageType] = None """ Usage type of a greeting, specifying if the greeting is applied for user extension or department extension. """ text: Optional[str] = None """ Text of a greeting, if any """ content_uri: Optional[str] = None """ Link to a greeting content (audio file), if any """ type: Optional[DictionaryGreetingListRecordsItemType] = None """ Type of a greeting, specifying the case when the greeting is played. """ category: Optional[DictionaryGreetingListRecordsItemCategory] = None """ Category of a greeting, specifying data form. The category value 'None' specifies that greetings of a certain type ('Introductory', 'ConnectingAudio', etc.) are switched off for an extension = ['Music', 'Message', 'RingTones', 'None'] """ navigation: Optional[dict] = None """ Information on navigation """ paging: Optional[dict] = None """ Information on paging """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class DictionaryGreetingList(DataClassJsonMixin): uri: Optional[str] = None """ Canonical URI of greetings list resource """ records: Optional[List[DictionaryGreetingListRecordsItem]] = None """ List of greetings """ navigation: Optional[dict] = None """ Information on navigation """ paging: Optional[dict] = None """ Information on paging """ class BulkAccountCallRecordingsResourceAddedExtensionsItemCallDirection(Enum): """ Direction of call """ Outbound = 'Outbound' Inbound = 'Inbound' All = 'All' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class BulkAccountCallRecordingsResourceAddedExtensionsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an extension """ uri: Optional[str] = None extension_number: Optional[str] = None type: Optional[str] = None call_direction: Optional[BulkAccountCallRecordingsResourceAddedExtensionsItemCallDirection] = None """ Direction of call """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class BulkAccountCallRecordingsResource(DataClassJsonMixin): added_extensions: Optional[List[BulkAccountCallRecordingsResourceAddedExtensionsItem]] = None updated_extensions: Optional[List[dict]] = None removed_extensions: Optional[List[dict]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UserBusinessHoursUpdateRequest(DataClassJsonMixin): schedule: Optional[dict] = None """ Schedule when an answering rule is applied """ class UpdateForwardingNumberRequestLabel(Enum): """ Forwarding/Call flip number title """ Business_Mobile_Phone = 'Business Mobile Phone' class UpdateForwardingNumberRequestType(Enum): """ Forwarding phone number type """ Home = 'Home' Mobile = 'Mobile' Work = 'Work' PhoneLine = 'PhoneLine' Outage = 'Outage' Other = 'Other' BusinessMobilePhone = 'BusinessMobilePhone' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateForwardingNumberRequest(DataClassJsonMixin): phone_number: Optional[str] = None """ Forwarding/Call flip phone number """ label: Optional[UpdateForwardingNumberRequestLabel] = None """ Forwarding/Call flip number title """ flip_number: Optional[str] = None """ Number assigned to the call flip phone number, corresponds to the shortcut dial number """ type: Optional[UpdateForwardingNumberRequestType] = None """ Forwarding phone number type """ class UserAnsweringRuleListRecordsItemType(Enum): """ Type of an answering rule """ BusinessHours = 'BusinessHours' AfterHours = 'AfterHours' Custom = 'Custom' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UserAnsweringRuleListRecordsItem(DataClassJsonMixin): uri: Optional[str] = None """ Canonical URI to an answering rule resource Example: `https://platform.ringcentral.com/restapi/v1.0/account/240913004/extension/240972004/answering-rule/business-hours-rule` """ id: Optional[str] = None """ Internal identifier of an asnwering rule Example: `business-hours-rule` """ type: Optional[UserAnsweringRuleListRecordsItemType] = None """ Type of an answering rule """ name: Optional[str] = None """ Name of an answering rule specified by user """ enabled: Optional[bool] = None """ Specifies if an answering rule is active or inactive """ shared_lines: Optional[dict] = None """ SharedLines call handling action settings """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UserAnsweringRuleListPaging(DataClassJsonMixin): page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) Example: `1` """ total_pages: Optional[int] = None """ The total number of pages in a dataset. Example: `1` """ per_page: Optional[int] = None """ Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied Example: `100` """ total_elements: Optional[int] = None """ The total number of elements in a dataset. Example: `1` """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty Example: `0` """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty Example: `0` """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UserAnsweringRuleListNavigationFirstPage(DataClassJsonMixin): uri: Optional[str] = None """ Example: `https://platform.ringcentral.com/restapi/v1.0/account/240913004/extension/240972004/answering-rule?page=1&perPage=100` """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UserAnsweringRuleListNavigation(DataClassJsonMixin): first_page: Optional[UserAnsweringRuleListNavigationFirstPage] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UserAnsweringRuleList(DataClassJsonMixin): uri: Optional[str] = None """ Canonical URI of an answering rule list resource Example: `https://platform.ringcentral.com/restapi/v1.0/account/240913004/extension/240972004/answering-rule?page=1&perPage=100` """ records: Optional[List[UserAnsweringRuleListRecordsItem]] = None """ List of answering rules """ paging: Optional[UserAnsweringRuleListPaging] = None navigation: Optional[UserAnsweringRuleListNavigation] = None class IVRMenuInfoPromptMode(Enum): """ Prompt mode: custom media or text """ Audio = 'Audio' TextToSpeech = 'TextToSpeech' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class IVRMenuInfoPromptAudio(DataClassJsonMixin): """ For 'Audio' mode only. Prompt media reference """ uri: Optional[str] = None """ Link to a prompt audio file """ id: Optional[str] = None """ Internal identifier of a prompt """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class IVRMenuInfoPromptLanguage(DataClassJsonMixin): """ For 'TextToSpeech' mode only. Prompt language metadata """ uri: Optional[str] = None """ Link to a prompt language """ id: Optional[str] = None """ Internal identifier of a language """ name: Optional[str] = None """ Language name """ locale_code: Optional[str] = None """ Language locale code """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class IVRMenuInfoPrompt(DataClassJsonMixin): """ Prompt metadata """ mode: Optional[IVRMenuInfoPromptMode] = None """ Prompt mode: custom media or text """ audio: Optional[IVRMenuInfoPromptAudio] = None """ For 'Audio' mode only. Prompt media reference """ text: Optional[str] = None """ For 'TextToSpeech' mode only. Prompt text """ language: Optional[IVRMenuInfoPromptLanguage] = None """ For 'TextToSpeech' mode only. Prompt language metadata """ class IVRMenuInfoActionsItemAction(Enum): """ Internal identifier of an answering rule """ Connect = 'Connect' Voicemail = 'Voicemail' DialByName = 'DialByName' Transfer = 'Transfer' Repeat = 'Repeat' ReturnToRoot = 'ReturnToRoot' ReturnToPrevious = 'ReturnToPrevious' Disconnect = 'Disconnect' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class IVRMenuInfoActionsItemExtension(DataClassJsonMixin): """ For 'Connect' or 'Voicemail' actions only. Extension reference """ uri: Optional[str] = None """ Link to an extension resource """ id: Optional[str] = None """ Internal identifier of an extension """ name: Optional[str] = None """ Name of an extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class IVRMenuInfoActionsItem(DataClassJsonMixin): input: Optional[str] = None """ Key. The following values are supported: numeric: '1' to '9' Star Hash NoInput """ action: Optional[IVRMenuInfoActionsItemAction] = None """ Internal identifier of an answering rule """ extension: Optional[IVRMenuInfoActionsItemExtension] = None """ For 'Connect' or 'Voicemail' actions only. Extension reference """ phone_number: Optional[str] = None """ For 'Transfer' action only. PSTN number in E.164 format """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class IVRMenuInfo(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an IVR Menu extension """ uri: Optional[str] = None """ Link to an IVR Menu extension resource """ name: Optional[str] = None """ First name of an IVR Menu user """ extension_number: Optional[str] = None """ Number of an IVR Menu extension """ site: Optional[str] = None """ Site data """ prompt: Optional[IVRMenuInfoPrompt] = None """ Prompt metadata """ actions: Optional[List[IVRMenuInfoActionsItem]] = None """ Keys handling settings """ class CallRecordingCustomGreetingsRecordsItemType(Enum): StartRecording = 'StartRecording' StopRecording = 'StopRecording' AutomaticRecording = 'AutomaticRecording' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallRecordingCustomGreetingsRecordsItemCustom(DataClassJsonMixin): """ Custom greeting data """ uri: Optional[str] = None """ Link to a custom company greeting """ id: Optional[str] = None """ Internal identifier of a custom company greeting """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallRecordingCustomGreetingsRecordsItemLanguage(DataClassJsonMixin): """ Custom greeting language """ uri: Optional[str] = None """ Link to a language """ id: Optional[str] = None """ Internal identifier of a language """ name: Optional[str] = None """ Language name """ locale_code: Optional[str] = None """ Language locale code """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallRecordingCustomGreetingsRecordsItem(DataClassJsonMixin): type: Optional[CallRecordingCustomGreetingsRecordsItemType] = None custom: Optional[CallRecordingCustomGreetingsRecordsItemCustom] = None """ Custom greeting data """ language: Optional[CallRecordingCustomGreetingsRecordsItemLanguage] = None """ Custom greeting language """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallRecordingCustomGreetings(DataClassJsonMixin): """ Returns data on call recording custom greetings. """ records: Optional[List[CallRecordingCustomGreetingsRecordsItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CompanyBusinessHoursUpdateRequest(DataClassJsonMixin): """ Example: ```json { "schedule": { "weeklyRanges": { "tuesday": [ { "from": "09:00", "to": "18:00" } ], "friday": [ { "from": "09:00", "to": "18:00" } ], "thursday": [ { "from": "09:00", "to": "18:00" } ], "wednesday": [ { "from": "09:00", "to": "18:00" } ], "monday": [ { "from": "09:00", "to": "18:00" } ] } } } ``` Generated by Python OpenAPI Parser """ schedule: Optional[dict] = None """ Schedule when an answering rule is applied """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallRecordingExtensionsRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an extension """ uri: Optional[str] = None """ Link to an extension resource """ extension_number: Optional[str] = None """ Number of an extension """ name: Optional[str] = None """ Name of an extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallRecordingExtensions(DataClassJsonMixin): uri: Optional[str] = None """ Link to call recording extension list resource """ records: Optional[List[CallRecordingExtensionsRecordsItem]] = None navigation: Optional[dict] = None """ Information on navigation """ paging: Optional[dict] = None """ Information on paging """ class CompanyAnsweringRuleRequestType(Enum): """ Type of an answering rule, the default value is 'Custom' = ['BusinessHours', 'AfterHours', 'Custom'] Generated by Python OpenAPI Parser """ BusinessHours = 'BusinessHours' AfterHours = 'AfterHours' Custom = 'Custom' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CompanyAnsweringRuleRequestCallersItem(DataClassJsonMixin): caller_id: Optional[str] = None """ Phone number of a caller """ name: Optional[str] = None """ Displayed name for a caller ID """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CompanyAnsweringRuleRequestCalledNumbersItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an account phone number """ phone_number: Optional[str] = None """ Phone number of a callee """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CompanyAnsweringRuleRequestScheduleWeeklyRangesMondayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CompanyAnsweringRuleRequestScheduleWeeklyRanges(DataClassJsonMixin): """ Weekly schedule. If specified, ranges cannot be specified """ monday: Optional[List[CompanyAnsweringRuleRequestScheduleWeeklyRangesMondayItem]] = None """ Time interval for a particular day """ tuesday: Optional[list] = None """ Time interval for a particular day """ wednesday: Optional[list] = None """ Time interval for a particular day """ thursday: Optional[list] = None """ Time interval for a particular day """ friday: Optional[list] = None """ Time interval for a particular day """ saturday: Optional[list] = None """ Time interval for a particular day """ sunday: Optional[list] = None """ Time interval for a particular day """ class CompanyAnsweringRuleRequestScheduleRef(Enum): """ Reference to Business Hours or After Hours schedule """ BusinessHours = 'BusinessHours' AfterHours = 'AfterHours' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CompanyAnsweringRuleRequestSchedule(DataClassJsonMixin): """ Schedule when an answering rule should be applied """ weekly_ranges: Optional[CompanyAnsweringRuleRequestScheduleWeeklyRanges] = None """ Weekly schedule. If specified, ranges cannot be specified """ ranges: Optional[list] = None """ Specific data ranges. If specified, weeklyRanges cannot be specified """ ref: Optional[CompanyAnsweringRuleRequestScheduleRef] = None """ Reference to Business Hours or After Hours schedule """ class CompanyAnsweringRuleRequestCallHandlingAction(Enum): """ Specifies how incoming calls are forwarded. The default value is 'Operator' 'Operator' - play company greeting and forward to operator extension 'Disconnect' - play company greeting and disconnect 'Bypass' - bypass greeting to go to selected extension = ['Operator', 'Disconnect', 'Bypass'] Generated by Python OpenAPI Parser """ Operator = 'Operator' Disconnect = 'Disconnect' Bypass = 'Bypass' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CompanyAnsweringRuleRequest(DataClassJsonMixin): name: Optional[str] = None """ Name of an answering rule specified by user. Max number of symbols is 30. The default value is 'My Rule N' where 'N' is the first free number """ enabled: Optional[bool] = True """ Specifies if the rule is active or inactive. The default value is 'True' """ type: Optional[CompanyAnsweringRuleRequestType] = None """ Type of an answering rule, the default value is 'Custom' = ['BusinessHours', 'AfterHours', 'Custom'] """ callers: Optional[List[CompanyAnsweringRuleRequestCallersItem]] = None """ Answering rule will be applied when calls are received from the specified caller(s) """ called_numbers: Optional[List[CompanyAnsweringRuleRequestCalledNumbersItem]] = None """ Answering rule will be applied when calling the specified number(s) """ schedule: Optional[CompanyAnsweringRuleRequestSchedule] = None """ Schedule when an answering rule should be applied """ call_handling_action: Optional[CompanyAnsweringRuleRequestCallHandlingAction] = None """ Specifies how incoming calls are forwarded. The default value is 'Operator' 'Operator' - play company greeting and forward to operator extension 'Disconnect' - play company greeting and disconnect 'Bypass' - bypass greeting to go to selected extension = ['Operator', 'Disconnect', 'Bypass'] """ extension: Optional[str] = None """ Extension to which the call is forwarded in 'Bypass' mode """ greetings: Optional[list] = None """ Greetings applied for an answering rule; only predefined greetings can be applied, see Dictionary Greeting List """ class CompanyAnsweringRuleUpdateCallHandlingAction(Enum): """ Specifies how incoming calls are forwarded. The default value is 'Operator' 'Operator' - play company greeting and forward to operator extension 'Disconnect' - play company greeting and disconnect 'Bypass' - bypass greeting to go to selected extension = ['Operator', 'Disconnect', 'Bypass'] Generated by Python OpenAPI Parser """ Operator = 'Operator' Disconnect = 'Disconnect' Bypass = 'Bypass' class CompanyAnsweringRuleUpdateType(Enum): """ Type of an answering rule """ BusinessHours = 'BusinessHours' AfterHours = 'AfterHours' Custom = 'Custom' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CompanyAnsweringRuleUpdate(DataClassJsonMixin): enabled: Optional[bool] = True """ Specifies if the rule is active or inactive. The default value is 'True' """ name: Optional[str] = None """ Name of an answering rule specified by user. Max number of symbols is 30. The default value is 'My Rule N' where 'N' is the first free number """ callers: Optional[list] = None """ Answering rule will be applied when calls are received from the specified caller(s) """ called_numbers: Optional[list] = None """ Answering rule will be applied when calling the specified number(s) """ schedule: Optional[dict] = None """ Schedule when an answering rule should be applied """ call_handling_action: Optional[CompanyAnsweringRuleUpdateCallHandlingAction] = None """ Specifies how incoming calls are forwarded. The default value is 'Operator' 'Operator' - play company greeting and forward to operator extension 'Disconnect' - play company greeting and disconnect 'Bypass' - bypass greeting to go to selected extension = ['Operator', 'Disconnect', 'Bypass'] """ type: Optional[CompanyAnsweringRuleUpdateType] = 'Custom' """ Type of an answering rule """ extension: Optional[str] = None """ Internal identifier of the extension the call is forwarded to. Supported for 'Bypass' mode only (that should be specified in `callHandlingAction` field) """ greetings: Optional[list] = None """ Greetings applied for an answering rule; only predefined greetings can be applied, see Dictionary Greeting List """ class CompanyAnsweringRuleInfoType(Enum): """ Type of an answering rule """ BusinessHours = 'BusinessHours' AfterHours = 'AfterHours' Custom = 'Custom' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CompanyAnsweringRuleInfoCalledNumbersItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an account phone number """ phone_number: Optional[str] = None """ Phone number of a callee """ class CompanyAnsweringRuleInfoScheduleRef(Enum): """ Reference to Business Hours or After Hours schedule = ['BusinessHours', 'AfterHours'] """ BusinessHours = 'BusinessHours' AfterHours = 'AfterHours' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CompanyAnsweringRuleInfoSchedule(DataClassJsonMixin): """ Schedule when an answering rule should be applied """ weekly_ranges: Optional[dict] = None """ Weekly schedule. If specified, ranges cannot be specified """ ranges: Optional[list] = None """ Specific data ranges. If specified, weeklyRanges cannot be specified """ ref: Optional[CompanyAnsweringRuleInfoScheduleRef] = None """ Reference to Business Hours or After Hours schedule = ['BusinessHours', 'AfterHours'] """ class CompanyAnsweringRuleInfoCallHandlingAction(Enum): """ Specifies how incoming calls are forwarded. The default value is 'Operator' 'Operator' - play company greeting and forward to operator extension 'Disconnect' - play company greeting and disconnect 'Bypass' - bypass greeting to go to selected extension = ['Operator', 'Disconnect', 'Bypass'] Generated by Python OpenAPI Parser """ Operator = 'Operator' Disconnect = 'Disconnect' Bypass = 'Bypass' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CompanyAnsweringRuleInfoExtension(DataClassJsonMixin): """ Extension to which the call is forwarded in 'Bypass' mode """ id: Optional[str] = None """ Internal identifier of an extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CompanyAnsweringRuleInfo(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an answering rule """ uri: Optional[str] = None """ Canonical URI of an answering rule """ enabled: Optional[bool] = True """ Specifies if the rule is active or inactive """ type: Optional[CompanyAnsweringRuleInfoType] = 'Custom' """ Type of an answering rule """ name: Optional[str] = None """ Name of an answering rule specified by user. Max number of symbols is 30. The default value is 'My Rule N' where 'N' is the first free number """ callers: Optional[list] = None """ Answering rule will be applied when calls are received from the specified caller(s) """ called_numbers: Optional[List[CompanyAnsweringRuleInfoCalledNumbersItem]] = None """ Answering rule will be applied when calling the specified number(s) """ schedule: Optional[CompanyAnsweringRuleInfoSchedule] = None """ Schedule when an answering rule should be applied """ call_handling_action: Optional[CompanyAnsweringRuleInfoCallHandlingAction] = None """ Specifies how incoming calls are forwarded. The default value is 'Operator' 'Operator' - play company greeting and forward to operator extension 'Disconnect' - play company greeting and disconnect 'Bypass' - bypass greeting to go to selected extension = ['Operator', 'Disconnect', 'Bypass'] """ extension: Optional[CompanyAnsweringRuleInfoExtension] = None """ Extension to which the call is forwarded in 'Bypass' mode """ greetings: Optional[list] = None """ Greetings applied for an answering rule; only predefined greetings can be applied, see Dictionary Greeting List """ class CallerBlockingSettingsMode(Enum): """ Call blocking options: either specific or all calls and faxes """ Specific = 'Specific' All = 'All' class CallerBlockingSettingsNoCallerId(Enum): """ Determines how to handle calls with no caller ID in 'Specific' mode """ BlockCallsAndFaxes = 'BlockCallsAndFaxes' BlockFaxes = 'BlockFaxes' Allow = 'Allow' class CallerBlockingSettingsPayPhones(Enum): """ Blocking settings for pay phones """ Block = 'Block' Allow = 'Allow' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallerBlockingSettings(DataClassJsonMixin): """ Returns the lists of blocked and allowed phone numbers """ mode: Optional[CallerBlockingSettingsMode] = None """ Call blocking options: either specific or all calls and faxes """ no_caller_id: Optional[CallerBlockingSettingsNoCallerId] = None """ Determines how to handle calls with no caller ID in 'Specific' mode """ pay_phones: Optional[CallerBlockingSettingsPayPhones] = None """ Blocking settings for pay phones """ greetings: Optional[list] = None """ List of greetings played for blocked callers """ class AddBlockedAllowedPhoneNumberStatus(Enum): """ Status of a phone number """ Blocked = 'Blocked' Allowed = 'Allowed' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AddBlockedAllowedPhoneNumber(DataClassJsonMixin): """ Updates either blocked or allowed phone number list with a new phone number. """ phone_number: Optional[str] = None """ A blocked/allowed phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) format """ label: Optional[str] = None """ Custom name of a blocked/allowed phone number """ status: Optional[AddBlockedAllowedPhoneNumberStatus] = 'Blocked' """ Status of a phone number """ class UpdateAnsweringRuleRequestForwardingRingingMode(Enum): """ Specifies the order in which forwarding numbers ring. 'Sequentially' means that forwarding numbers are ringing one at a time, in order of priority. 'Simultaneously' means that forwarding numbers are ringing all at the same time. The default value is 'Sequentially' Generated by Python OpenAPI Parser """ Sequentially = 'Sequentially' Simultaneously = 'Simultaneously' class UpdateAnsweringRuleRequestForwardingRulesItemForwardingNumbersItemType(Enum): """ Forwarding phone number type """ Home = 'Home' Mobile = 'Mobile' Work = 'Work' PhoneLine = 'PhoneLine' Outage = 'Outage' Other = 'Other' BusinessMobilePhone = 'BusinessMobilePhone' class UpdateAnsweringRuleRequestForwardingRulesItemForwardingNumbersItemLabel(Enum): """ Forwarding/Call flip number title """ Business_Mobile_Phone = 'Business Mobile Phone' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleRequestForwardingRulesItemForwardingNumbersItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a forwarding number """ type: Optional[UpdateAnsweringRuleRequestForwardingRulesItemForwardingNumbersItemType] = None """ Forwarding phone number type """ uri: Optional[str] = None """ Canonical URI of a forwarding/call flip phone number """ phone_number: Optional[str] = None """ Forwarding/Call flip phone number """ label: Optional[UpdateAnsweringRuleRequestForwardingRulesItemForwardingNumbersItemLabel] = None """ Forwarding/Call flip number title """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleRequestForwardingRulesItem(DataClassJsonMixin): index: Optional[int] = None """ Forwarding number (or group) ordinal. Not returned for inactive numbers """ ring_count: Optional[int] = None """ Number of rings for a forwarding number (or group). For inactive numbers the default value ('4') is returned """ enabled: Optional[bool] = None """ Phone number status """ forwarding_numbers: Optional[List[UpdateAnsweringRuleRequestForwardingRulesItemForwardingNumbersItem]] = None """ Forwarding number (or group) data """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleRequestForwarding(DataClassJsonMixin): """ Forwarding parameters. Returned if 'ForwardCalls' is specified in 'callHandlingAction'. These settings determine the forwarding numbers to which the call will be forwarded Generated by Python OpenAPI Parser """ notify_my_soft_phones: Optional[bool] = None """ Specifies if the first ring on desktop/mobile apps is enabled. The default value is 'True' """ notify_admin_soft_phones: Optional[bool] = None """ Specifies if the administrator's softphone (desktop application) is notified before forwarding the incoming call to desk phones and forwarding numbers. The default value is 'True' """ soft_phones_ring_count: Optional[int] = 1 """ Specifies delay between ring on apps and starting of a call forwarding """ ringing_mode: Optional[UpdateAnsweringRuleRequestForwardingRingingMode] = None """ Specifies the order in which forwarding numbers ring. 'Sequentially' means that forwarding numbers are ringing one at a time, in order of priority. 'Simultaneously' means that forwarding numbers are ringing all at the same time. The default value is 'Sequentially' """ rules: Optional[List[UpdateAnsweringRuleRequestForwardingRulesItem]] = None """ Information on a call forwarding rule """ mobile_timeout: Optional[bool] = None """ Specifies if mobile timeout is activated for the rule """ class UpdateAnsweringRuleRequestCallHandlingAction(Enum): """ Specifies how incoming calls are forwarded """ ForwardCalls = 'ForwardCalls' UnconditionalForwarding = 'UnconditionalForwarding' AgentQueue = 'AgentQueue' TransferToExtension = 'TransferToExtension' TakeMessagesOnly = 'TakeMessagesOnly' PlayAnnouncementOnly = 'PlayAnnouncementOnly' SharedLines = 'SharedLines' class UpdateAnsweringRuleRequestType(Enum): """ Type of an answering rule """ BusinessHours = 'BusinessHours' AfterHours = 'AfterHours' Custom = 'Custom' class UpdateAnsweringRuleRequestScreening(Enum): """ Call screening status. 'Off' - no call screening; 'NoCallerId' - if caller ID is missing, then callers are asked to say their name before connecting; 'UnknownCallerId' - if caller ID is not in contact list, then callers are asked to say their name before connecting; 'Always' - the callers are always asked to say their name before connecting. The default value is 'Off' Generated by Python OpenAPI Parser """ Off = 'Off' NoCallerId = 'NoCallerId' UnknownCallerId = 'UnknownCallerId' Always = 'Always' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAnsweringRuleRequest(DataClassJsonMixin): id: Optional[str] = None """ Identifier of an answering rule """ forwarding: Optional[UpdateAnsweringRuleRequestForwarding] = None """ Forwarding parameters. Returned if 'ForwardCalls' is specified in 'callHandlingAction'. These settings determine the forwarding numbers to which the call will be forwarded """ enabled: Optional[bool] = None """ Specifies if the rule is active or inactive. The default value is 'True' """ name: Optional[str] = None """ Name of an answering rule specified by user """ callers: Optional[list] = None """ Answering rule will be applied when calls are received from the specified caller(s) """ called_numbers: Optional[list] = None """ Answering rules are applied when calling to selected number(s) """ schedule: Optional[dict] = None """ Schedule when an answering rule should be applied """ call_handling_action: Optional[UpdateAnsweringRuleRequestCallHandlingAction] = None """ Specifies how incoming calls are forwarded """ type: Optional[UpdateAnsweringRuleRequestType] = None """ Type of an answering rule """ unconditional_forwarding: Optional[dict] = None """ Unconditional forwarding parameters. Returned if 'UnconditionalForwarding' is specified in 'callHandlingAction' """ queue: Optional[dict] = None """ Queue settings applied for department (call queue) extension type, with the 'AgentQueue' value specified as a call handling action """ voicemail: Optional[dict] = None """ Specifies whether to take a voicemail and who should do it """ greetings: Optional[list] = None """ Greetings applied for an answering rule; only predefined greetings can be applied, see Dictionary Greeting List """ screening: Optional[UpdateAnsweringRuleRequestScreening] = None """ Call screening status. 'Off' - no call screening; 'NoCallerId' - if caller ID is missing, then callers are asked to say their name before connecting; 'UnknownCallerId' - if caller ID is not in contact list, then callers are asked to say their name before connecting; 'Always' - the callers are always asked to say their name before connecting. The default value is 'Off' """ show_inactive_numbers: Optional[bool] = None """ Indicates whether inactive numbers should be returned or not """ transfer: Optional[dict] = None """ Transfer settings applied for department (call queue) extension type, with 'TransferToExtension' call handling action """ class CompanyAnsweringRuleListRecordsItemType(Enum): """ Type of an answering rule, the default value is 'Custom' = ['BusinessHours', 'AfterHours', 'Custom'] Generated by Python OpenAPI Parser """ BusinessHours = 'BusinessHours' AfterHours = 'AfterHours' Custom = 'Custom' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CompanyAnsweringRuleListRecordsItemExtension(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CompanyAnsweringRuleListRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an answering rule """ uri: Optional[str] = None """ Canonical URI of an answering rule """ enabled: Optional[bool] = True """ Specifies if the rule is active or inactive. The default value is 'True' """ type: Optional[CompanyAnsweringRuleListRecordsItemType] = None """ Type of an answering rule, the default value is 'Custom' = ['BusinessHours', 'AfterHours', 'Custom'] """ name: Optional[str] = None """ Name of an answering rule specified by user. Max number of symbols is 30. The default value is 'My Rule N' where 'N' is the first free number """ called_numbers: Optional[list] = None """ Answering rules are applied when calling to selected number(s) """ extension: Optional[CompanyAnsweringRuleListRecordsItemExtension] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CompanyAnsweringRuleList(DataClassJsonMixin): uri: Optional[str] = None """ Link to an answering rule resource """ records: Optional[List[CompanyAnsweringRuleListRecordsItem]] = None """ List of company answering rules """ paging: Optional[dict] = None """ Information on paging """ navigation: Optional[dict] = None """ Information on navigation """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class IVRPrompts(DataClassJsonMixin): uri: Optional[str] = None """ Link to prompts library resource """ records: Optional[list] = None """ List of Prompts """ navigation: Optional[dict] = None """ Information on navigation """ paging: Optional[dict] = None """ Information on paging """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetUserBusinessHoursResponseSchedule(DataClassJsonMixin): """ Schedule when an answering rule is applied """ weekly_ranges: Optional[dict] = None """ Weekly schedule """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetUserBusinessHoursResponse(DataClassJsonMixin): """ Example: ```json { "uri": "https.../restapi/v1.0/account/401800045008/extension/401800045008/business-hours", "schedule": { "weeklyRanges": { "wednesday": [ { "from": "09:00", "to": "18:00" } ], "friday": [ { "from": "09:00", "to": "18:00" } ], "tuesday": [ { "from": "09:00", "to": "18:00" } ], "monday": [ { "from": "09:00", "to": "18:00" } ], "thursday": [ { "from": "09:00", "to": "18:00" } ] } } } ``` Generated by Python OpenAPI Parser """ uri: Optional[str] = None """ Canonical URI of a business-hours resource """ schedule: Optional[GetUserBusinessHoursResponseSchedule] = None """ Schedule when an answering rule is applied """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallRecordingSettingsResourceOnDemand(DataClassJsonMixin): enabled: Optional[bool] = None """ Flag for controlling OnDemand Call Recording settings """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallRecordingSettingsResourceAutomatic(DataClassJsonMixin): enabled: Optional[bool] = None """ Flag for controling Automatic Call Recording settings """ outbound_call_tones: Optional[bool] = None """ Flag for controlling 'Play Call Recording Announcement for Outbound Calls' settings """ outbound_call_announcement: Optional[bool] = None """ Flag for controlling 'Play periodic tones for outbound calls' settings """ allow_mute: Optional[bool] = None """ Flag for controlling 'Allow mute in auto call recording' settings """ extension_count: Optional[int] = None """ Total amount of extension that are used in call recordings """ class CallRecordingSettingsResourceGreetingsItemType(Enum): StartRecording = 'StartRecording' StopRecording = 'StopRecording' AutomaticRecording = 'AutomaticRecording' class CallRecordingSettingsResourceGreetingsItemMode(Enum): """ 'Default' value specifies that all greetings of that type (in all languages) are default, if at least one greeting (in any language) of the specified type is custom, then 'Custom' value is returned. Generated by Python OpenAPI Parser """ Default = 'Default' Custom = 'Custom' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallRecordingSettingsResourceGreetingsItem(DataClassJsonMixin): type: Optional[CallRecordingSettingsResourceGreetingsItemType] = None mode: Optional[CallRecordingSettingsResourceGreetingsItemMode] = None """ 'Default' value specifies that all greetings of that type (in all languages) are default, if at least one greeting (in any language) of the specified type is custom, then 'Custom' value is returned. """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CallRecordingSettingsResource(DataClassJsonMixin): on_demand: Optional[CallRecordingSettingsResourceOnDemand] = None automatic: Optional[CallRecordingSettingsResourceAutomatic] = None greetings: Optional[List[CallRecordingSettingsResourceGreetingsItem]] = None """ Collection of Greeting Info """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSipRegistrationRequestDevice(DataClassJsonMixin): """ Device unique description """ id: Optional[str] = None """ Device unique identifier, retrieved on previous session (if any) """ app_external_id: Optional[str] = None """ Supported for iOS devices only. Certificate name (used by iOS applications for APNS subscription) """ computer_name: Optional[str] = None """ Supported for SoftPhone only. Computer name """ serial: Optional[str] = None """ Serial number for HardPhone; endpoint_id for softphone and mobile applications. Returned only when the phone is shipped and provisioned """ class CreateSipRegistrationRequestSipInfoItemTransport(Enum): """ Supported transport. SIP info will be returned for this transport if supported """ UDP = 'UDP' TCP = 'TCP' TLS = 'TLS' WS = 'WS' WSS = 'WSS' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSipRegistrationRequestSipInfoItem(DataClassJsonMixin): transport: Optional[CreateSipRegistrationRequestSipInfoItemTransport] = None """ Supported transport. SIP info will be returned for this transport if supported """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSipRegistrationRequest(DataClassJsonMixin): device: Optional[CreateSipRegistrationRequestDevice] = None """ Device unique description """ sip_info: Optional[List[CreateSipRegistrationRequestSipInfoItem]] = None """ SIP settings for device """ class CreateSipRegistrationResponseDeviceType(Enum): """ Device type """ HardPhone = 'HardPhone' SoftPhone = 'SoftPhone' OtherPhone = 'OtherPhone' Paging = 'Paging' WebPhone = 'WebPhone' class CreateSipRegistrationResponseDeviceStatus(Enum): Online = 'Online' Offline = 'Offline' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSipRegistrationResponseDeviceModelAddonsItem(DataClassJsonMixin): id: Optional[str] = None name: Optional[str] = None count: Optional[str] = None class CreateSipRegistrationResponseDeviceModelFeaturesItem(Enum): BLA = 'BLA' Intercom = 'Intercom' Paging = 'Paging' HELD = 'HELD' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSipRegistrationResponseDeviceModel(DataClassJsonMixin): """ HardPhone model information Required Properties: - addons Generated by Python OpenAPI Parser """ addons: List[CreateSipRegistrationResponseDeviceModelAddonsItem] """ Addons description """ id: Optional[str] = None """ Addon identifier. For HardPhones of certain types, which are compatible with this addon identifier """ name: Optional[str] = None """ Device name """ features: Optional[List[CreateSipRegistrationResponseDeviceModelFeaturesItem]] = None """ Device feature or multiple features supported """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSipRegistrationResponseDeviceExtension(DataClassJsonMixin): """ Internal identifier of an extension the device should be assigned to """ id: Optional[int] = None """ Internal identifier of an extension """ uri: Optional[str] = None """ Link to an extension resource """ extension_number: Optional[str] = None """ Number of extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSipRegistrationResponseDeviceEmergencyServiceAddress(DataClassJsonMixin): """ Address for emergency cases. The same emergency address is assigned to all the numbers of one device Generated by Python OpenAPI Parser """ street: Optional[str] = None street2: Optional[str] = None city: Optional[str] = None zip: Optional[str] = None customer_name: Optional[str] = None state: Optional[str] = None """ State/province name """ state_id: Optional[str] = None """ Internal identifier of a state """ state_iso_code: Optional[str] = None """ ISO code of a state """ state_name: Optional[str] = None """ Full name of a state """ country_id: Optional[str] = None """ Internal identifier of a country """ country_iso_code: Optional[str] = None """ ISO code of a country """ country: Optional[str] = None """ Country name """ country_name: Optional[str] = None """ Full name of a country """ out_of_country: Optional[bool] = None """ Specifies if emergency address is out of country """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSipRegistrationResponseDeviceEmergencyLocation(DataClassJsonMixin): """ Company emergency response location details """ id: Optional[str] = None """ Internal identifier of an emergency response location """ name: Optional[str] = None """ Emergency response location name """ class CreateSipRegistrationResponseDeviceEmergencyAddressStatus(Enum): """ Emergency address status """ Valid = 'Valid' Invalid = 'Invalid' class CreateSipRegistrationResponseDeviceEmergencySyncStatus(Enum): """ Resulting status of emergency address synchronization. Returned if `syncEmergencyAddress` parameter is set to 'True' Generated by Python OpenAPI Parser """ Verified = 'Verified' Updated = 'Updated' Deleted = 'Deleted' NotRequired = 'NotRequired' Unsupported = 'Unsupported' Failed = 'Failed' class CreateSipRegistrationResponseDeviceEmergencyAddressEditableStatus(Enum): """ Ability to register new emergency address for a phone line using devices sharing this line or only main device (line owner) Generated by Python OpenAPI Parser """ MainDevice = 'MainDevice' AnyDevice = 'AnyDevice' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSipRegistrationResponseDeviceEmergency(DataClassJsonMixin): """ Emergency response location settings of a device """ address: Optional[dict] = None location: Optional[CreateSipRegistrationResponseDeviceEmergencyLocation] = None """ Company emergency response location details """ out_of_country: Optional[bool] = None """ Specifies if emergency address is out of country """ address_status: Optional[CreateSipRegistrationResponseDeviceEmergencyAddressStatus] = None """ Emergency address status """ sync_status: Optional[CreateSipRegistrationResponseDeviceEmergencySyncStatus] = None """ Resulting status of emergency address synchronization. Returned if `syncEmergencyAddress` parameter is set to 'True' """ address_editable_status: Optional[CreateSipRegistrationResponseDeviceEmergencyAddressEditableStatus] = None """ Ability to register new emergency address for a phone line using devices sharing this line or only main device (line owner) """ address_required: Optional[bool] = None """ 'True' if emergency address is required for the country of a phone line """ address_location_only: Optional[bool] = None """ 'True' if out of country emergency address is not allowed for the country of a phone line """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSipRegistrationResponseDeviceShippingMethod(DataClassJsonMixin): id: Optional[str] = None name: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSipRegistrationResponseDeviceShipping(DataClassJsonMixin): """ Shipping information, according to which devices (in case of HardPhone ) or e911 stickers (in case of SoftPhone and OtherPhone ) will be delivered to the customer Generated by Python OpenAPI Parser """ address: Optional[dict] = None method: Optional[CreateSipRegistrationResponseDeviceShippingMethod] = None status: Optional[str] = None carrier: Optional[str] = None tracking_number: Optional[str] = None class CreateSipRegistrationResponseDevicePhoneLinesItemLineType(Enum): """ Type of phone line """ Standalone = 'Standalone' StandaloneFree = 'StandaloneFree' BlaPrimary = 'BlaPrimary' BlaSecondary = 'BlaSecondary' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSipRegistrationResponseDevicePhoneLinesItemEmergencyAddress(DataClassJsonMixin): required: Optional[bool] = None """ 'True' if specifying of emergency address is required """ local_only: Optional[bool] = None """ 'True' if only local emergency address can be specified """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSipRegistrationResponseDevicePhoneLinesItemPhoneInfoCountry(DataClassJsonMixin): """ Brief information on a phone number country """ id: Optional[str] = None """ Internal identifier of a home country """ uri: Optional[str] = None """ Canonical URI of a home country """ name: Optional[str] = None """ Official name of a home country """ class CreateSipRegistrationResponseDevicePhoneLinesItemPhoneInfoPaymentType(Enum): """ Payment type. 'External' is returned for forwarded numbers which are not terminated in the RingCentral phone system = ['External', 'TollFree', 'Local'], Generated by Python OpenAPI Parser """ External = 'External' TollFree = 'TollFree' Local = 'Local' class CreateSipRegistrationResponseDevicePhoneLinesItemPhoneInfoUsageType(Enum): CompanyNumber = 'CompanyNumber' MainCompanyNumber = 'MainCompanyNumber' AdditionalCompanyNumber = 'AdditionalCompanyNumber' DirectNumber = 'DirectNumber' CompanyFaxNumber = 'CompanyFaxNumber' ForwardedNumber = 'ForwardedNumber' ForwardedCompanyNumber = 'ForwardedCompanyNumber' ContactCenterNumber = 'ContactCenterNumber' class CreateSipRegistrationResponseDevicePhoneLinesItemPhoneInfoType(Enum): """ Type of a phone number """ VoiceFax = 'VoiceFax' FaxOnly = 'FaxOnly' VoiceOnly = 'VoiceOnly' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSipRegistrationResponseDevicePhoneLinesItemPhoneInfo(DataClassJsonMixin): """ Phone number information """ id: Optional[int] = None """ Internal identifier of a phone number """ country: Optional[CreateSipRegistrationResponseDevicePhoneLinesItemPhoneInfoCountry] = None """ Brief information on a phone number country """ payment_type: Optional[CreateSipRegistrationResponseDevicePhoneLinesItemPhoneInfoPaymentType] = None """ Payment type. 'External' is returned for forwarded numbers which are not terminated in the RingCentral phone system = ['External', 'TollFree', 'Local'], """ phone_number: Optional[str] = None """ Phone number """ usage_type: Optional[CreateSipRegistrationResponseDevicePhoneLinesItemPhoneInfoUsageType] = None type: Optional[CreateSipRegistrationResponseDevicePhoneLinesItemPhoneInfoType] = None """ Type of a phone number """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSipRegistrationResponseDevicePhoneLinesItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a phone line """ line_type: Optional[CreateSipRegistrationResponseDevicePhoneLinesItemLineType] = None """ Type of phone line """ emergency_address: Optional[CreateSipRegistrationResponseDevicePhoneLinesItemEmergencyAddress] = None phone_info: Optional[CreateSipRegistrationResponseDevicePhoneLinesItemPhoneInfo] = None """ Phone number information """ class CreateSipRegistrationResponseDeviceLinePooling(Enum): """ Pooling type of a deviceHost - device with standalone paid phone line which can be linked to Glip/Softphone instanceGuest - device with a linked phone lineNone - device without a phone line or with specific line (free, BLA, etc.) = ['Host', 'Guest', 'None'] Generated by Python OpenAPI Parser """ Host = 'Host' Guest = 'Guest' None_ = 'None' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSipRegistrationResponseDeviceSite(DataClassJsonMixin): """ Site data """ id: Optional[str] = None """ Internal identifier of a site """ name: Optional[str] = None """ Name of a site """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSipRegistrationResponseDevice(DataClassJsonMixin): uri: Optional[str] = None """ Link to a device resource """ id: Optional[str] = None """ Internal identifier of a Device """ type: Optional[CreateSipRegistrationResponseDeviceType] = None """ Device type """ sku: Optional[str] = None """ Device identification number (stock keeping unit) in the format TP-ID [-AT-AC], where TP is device type (HP for RC HardPhone, DV for all other devices including softphone); ID - device model ID; AT -addon type ID; AC - addon count (if any). For example 'HP-56-2-2' """ status: Optional[CreateSipRegistrationResponseDeviceStatus] = None name: Optional[str] = None """ Device name. Mandatory if ordering SoftPhone or OtherPhone. Optional for HardPhone. If not specified for HardPhone, then device model name is used as device name """ serial: Optional[str] = None """ Serial number for HardPhone (is returned only when the phone is shipped and provisioned); endpoint_id for softphone and mobile applications """ computer_name: Optional[str] = None """ PC name for softphone """ model: Optional[CreateSipRegistrationResponseDeviceModel] = None """ HardPhone model information """ extension: Optional[CreateSipRegistrationResponseDeviceExtension] = None """ Internal identifier of an extension the device should be assigned to """ emergency_service_address: Optional[CreateSipRegistrationResponseDeviceEmergencyServiceAddress] = None """ Address for emergency cases. The same emergency address is assigned to all the numbers of one device """ emergency: Optional[CreateSipRegistrationResponseDeviceEmergency] = None """ Emergency response location settings of a device """ shipping: Optional[CreateSipRegistrationResponseDeviceShipping] = None """ Shipping information, according to which devices (in case of HardPhone ) or e911 stickers (in case of SoftPhone and OtherPhone ) will be delivered to the customer """ phone_lines: Optional[List[CreateSipRegistrationResponseDevicePhoneLinesItem]] = None """ Phone lines information """ box_billing_id: Optional[int] = None """ Box billing identifier of a device. Applicable only for HardPhones. It is an alternative way to identify the device to be ordered. EitherT? model structure, or boxBillingId must be specified forT?HardPhone """ use_as_common_phone: Optional[bool] = None """ Supported only for devices assigned to Limited extensions. If true, enables users to log in to this phone as a common phone. """ line_pooling: Optional[CreateSipRegistrationResponseDeviceLinePooling] = None """ Pooling type of a deviceHost - device with standalone paid phone line which can be linked to Glip/Softphone instanceGuest - device with a linked phone lineNone - device without a phone line or with specific line (free, BLA, etc.) = ['Host', 'Guest', 'None'] """ in_company_net: Optional[bool] = None """ Network location status. 'True' if the device is located in the configured corporate network (On-Net); 'False' for Off-Net location. Parameter is not returned if `EmergencyAddressAutoUpdate` feature is not enabled for the account/user, or if device network location is not determined """ site: Optional[CreateSipRegistrationResponseDeviceSite] = None """ Site data """ last_location_report_time: Optional[str] = None """ Datetime of receiving last location report in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format including timezone, for example *2016-03-10T18:07:52.534Z """ class CreateSipRegistrationResponseSipInfoItemTransport(Enum): """ Preferred transport. SIP info will be returned for this transport if supported """ UDP = 'UDP' TCP = 'TCP' TLS = 'TLS' WS = 'WS' WSS = 'WSS' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSipRegistrationResponseSipInfoItem(DataClassJsonMixin): username: Optional[str] = None """ User credentials """ password: Optional[str] = None """ User password """ authorization_id: Optional[str] = None """ Identifier for SIP authorization """ omain: Optional[str] = None """ SIP domain """ outbound_proxy: Optional[str] = None """ SIP outbound proxy """ outbound_proxy_i_pv6: Optional[str] = None """ SIP outbound IPv6 proxy """ outbound_proxy_backup: Optional[str] = None """ SIP outbound proxy backup """ outbound_proxy_i_pv6_backup: Optional[str] = None """ SIP outbound IPv6 proxy backup """ transport: Optional[CreateSipRegistrationResponseSipInfoItemTransport] = None """ Preferred transport. SIP info will be returned for this transport if supported """ certificate: Optional[str] = None """ For TLS transport only Base64 encoded certificate """ switch_back_interval: Optional[int] = None """ The interval in seconds after which the app must try to switch back to primary proxy if it was previously switched to backup. If this parameter is not returned, the app must stay on backup proxy and try to switch to primary proxy after the next SIP-provision call. """ class CreateSipRegistrationResponseSipFlagsVoipFeatureEnabled(Enum): """ If 'True' VoIP calling feature is enabled """ True_ = 'True' False_ = 'False' class CreateSipRegistrationResponseSipFlagsVoipCountryBlocked(Enum): """ If 'True' the request is sent from IP address of a country blocked for VoIP calling """ True_ = 'True' False_ = 'False' class CreateSipRegistrationResponseSipFlagsOutboundCallsEnabled(Enum): """ If 'True' outbound calls are enabled """ True_ = 'True' False_ = 'False' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSipRegistrationResponseSipFlags(DataClassJsonMixin): """ SIP flags data """ voip_feature_enabled: Optional[CreateSipRegistrationResponseSipFlagsVoipFeatureEnabled] = None """ If 'True' VoIP calling feature is enabled """ voip_country_blocked: Optional[CreateSipRegistrationResponseSipFlagsVoipCountryBlocked] = None """ If 'True' the request is sent from IP address of a country blocked for VoIP calling """ outbound_calls_enabled: Optional[CreateSipRegistrationResponseSipFlagsOutboundCallsEnabled] = None """ If 'True' outbound calls are enabled """ dscp_enabled: Optional[bool] = None dscp_signaling: Optional[int] = None dscp_voice: Optional[int] = None dscp_video: Optional[int] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSipRegistrationResponse(DataClassJsonMixin): """ Required Properties: - sip_flags - sip_info Generated by Python OpenAPI Parser """ sip_info: List[CreateSipRegistrationResponseSipInfoItem] """ SIP settings for device """ sip_flags: CreateSipRegistrationResponseSipFlags """ SIP flags data """ device: Optional[CreateSipRegistrationResponseDevice] = None sip_info_pstn: Optional[list] = None """ SIP PSTN settings for device """ sip_error_codes: Optional[List[str]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetTimezoneListResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a timezone """ uri: Optional[str] = None """ Canonical URI of a timezone """ name: Optional[str] = None """ Short name of a timezone """ description: Optional[str] = None """ Description of a timezone """ bias: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetTimezoneListResponseNavigationFirstPage(DataClassJsonMixin): """ Canonical URI for the first page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetTimezoneListResponseNavigation(DataClassJsonMixin): """ Information on navigation """ first_page: Optional[GetTimezoneListResponseNavigationFirstPage] = None """ Canonical URI for the first page of the list """ next_page: Optional[dict] = None """ Canonical URI for the next page of the list """ previous_page: Optional[dict] = None """ Canonical URI for the previous page of the list """ last_page: Optional[dict] = None """ Canonical URI for the last page of the list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetTimezoneListResponsePaging(DataClassJsonMixin): """ Information on paging """ page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) """ per_page: Optional[int] = None """ Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty """ total_pages: Optional[int] = None """ The total number of pages in a dataset. May be omitted for some resources due to performance reasons """ total_elements: Optional[int] = None """ The total number of elements in a dataset. May be omitted for some resource due to performance reasons """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetTimezoneListResponse(DataClassJsonMixin): """ Required Properties: - navigation - paging - records Generated by Python OpenAPI Parser """ records: List[GetTimezoneListResponseRecordsItem] """ List of timezones """ navigation: GetTimezoneListResponseNavigation """ Information on navigation """ paging: GetTimezoneListResponsePaging """ Information on paging """ uri: Optional[str] = None """ Link to the timezone list resource """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UserCallQueuesRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Call queue extension identifier """ name: Optional[str] = None """ Call queue name (read-only) """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UserCallQueues(DataClassJsonMixin): records: Optional[List[UserCallQueuesRecordsItem]] = None """ List of the queues where the extension is an agent """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class DepartmentBulkAssignResourceItemsItem(DataClassJsonMixin): department_id: Optional[str] = None added_extension_ids: Optional[List[str]] = None removed_extension_ids: Optional[List[str]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class DepartmentBulkAssignResource(DataClassJsonMixin): items: Optional[List[DepartmentBulkAssignResourceItemsItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class PagingOnlyGroupUsersRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a paging group user extension """ uri: Optional[str] = None """ Link to a paging group user extension """ extension_number: Optional[str] = None """ Extension number of a paging group user """ name: Optional[str] = None """ Name of a paging group user """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class PagingOnlyGroupUsers(DataClassJsonMixin): uri: Optional[str] = None """ Link to the list of users allowed to page the Paging Only group """ records: Optional[List[PagingOnlyGroupUsersRecordsItem]] = None """ List of users allowed to page the Paging Only group """ navigation: Optional[dict] = None """ Information on navigation """ paging: Optional[dict] = None """ Information on paging """ class ListDevicesAutomaticLocationUpdatesRecordsItemType(Enum): """ Device type """ HardPhone = 'HardPhone' SoftPhone = 'SoftPhone' OtherPhone = 'OtherPhone' class ListDevicesAutomaticLocationUpdatesRecordsItemModelFeaturesItem(Enum): BLA = 'BLA' Intercom = 'Intercom' Paging = 'Paging' HELD = 'HELD' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListDevicesAutomaticLocationUpdatesRecordsItemModel(DataClassJsonMixin): """ HardPhone model information """ id: Optional[str] = None """ Device model identifier """ name: Optional[str] = None """ Device name """ features: Optional[List[ListDevicesAutomaticLocationUpdatesRecordsItemModelFeaturesItem]] = None """ Device feature or multiple features supported """ class ListDevicesAutomaticLocationUpdatesRecordsItemPhoneLinesItemLineType(Enum): Unknown = 'Unknown' Standalone = 'Standalone' StandaloneFree = 'StandaloneFree' BlaPrimary = 'BlaPrimary' BlaSecondary = 'BlaSecondary' BLF = 'BLF' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListDevicesAutomaticLocationUpdatesRecordsItemPhoneLinesItemPhoneInfo(DataClassJsonMixin): id: Optional[int] = None """ Internal identifier of a phone number """ phone_number: Optional[str] = None """ Phone number """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListDevicesAutomaticLocationUpdatesRecordsItemPhoneLinesItem(DataClassJsonMixin): line_type: Optional[ListDevicesAutomaticLocationUpdatesRecordsItemPhoneLinesItemLineType] = None phone_info: Optional[ListDevicesAutomaticLocationUpdatesRecordsItemPhoneLinesItemPhoneInfo] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListDevicesAutomaticLocationUpdatesRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a device """ type: Optional[ListDevicesAutomaticLocationUpdatesRecordsItemType] = 'HardPhone' """ Device type """ serial: Optional[str] = None """ Serial number for HardPhone (is returned only when the phone is shipped and provisioned) """ feature_enabled: Optional[bool] = None """ Specifies if Automatic Location Updates feature is enabled """ name: Optional[str] = None """ Device name """ model: Optional[ListDevicesAutomaticLocationUpdatesRecordsItemModel] = None """ HardPhone model information """ site: Optional[str] = None """ Site data """ phone_lines: Optional[List[ListDevicesAutomaticLocationUpdatesRecordsItemPhoneLinesItem]] = None """ Phone lines information """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListDevicesAutomaticLocationUpdates(DataClassJsonMixin): uri: Optional[str] = None """ Link to devices resource """ records: Optional[List[ListDevicesAutomaticLocationUpdatesRecordsItem]] = None """ List of users' devices with the current status of Emergency Address Auto Update Feature """ navigation: Optional[dict] = None paging: Optional[dict] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetConferencingInfoResponsePhoneNumbersItemCountry(DataClassJsonMixin): """ Information on a home country of a conference phone number """ id: Optional[str] = None """ Internal identifier of a country """ uri: Optional[str] = None """ Canonical URI of a country """ calling_code: Optional[str] = None """ Country calling code defined by ITU-T recommendations [E.123](https://www.itu.int/rec/T-REC-E.123-200102-I/en) and [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) """ emergency_calling: Optional[bool] = None """ Emergency calling feature availability/emergency address requirement indicator """ iso_code: Optional[str] = None """ Country code according to the ISO standard, see [ISO 3166](https://www.iso.org/iso-3166-country-codes.html) """ name: Optional[str] = None """ Official name of a country """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetConferencingInfoResponsePhoneNumbersItem(DataClassJsonMixin): country: Optional[GetConferencingInfoResponsePhoneNumbersItemCountry] = None """ Information on a home country of a conference phone number """ default: Optional[bool] = None """ 'True' if the number is default for the conference. Default conference number is a domestic number that can be set by user (otherwise it is set by the system). Only one default number per country is allowed """ has_greeting: Optional[bool] = None """ 'True' if the greeting message is played on this number """ location: Optional[str] = None """ Location (city, region, state) of a conference phone number """ phone_number: Optional[str] = None """ Dial-in phone number to connect to a conference """ premium: Optional[bool] = None """ Indicates if the number is 'premium' (account phone number with the `ConferencingNumber` usageType) """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetConferencingInfoResponse(DataClassJsonMixin): uri: Optional[str] = None """ Canonical URI of a conferencing """ allow_join_before_host: Optional[bool] = None """ Determines if host user allows conference participants to join before the host """ host_code: Optional[str] = None """ Access code for a host user """ mode: Optional[str] = None """ Internal parameter specifying conferencing engine """ participant_code: Optional[str] = None """ Access code for any participant """ phone_number: Optional[str] = None """ Primary conference phone number for user's home country returned in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) format """ tap_to_join_uri: Optional[str] = None """ Short URL leading to the service web page Tap to Join for audio conference bridge """ phone_numbers: Optional[List[GetConferencingInfoResponsePhoneNumbersItem]] = None """ List of multiple dial-in phone numbers to connect to audio conference service, relevant for user's brand. Each number is given with the country and location information, in order to let the user choose the less expensive way to connect to a conference. The first number in the list is the primary conference number, that is default and domestic """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetExtensionPhoneNumbersResponseRecordsItemCountry(DataClassJsonMixin): """ Brief information on a phone number country """ id: Optional[str] = None """ Internal identifier of a home country """ uri: Optional[str] = None """ Canonical URI of a home country """ name: Optional[str] = None """ Official name of a home country """ iso_code: Optional[str] = None """ ISO code of a country """ calling_code: Optional[str] = None """ Calling code of a country """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetExtensionPhoneNumbersResponseRecordsItemContactCenterProvider(DataClassJsonMixin): """ CCRN (Contact Center Routing Number) provider. If not specified then the default value 'InContact/North America' is used, its ID is '1' Generated by Python OpenAPI Parser """ id: Optional[str] = None """ Internal identifier of the provider """ name: Optional[str] = None """ Provider's name """ class GetExtensionPhoneNumbersResponseRecordsItemExtensionType(Enum): """ Extension type """ User = 'User' FaxUser = 'FaxUser' VirtualUser = 'VirtualUser' DigitalUser = 'DigitalUser' Department = 'Department' Announcement = 'Announcement' Voicemail = 'Voicemail' SharedLinesGroup = 'SharedLinesGroup' PagingOnly = 'PagingOnly' IvrMenu = 'IvrMenu' ApplicationExtension = 'ApplicationExtension' ParkLocation = 'ParkLocation' Site = 'Site' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetExtensionPhoneNumbersResponseRecordsItemExtension(DataClassJsonMixin): """ Information on the extension, to which the phone number is assigned. Returned only for the request of Account phone number list Generated by Python OpenAPI Parser """ id: Optional[int] = None """ Internal identifier of an extension """ uri: Optional[str] = None """ Canonical URI of an extension """ extension_number: Optional[str] = None """ Number of department extension """ partner_id: Optional[str] = None """ For Partner Applications Internal identifier of an extension created by partner. The RingCentral supports the mapping of accounts and stores the corresponding account ID/extension ID for each partner ID of a client application. In request URIs partner IDs are accepted instead of regular RingCentral native IDs as path parameters using pid = XXX clause. Though in response URIs contain the corresponding account IDs and extension IDs. In all request and response bodies these values are reflected via partnerId attributes of account and extension """ type: Optional[GetExtensionPhoneNumbersResponseRecordsItemExtensionType] = None """ Extension type """ contact_center_provider: Optional[dict] = None """ CCRN (Contact Center Routing Number) provider. If not specified then the default value 'InContact/North America' is used, its ID is '1' """ name: Optional[str] = None """ Extension name. For user extension types the value is a combination of the specified first name and last name """ class GetExtensionPhoneNumbersResponseRecordsItemPaymentType(Enum): """ Payment type. 'External' is returned for forwarded numbers which are not terminated in the RingCentral phone system Generated by Python OpenAPI Parser """ External = 'External' TollFree = 'TollFree' Local = 'Local' BusinessMobileNumberProvider = 'BusinessMobileNumberProvider' class GetExtensionPhoneNumbersResponseRecordsItemType(Enum): """ Phone number type """ VoiceFax = 'VoiceFax' FaxOnly = 'FaxOnly' VoiceOnly = 'VoiceOnly' class GetExtensionPhoneNumbersResponseRecordsItemUsageType(Enum): """ Usage type of a phone number. Numbers of 'NumberPool' type wont't be returned for phone number list requests Generated by Python OpenAPI Parser """ MainCompanyNumber = 'MainCompanyNumber' AdditionalCompanyNumber = 'AdditionalCompanyNumber' CompanyNumber = 'CompanyNumber' DirectNumber = 'DirectNumber' CompanyFaxNumber = 'CompanyFaxNumber' ForwardedNumber = 'ForwardedNumber' ForwardedCompanyNumber = 'ForwardedCompanyNumber' ContactCenterNumber = 'ContactCenterNumber' ConferencingNumber = 'ConferencingNumber' NumberPool = 'NumberPool' BusinessMobileNumber = 'BusinessMobileNumber' class GetExtensionPhoneNumbersResponseRecordsItemFeaturesItem(Enum): CallerId = 'CallerId' SmsSender = 'SmsSender' A2PSmsSender = 'A2PSmsSender' MmsSender = 'MmsSender' InternationalSmsSender = 'InternationalSmsSender' Delegated = 'Delegated' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetExtensionPhoneNumbersResponseRecordsItem(DataClassJsonMixin): uri: Optional[str] = None """ Link to the user's phone number resource """ id: Optional[int] = None """ Internal identifier of a phone number """ country: Optional[GetExtensionPhoneNumbersResponseRecordsItemCountry] = None """ Brief information on a phone number country """ contact_center_provider: Optional[GetExtensionPhoneNumbersResponseRecordsItemContactCenterProvider] = None """ CCRN (Contact Center Routing Number) provider. If not specified then the default value 'InContact/North America' is used, its ID is '1' """ extension: Optional[GetExtensionPhoneNumbersResponseRecordsItemExtension] = None """ Information on the extension, to which the phone number is assigned. Returned only for the request of Account phone number list """ label: Optional[str] = None """ Custom user name of a phone number, if any """ location: Optional[str] = None """ Location (City, State). Filled for local US numbers """ payment_type: Optional[GetExtensionPhoneNumbersResponseRecordsItemPaymentType] = None """ Payment type. 'External' is returned for forwarded numbers which are not terminated in the RingCentral phone system """ phone_number: Optional[str] = None """ Phone number """ status: Optional[str] = None """ Status of a phone number. If the value is 'Normal', the phone number is ready to be used. Otherwise it is an external number not yet ported to RingCentral """ type: Optional[GetExtensionPhoneNumbersResponseRecordsItemType] = None """ Phone number type """ usage_type: Optional[GetExtensionPhoneNumbersResponseRecordsItemUsageType] = None """ Usage type of a phone number. Numbers of 'NumberPool' type wont't be returned for phone number list requests """ features: Optional[List[GetExtensionPhoneNumbersResponseRecordsItemFeaturesItem]] = None """ List of features of a phone number """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetExtensionPhoneNumbersResponse(DataClassJsonMixin): """ Required Properties: - navigation - paging - records Generated by Python OpenAPI Parser """ records: List[GetExtensionPhoneNumbersResponseRecordsItem] """ List of phone numbers """ navigation: dict """ Information on navigation """ paging: dict """ Information on paging """ uri: Optional[str] = None """ Link to the user's phone number list resource """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ExtensionCreationRequestContactBusinessAddress(DataClassJsonMixin): country: Optional[str] = None """ Country name of an extension user company """ state: Optional[str] = None """ State/province name of an extension user company. Mandatory for the USA, UK and Canada """ city: Optional[str] = None """ City name of an extension user company """ street: Optional[str] = None """ Street address of an extension user company """ zip: Optional[str] = None """ Zip code of an extension user company """ class ExtensionCreationRequestContactPronouncedNameType(Enum): """ Voice name type. 'Default' - default extension name; first name and last name specified in user profile; 'TextToSpeech' - custom text; user name spelled the way it sounds and specified by user; 'Recorded' - custom audio, user name recorded in user's own voice (supported only for extension retrieval) Generated by Python OpenAPI Parser """ Default = 'Default' TextToSpeech = 'TextToSpeech' Recorded = 'Recorded' class ExtensionCreationRequestContactPronouncedNamePromptContentType(Enum): """ Content media type """ AudioMpeg = 'audio/mpeg' AudioWav = 'audio/wav' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ExtensionCreationRequestContactPronouncedNamePrompt(DataClassJsonMixin): id: Optional[str] = None content_uri: Optional[str] = None """ Link to a prompt resource """ content_type: Optional[ExtensionCreationRequestContactPronouncedNamePromptContentType] = None """ Content media type """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ExtensionCreationRequestContactPronouncedName(DataClassJsonMixin): type: Optional[ExtensionCreationRequestContactPronouncedNameType] = None """ Voice name type. 'Default' - default extension name; first name and last name specified in user profile; 'TextToSpeech' - custom text; user name spelled the way it sounds and specified by user; 'Recorded' - custom audio, user name recorded in user's own voice (supported only for extension retrieval) """ text: Optional[str] = None """ Custom text """ prompt: Optional[ExtensionCreationRequestContactPronouncedNamePrompt] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ExtensionCreationRequestContact(DataClassJsonMixin): """ Contact Information """ first_name: Optional[str] = None """ For User extension type only. Extension user first name """ last_name: Optional[str] = None """ For User extension type only. Extension user last name """ company: Optional[str] = None """ Extension user company name """ job_title: Optional[str] = None email: Optional[str] = None """ Email of extension user """ business_phone: Optional[str] = None """ Extension user contact phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) format """ mobile_phone: Optional[str] = None """ Extension user mobile (**non** Toll Free) phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) (with '+' sign) format """ business_address: Optional[ExtensionCreationRequestContactBusinessAddress] = None email_as_login_name: Optional[bool] = None """ If 'True' then contact email is enabled as login name for this user. Please note that email should be unique in this case. The default value is 'False' """ pronounced_name: Optional[ExtensionCreationRequestContactPronouncedName] = None department: Optional[str] = None """ Extension user department, if any """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ExtensionCreationRequestCustomFieldsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a custom field """ value: Optional[str] = None """ Custom field value """ display_name: Optional[str] = None class ExtensionCreationRequestReferencesItemType(Enum): """ Type of external identifier """ PartnerId = 'PartnerId' CustomerDirectoryId = 'CustomerDirectoryId' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ExtensionCreationRequestReferencesItem(DataClassJsonMixin): ref: Optional[str] = None """ Non-RC identifier of an extension """ type: Optional[ExtensionCreationRequestReferencesItemType] = None """ Type of external identifier """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ExtensionCreationRequestRegionalSettingsTimezone(DataClassJsonMixin): """ Extension timezone information """ id: Optional[str] = None """ Internal identifier of a timezone """ uri: Optional[str] = None """ Canonical URI of a timezone """ name: Optional[str] = None """ Short name of a timezone """ description: Optional[str] = None """ Meaningful description of the timezone """ bias: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ExtensionCreationRequestRegionalSettingsLanguage(DataClassJsonMixin): """ User interface language data """ id: Optional[str] = None """ Internal identifier of a language """ uri: Optional[str] = None """ Canonical URI of a language """ greeting: Optional[bool] = None """ Indicates whether a language is available as greeting language """ formatting_locale: Optional[bool] = None """ Indicates whether a language is available as formatting locale """ locale_code: Optional[str] = None """ Localization code of a language """ iso_code: Optional[str] = None """ Country code according to the ISO standard, see [ISO 3166](https://www.iso.org/iso-3166-country-codes.html) """ name: Optional[str] = None """ Official name of a language """ ui: Optional[bool] = None """ Indicates whether a language is available as UI language """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ExtensionCreationRequestRegionalSettingsGreetingLanguage(DataClassJsonMixin): """ Information on language used for telephony greetings """ id: Optional[str] = None """ Internal identifier of a greeting language """ locale_code: Optional[str] = None """ Localization code of a greeting language """ name: Optional[str] = None """ Official name of a greeting language """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ExtensionCreationRequestRegionalSettingsFormattingLocale(DataClassJsonMixin): """ Formatting language preferences for numbers, dates and currencies """ id: Optional[str] = None """ Internal identifier of a formatting language """ locale_code: Optional[str] = None """ Localization code of a formatting language """ name: Optional[str] = None class ExtensionCreationRequestRegionalSettingsTimeFormat(Enum): """ Time format setting. The default value is '12h' = ['12h', '24h'] """ OBJECT_12h = '12h' OBJECT_24h = '24h' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ExtensionCreationRequestRegionalSettings(DataClassJsonMixin): """ Extension region data (timezone, home country, language) """ home_country: Optional[dict] = None """ Extension country information """ timezone: Optional[ExtensionCreationRequestRegionalSettingsTimezone] = None """ Extension timezone information """ language: Optional[ExtensionCreationRequestRegionalSettingsLanguage] = None """ User interface language data """ greeting_language: Optional[ExtensionCreationRequestRegionalSettingsGreetingLanguage] = None """ Information on language used for telephony greetings """ formatting_locale: Optional[ExtensionCreationRequestRegionalSettingsFormattingLocale] = None """ Formatting language preferences for numbers, dates and currencies """ time_format: Optional[ExtensionCreationRequestRegionalSettingsTimeFormat] = None """ Time format setting. The default value is '12h' = ['12h', '24h'] """
/ringcentral_async_client-1.0.3-py3-none-any.whl/ringcentral_async_client/_code_gen/model/_2.py
0.782746
0.393385
_2.py
pypi
from ._12 import * @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateConferencingSettingsResponse(DataClassJsonMixin): uri: Optional[str] = None """ Canonical URI of a conferencing """ allow_join_before_host: Optional[bool] = None """ Determines if host user allows conference participants to join before the host """ host_code: Optional[str] = None """ Access code for a host user """ mode: Optional[str] = None """ Internal parameter specifying conferencing engine """ participant_code: Optional[str] = None """ Access code for any participant """ phone_number: Optional[str] = None """ Primary conference phone number for user's home country returned in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) format """ tap_to_join_uri: Optional[str] = None """ Short URL leading to the service web page Tap to Join for audio conference bridge """ phone_numbers: Optional[List[UpdateConferencingSettingsResponsePhoneNumbersItem]] = None """ List of multiple dial-in phone numbers to connect to audio conference service, relevant for user's brand. Each number is given with the country and location information, in order to let the user choose the less expensive way to connect to a conference. The first number in the list is the primary conference number, that is default and domestic """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountInfoResponseOperatorAccount(DataClassJsonMixin): """ Account information """ id: Optional[str] = None """ Internal identifier of an account """ uri: Optional[str] = None """ Canonical URI of an account """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountInfoResponseOperatorContactBusinessAddress(DataClassJsonMixin): """ Business address of extension user company """ country: Optional[str] = None """ Country name of an extension user company """ state: Optional[str] = None """ State/province name of an extension user company. Mandatory for the USA, UK and Canada """ city: Optional[str] = None """ City name of an extension user company """ street: Optional[str] = None """ Street address of an extension user company """ zip: Optional[str] = None """ Zip code of an extension user company """ class ReadAccountInfoResponseOperatorContactPronouncedNameType(Enum): """ Voice name type. 'Default' - default extension name; first name and last name specified in user profile; 'TextToSpeech' - custom text; user name spelled the way it sounds and specified by user; 'Recorded' - custom audio, user name recorded in user's own voice (supported only for extension retrieval) Generated by Python OpenAPI Parser """ Default = 'Default' TextToSpeech = 'TextToSpeech' Recorded = 'Recorded' class ReadAccountInfoResponseOperatorContactPronouncedNamePromptContentType(Enum): """ Content media type """ AudioMpeg = 'audio/mpeg' AudioWav = 'audio/wav' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountInfoResponseOperatorContactPronouncedNamePrompt(DataClassJsonMixin): id: Optional[str] = None content_uri: Optional[str] = None """ Link to a prompt resource """ content_type: Optional[ReadAccountInfoResponseOperatorContactPronouncedNamePromptContentType] = None """ Content media type """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountInfoResponseOperatorContactPronouncedName(DataClassJsonMixin): type: Optional[ReadAccountInfoResponseOperatorContactPronouncedNameType] = None """ Voice name type. 'Default' - default extension name; first name and last name specified in user profile; 'TextToSpeech' - custom text; user name spelled the way it sounds and specified by user; 'Recorded' - custom audio, user name recorded in user's own voice (supported only for extension retrieval) """ text: Optional[str] = None """ Custom text """ prompt: Optional[ReadAccountInfoResponseOperatorContactPronouncedNamePrompt] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountInfoResponseOperatorContact(DataClassJsonMixin): """ Contact detailed information """ first_name: Optional[str] = None """ For User extension type only. Extension user first name """ last_name: Optional[str] = None """ For User extension type only. Extension user last name """ company: Optional[str] = None """ Extension user company name """ job_title: Optional[str] = None email: Optional[str] = None """ Email of extension user """ business_phone: Optional[str] = None """ Extension user contact phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) (with '+' sign) format """ mobile_phone: Optional[str] = None """ Extension user mobile (**non** Toll Free) phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) (with '+' sign) format """ business_address: Optional[ReadAccountInfoResponseOperatorContactBusinessAddress] = None """ Business address of extension user company """ email_as_login_name: Optional[bool] = 'False' """ If 'True' then contact email is enabled as login name for this user. Please note that email should be unique in this case. """ pronounced_name: Optional[ReadAccountInfoResponseOperatorContactPronouncedName] = None department: Optional[str] = None """ Extension user department, if any """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountInfoResponseOperatorCustomFieldsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a custom field """ value: Optional[str] = None """ Custom field value """ display_name: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountInfoResponseOperatorDepartmentsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a department extension """ uri: Optional[str] = None """ Canonical URI of a department extension """ extension_number: Optional[str] = None """ Number of a department extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountInfoResponseOperatorPermissionsAdmin(DataClassJsonMixin): """ Admin permission """ enabled: Optional[bool] = None """ Specifies if a permission is enabled or not """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountInfoResponseOperatorPermissionsInternationalCalling(DataClassJsonMixin): """ International Calling permission """ enabled: Optional[bool] = None """ Specifies if a permission is enabled or not """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountInfoResponseOperatorPermissions(DataClassJsonMixin): """ Extension permissions, corresponding to the Service Web permissions 'Admin' and 'InternationalCalling' Generated by Python OpenAPI Parser """ admin: Optional[ReadAccountInfoResponseOperatorPermissionsAdmin] = None """ Admin permission """ international_calling: Optional[ReadAccountInfoResponseOperatorPermissionsInternationalCalling] = None """ International Calling permission """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountInfoResponseOperatorProfileImageScalesItem(DataClassJsonMixin): uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountInfoResponseOperatorProfileImage(DataClassJsonMixin): """ Information on profile image Required Properties: - uri Generated by Python OpenAPI Parser """ uri: str """ Link to a profile image. If an image is not uploaded for an extension, only uri is returned """ etag: Optional[str] = None """ Identifier of an image """ last_modified: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ The datetime when an image was last updated in ISO 8601 format, for example 2016-03-10T18:07:52.534Z """ content_type: Optional[str] = None """ The type of an image """ scales: Optional[List[ReadAccountInfoResponseOperatorProfileImageScalesItem]] = None """ List of URIs to profile images in different dimensions """ class ReadAccountInfoResponseOperatorReferencesItemType(Enum): """ Type of external identifier """ PartnerId = 'PartnerId' CustomerDirectoryId = 'CustomerDirectoryId' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountInfoResponseOperatorReferencesItem(DataClassJsonMixin): ref: Optional[str] = None """ Non-RC identifier of an extension """ type: Optional[ReadAccountInfoResponseOperatorReferencesItemType] = None """ Type of external identifier """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountInfoResponseOperatorRolesItem(DataClassJsonMixin): uri: Optional[str] = None id: Optional[str] = None """ Internal identifier of a role """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountInfoResponseOperatorRegionalSettingsHomeCountry(DataClassJsonMixin): """ Extension country information """ id: Optional[str] = None """ Internal identifier of a home country """ uri: Optional[str] = None """ Canonical URI of a home country """ name: Optional[str] = None """ Official name of a home country """ iso_code: Optional[str] = None """ ISO code of a country """ calling_code: Optional[str] = None """ Calling code of a country """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountInfoResponseOperatorRegionalSettingsTimezone(DataClassJsonMixin): """ Extension timezone information """ id: Optional[str] = None """ Internal identifier of a timezone """ uri: Optional[str] = None """ Canonical URI of a timezone """ name: Optional[str] = None """ Short name of a timezone """ description: Optional[str] = None """ Meaningful description of the timezone """ bias: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountInfoResponseOperatorRegionalSettingsLanguage(DataClassJsonMixin): """ User interface language data """ id: Optional[str] = None """ Internal identifier of a language """ uri: Optional[str] = None """ Canonical URI of a language """ greeting: Optional[bool] = None """ Indicates whether a language is available as greeting language """ formatting_locale: Optional[bool] = None """ Indicates whether a language is available as formatting locale """ locale_code: Optional[str] = None """ Localization code of a language """ iso_code: Optional[str] = None """ Country code according to the ISO standard, see [ISO 3166](https://www.iso.org/iso-3166-country-codes.html) """ name: Optional[str] = None """ Official name of a language """ ui: Optional[bool] = None """ Indicates whether a language is available as UI language """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountInfoResponseOperatorRegionalSettingsGreetingLanguage(DataClassJsonMixin): """ Information on language used for telephony greetings """ id: Optional[str] = None """ Internal identifier of a greeting language """ locale_code: Optional[str] = None """ Localization code of a greeting language """ name: Optional[str] = None """ Official name of a greeting language """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountInfoResponseOperatorRegionalSettingsFormattingLocale(DataClassJsonMixin): """ Formatting language preferences for numbers, dates and currencies """ id: Optional[str] = None """ Internal identifier of a formatting language """ locale_code: Optional[str] = None """ Localization code of a formatting language """ name: Optional[str] = None class ReadAccountInfoResponseOperatorRegionalSettingsTimeFormat(Enum): """ Time format setting. The default value is '12h' = ['12h', '24h'] """ OBJECT_12h = '12h' OBJECT_24h = '24h' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountInfoResponseOperatorRegionalSettings(DataClassJsonMixin): """ Extension region data (timezone, home country, language) """ home_country: Optional[ReadAccountInfoResponseOperatorRegionalSettingsHomeCountry] = None """ Extension country information """ timezone: Optional[ReadAccountInfoResponseOperatorRegionalSettingsTimezone] = None """ Extension timezone information """ language: Optional[ReadAccountInfoResponseOperatorRegionalSettingsLanguage] = None """ User interface language data """ greeting_language: Optional[ReadAccountInfoResponseOperatorRegionalSettingsGreetingLanguage] = None """ Information on language used for telephony greetings """ formatting_locale: Optional[ReadAccountInfoResponseOperatorRegionalSettingsFormattingLocale] = None """ Formatting language preferences for numbers, dates and currencies """ time_format: Optional[ReadAccountInfoResponseOperatorRegionalSettingsTimeFormat] = None """ Time format setting. The default value is '12h' = ['12h', '24h'] """ class ReadAccountInfoResponseOperatorServiceFeaturesItemFeatureName(Enum): """ Feature name """ AccountFederation = 'AccountFederation' Archiver = 'Archiver' AutomaticCallRecordingMute = 'AutomaticCallRecordingMute' AutomaticInboundCallRecording = 'AutomaticInboundCallRecording' AutomaticOutboundCallRecording = 'AutomaticOutboundCallRecording' BlockedMessageForwarding = 'BlockedMessageForwarding' Calendar = 'Calendar' CallerIdControl = 'CallerIdControl' CallForwarding = 'CallForwarding' CallPark = 'CallPark' CallParkLocations = 'CallParkLocations' CallSupervision = 'CallSupervision' CallSwitch = 'CallSwitch' CallQualitySurvey = 'CallQualitySurvey' Conferencing = 'Conferencing' ConferencingNumber = 'ConferencingNumber' ConfigureDelegates = 'ConfigureDelegates' DeveloperPortal = 'DeveloperPortal' DND = 'DND' DynamicConference = 'DynamicConference' EmergencyAddressAutoUpdate = 'EmergencyAddressAutoUpdate' EmergencyCalling = 'EmergencyCalling' EncryptionAtRest = 'EncryptionAtRest' ExternalDirectoryIntegration = 'ExternalDirectoryIntegration' Fax = 'Fax' FaxReceiving = 'FaxReceiving' FreeSoftPhoneLines = 'FreeSoftPhoneLines' HDVoice = 'HDVoice' HipaaCompliance = 'HipaaCompliance' Intercom = 'Intercom' InternationalCalling = 'InternationalCalling' InternationalSMS = 'InternationalSMS' LinkedSoftphoneLines = 'LinkedSoftphoneLines' MMS = 'MMS' MobileVoipEmergencyCalling = 'MobileVoipEmergencyCalling' OnDemandCallRecording = 'OnDemandCallRecording' Pager = 'Pager' PagerReceiving = 'PagerReceiving' Paging = 'Paging' PasswordAuth = 'PasswordAuth' PromoMessage = 'PromoMessage' Reports = 'Reports' Presence = 'Presence' RCTeams = 'RCTeams' RingOut = 'RingOut' SalesForce = 'SalesForce' SharedLines = 'SharedLines' SingleExtensionUI = 'SingleExtensionUI' SiteCodes = 'SiteCodes' SMS = 'SMS' SMSReceiving = 'SMSReceiving' SoftPhoneUpdate = 'SoftPhoneUpdate' TelephonySessions = 'TelephonySessions' UserManagement = 'UserManagement' VideoConferencing = 'VideoConferencing' VoipCalling = 'VoipCalling' VoipCallingOnMobile = 'VoipCallingOnMobile' Voicemail = 'Voicemail' VoicemailToText = 'VoicemailToText' WebPhone = 'WebPhone' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountInfoResponseOperatorServiceFeaturesItem(DataClassJsonMixin): enabled: Optional[bool] = None """ Feature status; shows feature availability for an extension """ feature_name: Optional[ReadAccountInfoResponseOperatorServiceFeaturesItemFeatureName] = None """ Feature name """ reason: Optional[str] = None """ Reason for limitation of a particular service feature. Returned only if the enabled parameter value is 'False', see Service Feature Limitations and Reasons. When retrieving service features for an extension, the reasons for the limitations, if any, are returned in response """ class ReadAccountInfoResponseOperatorSetupWizardState(Enum): """ Specifies extension configuration wizard state (web service setup). """ NotStarted = 'NotStarted' Incomplete = 'Incomplete' Completed = 'Completed' class ReadAccountInfoResponseOperatorStatus(Enum): """ Extension current state. If 'Unassigned' is specified, then extensions without ‘extensionNumber’ are returned. If not specified, then all extensions are returned Generated by Python OpenAPI Parser """ Enabled = 'Enabled' Disabled = 'Disabled' Frozen = 'Frozen' NotActivated = 'NotActivated' Unassigned = 'Unassigned' class ReadAccountInfoResponseOperatorStatusInfoReason(Enum): """ Type of suspension """ Voluntarily = 'Voluntarily' Involuntarily = 'Involuntarily' SuspendedVoluntarily = 'SuspendedVoluntarily' SuspendedVoluntarily2 = 'SuspendedVoluntarily2' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountInfoResponseOperatorStatusInfo(DataClassJsonMixin): """ Status information (reason, comment). Returned for 'Disabled' status only """ comment: Optional[str] = None """ A free-form user comment, describing the status change reason """ reason: Optional[ReadAccountInfoResponseOperatorStatusInfoReason] = None """ Type of suspension """ class ReadAccountInfoResponseOperatorType(Enum): """ Extension type """ User = 'User' FaxUser = 'FaxUser' VirtualUser = 'VirtualUser' DigitalUser = 'DigitalUser' Department = 'Department' Announcement = 'Announcement' Voicemail = 'Voicemail' SharedLinesGroup = 'SharedLinesGroup' PagingOnly = 'PagingOnly' IvrMenu = 'IvrMenu' ApplicationExtension = 'ApplicationExtension' ParkLocation = 'ParkLocation' Bot = 'Bot' Room = 'Room' Limited = 'Limited' Site = 'Site' ProxyAdmin = 'ProxyAdmin' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountInfoResponseOperatorCallQueueInfo(DataClassJsonMixin): """ For Department extension type only. Call queue settings """ sla_goal: Optional[int] = None """ Target percentage of calls that must be answered by agents within the service level time threshold """ sla_threshold_seconds: Optional[int] = None """ Period of time in seconds that is considered to be an acceptable service level """ include_abandoned_calls: Optional[bool] = None """ If 'True' abandoned calls (hanged up prior to being served) are included into service level calculation """ abandoned_threshold_seconds: Optional[int] = None """ Period of time in seconds specifying abandoned calls duration - calls that are shorter will not be included into the calculation of service level.; zero value means that abandoned calls of any duration will be included into calculation """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountInfoResponseOperatorSite(DataClassJsonMixin): """ Site data. If multi-site feature is turned on for the account, then internal identifier of a site must be specified. To assign the wireless point to the main site (company) set site ID to `main-site` Generated by Python OpenAPI Parser """ id: Optional[str] = None """ Internal identifier of a site """ uri: Optional[str] = None """ Link to a site resource """ name: Optional[str] = None """ Name of a site """ code: Optional[str] = None """ Site code value. Returned only if specified """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountInfoResponseOperator(DataClassJsonMixin): """ Operator's extension information. This extension will receive all calls and messages intended for the operator Generated by Python OpenAPI Parser """ id: Optional[int] = None """ Internal identifier of an extension """ uri: Optional[str] = None """ Canonical URI of an extension """ account: Optional[ReadAccountInfoResponseOperatorAccount] = None """ Account information """ contact: Optional[ReadAccountInfoResponseOperatorContact] = None """ Contact detailed information """ custom_fields: Optional[List[ReadAccountInfoResponseOperatorCustomFieldsItem]] = None departments: Optional[List[ReadAccountInfoResponseOperatorDepartmentsItem]] = None """ Information on department extension(s), to which the requested extension belongs. Returned only for user extensions, members of department, requested by single extensionId """ extension_number: Optional[str] = None """ Number of department extension """ extension_numbers: Optional[List[str]] = None name: Optional[str] = None """ Extension name. For user extension types the value is a combination of the specified first name and last name """ partner_id: Optional[str] = None """ For Partner Applications Internal identifier of an extension created by partner. The RingCentral supports the mapping of accounts and stores the corresponding account ID/extension ID for each partner ID of a client application. In request URIs partner IDs are accepted instead of regular RingCentral native IDs as path parameters using pid = XXX clause. Though in response URIs contain the corresponding account IDs and extension IDs. In all request and response bodies these values are reflected via partnerId attributes of account and extension """ permissions: Optional[ReadAccountInfoResponseOperatorPermissions] = None """ Extension permissions, corresponding to the Service Web permissions 'Admin' and 'InternationalCalling' """ profile_image: Optional[ReadAccountInfoResponseOperatorProfileImage] = None """ Information on profile image """ references: Optional[List[ReadAccountInfoResponseOperatorReferencesItem]] = None """ List of non-RC internal identifiers assigned to an extension """ roles: Optional[List[ReadAccountInfoResponseOperatorRolesItem]] = None regional_settings: Optional[ReadAccountInfoResponseOperatorRegionalSettings] = None """ Extension region data (timezone, home country, language) """ service_features: Optional[List[ReadAccountInfoResponseOperatorServiceFeaturesItem]] = None """ Extension service features returned in response only when the logged-in user requests his/her own extension info, see also Extension Service Features """ setup_wizard_state: Optional[ReadAccountInfoResponseOperatorSetupWizardState] = 'NotStarted' """ Specifies extension configuration wizard state (web service setup). """ status: Optional[ReadAccountInfoResponseOperatorStatus] = None """ Extension current state. If 'Unassigned' is specified, then extensions without ‘extensionNumber’ are returned. If not specified, then all extensions are returned """ status_info: Optional[ReadAccountInfoResponseOperatorStatusInfo] = None """ Status information (reason, comment). Returned for 'Disabled' status only """ type: Optional[ReadAccountInfoResponseOperatorType] = None """ Extension type """ call_queue_info: Optional[ReadAccountInfoResponseOperatorCallQueueInfo] = None """ For Department extension type only. Call queue settings """ hidden: Optional[bool] = None """ Hides extension from showing in company directory. Supported for extensions of User type only """ site: Optional[ReadAccountInfoResponseOperatorSite] = None """ Site data. If multi-site feature is turned on for the account, then internal identifier of a site must be specified. To assign the wireless point to the main site (company) set site ID to `main-site` """ class ReadAccountInfoResponseServiceInfoBillingPlanDurationUnit(Enum): """ Duration period """ Month = 'Month' Day = 'Day' class ReadAccountInfoResponseServiceInfoBillingPlanType(Enum): """ Billing plan type """ Initial = 'Initial' Regular = 'Regular' Suspended = 'Suspended' Trial = 'Trial' TrialNoCC = 'TrialNoCC' Free = 'Free' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountInfoResponseServiceInfoBillingPlan(DataClassJsonMixin): """ Information on account billing plan """ id: Optional[str] = None """ Internal identifier of a billing plan """ name: Optional[str] = None """ Billing plan name """ duration_unit: Optional[ReadAccountInfoResponseServiceInfoBillingPlanDurationUnit] = None """ Duration period """ duration: Optional[int] = None """ Number of duration units """ type: Optional[ReadAccountInfoResponseServiceInfoBillingPlanType] = None """ Billing plan type """ included_phone_lines: Optional[int] = None """ Included digital lines count """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountInfoResponseServiceInfoBrandHomeCountry(DataClassJsonMixin): """ Home country information """ id: Optional[str] = None """ Internal identifier of a home country """ uri: Optional[str] = None """ Canonical URI of a home country """ name: Optional[str] = None """ Official name of a home country """ iso_code: Optional[str] = None """ ISO code of a country """ calling_code: Optional[str] = None """ Calling code of a country """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountInfoResponseServiceInfoBrand(DataClassJsonMixin): """ Information on account brand """ id: Optional[str] = None """ Internal identifier of a brand """ name: Optional[str] = None """ Brand name, for example RingCentral UK , ClearFax """ home_country: Optional[ReadAccountInfoResponseServiceInfoBrandHomeCountry] = None """ Home country information """ class ReadAccountInfoResponseServiceInfoServicePlanFreemiumProductType(Enum): Freyja = 'Freyja' Phoenix = 'Phoenix' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountInfoResponseServiceInfoServicePlan(DataClassJsonMixin): """ Information on account service plan """ id: Optional[str] = None """ Internal identifier of a service plan """ name: Optional[str] = None """ Name of a service plan """ edition: Optional[str] = None """ Edition of a service plan """ freemium_product_type: Optional[ReadAccountInfoResponseServiceInfoServicePlanFreemiumProductType] = None class ReadAccountInfoResponseServiceInfoTargetServicePlanFreemiumProductType(Enum): Freyja = 'Freyja' Phoenix = 'Phoenix' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountInfoResponseServiceInfoTargetServicePlan(DataClassJsonMixin): """ Information on account target service plan """ id: Optional[str] = None """ Internal identifier of a target service plan """ name: Optional[str] = None """ Name of a target service plan """ edition: Optional[str] = None """ Edition of a service plan """ freemium_product_type: Optional[ReadAccountInfoResponseServiceInfoTargetServicePlanFreemiumProductType] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountInfoResponseServiceInfoContractedCountry(DataClassJsonMixin): """ Information on the contracted country of account """ id: Optional[str] = None """ Identifier of a contracted country """ uri: Optional[str] = None """ Canonical URI of a contracted country """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountInfoResponseServiceInfo(DataClassJsonMixin): """ Account service information, including brand, service plan and billing plan """ uri: Optional[str] = None """ Canonical URI of a service info resource """ billing_plan: Optional[ReadAccountInfoResponseServiceInfoBillingPlan] = None """ Information on account billing plan """ brand: Optional[ReadAccountInfoResponseServiceInfoBrand] = None """ Information on account brand """ service_plan: Optional[ReadAccountInfoResponseServiceInfoServicePlan] = None """ Information on account service plan """ target_service_plan: Optional[ReadAccountInfoResponseServiceInfoTargetServicePlan] = None """ Information on account target service plan """ contracted_country: Optional[ReadAccountInfoResponseServiceInfoContractedCountry] = None """ Information on the contracted country of account """ class ReadAccountInfoResponseSetupWizardState(Enum): """ Specifies account configuration wizard state (web service setup) """ NotStarted = 'NotStarted' Incomplete = 'Incomplete' Completed = 'Completed' class ReadAccountInfoResponseSignupInfoSignupStateItem(Enum): AccountCreated = 'AccountCreated' BillingEntered = 'BillingEntered' CreditCardApproved = 'CreditCardApproved' AccountConfirmed = 'AccountConfirmed' PhoneVerificationRequired = 'PhoneVerificationRequired' PhoneVerificationPassed = 'PhoneVerificationPassed' class ReadAccountInfoResponseSignupInfoVerificationReason(Enum): CC_Failed = 'CC_Failed' Phone_Suspicious = 'Phone_Suspicious' CC_Phone_Not_Match = 'CC_Phone_Not_Match' AVS_Not_Available = 'AVS_Not_Available' MaxMind = 'MaxMind' CC_Blacklisted = 'CC_Blacklisted' Email_Blacklisted = 'Email_Blacklisted' Phone_Blacklisted = 'Phone_Blacklisted' Cookie_Blacklisted = 'Cookie_Blacklisted' Device_Blacklisted = 'Device_Blacklisted' IP_Blacklisted = 'IP_Blacklisted' Agent_Instance_Blacklisted = 'Agent_Instance_Blacklisted' Charge_Limit = 'Charge_Limit' Other_Country = 'Other_Country' Unknown = 'Unknown' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountInfoResponseSignupInfo(DataClassJsonMixin): """ Account sign up data """ tos_accepted: Optional[bool] = False signup_state: Optional[List[ReadAccountInfoResponseSignupInfoSignupStateItem]] = None verification_reason: Optional[ReadAccountInfoResponseSignupInfoVerificationReason] = None marketing_accepted: Optional[bool] = None """ Updates 'Send Marketing Information' flag on web interface """ class ReadAccountInfoResponseStatus(Enum): """ Status of the current account """ Initial = 'Initial' Confirmed = 'Confirmed' Unconfirmed = 'Unconfirmed' Disabled = 'Disabled' class ReadAccountInfoResponseStatusInfoReason(Enum): """ Type of suspension """ SuspendedVoluntarily = 'SuspendedVoluntarily' SuspendedInvoluntarily = 'SuspendedInvoluntarily' UserResumed = 'UserResumed' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountInfoResponseStatusInfo(DataClassJsonMixin): """ Status information (reason, comment, lifetime). Returned for 'Disabled' status only """ comment: Optional[str] = None """ A free-form user comment, describing the status change reason """ reason: Optional[ReadAccountInfoResponseStatusInfoReason] = None """ Type of suspension """ till: Optional[str] = None """ Date until which the account will get deleted. The default value is 30 days since current date """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountInfoResponseRegionalSettingsHomeCountry(DataClassJsonMixin): """ Extension country information """ id: Optional[str] = None """ Internal identifier of a home country """ uri: Optional[str] = None """ Canonical URI of a home country """ name: Optional[str] = None """ Official name of a home country """ iso_code: Optional[str] = None """ ISO code of a country """ calling_code: Optional[str] = None """ Calling code of a country """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountInfoResponseRegionalSettingsTimezone(DataClassJsonMixin): """ Extension timezone information """ id: Optional[str] = None """ Internal identifier of a timezone """ uri: Optional[str] = None """ Canonical URI of a timezone """ name: Optional[str] = None """ Short name of a timezone """ description: Optional[str] = None """ Meaningful description of the timezone """ bias: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountInfoResponseRegionalSettingsLanguage(DataClassJsonMixin): """ User interface language data """ id: Optional[str] = None """ Internal identifier of a language """ uri: Optional[str] = None """ Canonical URI of a language """ greeting: Optional[bool] = None """ Indicates whether a language is available as greeting language """ formatting_locale: Optional[bool] = None """ Indicates whether a language is available as formatting locale """ locale_code: Optional[str] = None """ Localization code of a language """ iso_code: Optional[str] = None """ Country code according to the ISO standard, see [ISO 3166](https://www.iso.org/iso-3166-country-codes.html) """ name: Optional[str] = None """ Official name of a language """ ui: Optional[bool] = None """ Indicates whether a language is available as UI language """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountInfoResponseRegionalSettingsGreetingLanguage(DataClassJsonMixin): """ Information on language used for telephony greetings """ id: Optional[str] = None """ Internal identifier of a greeting language """ locale_code: Optional[str] = None """ Localization code of a greeting language """ name: Optional[str] = None """ Official name of a greeting language """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountInfoResponseRegionalSettingsFormattingLocale(DataClassJsonMixin): """ Formatting language preferences for numbers, dates and currencies """ id: Optional[str] = None """ Internal identifier of a formatting language """ locale_code: Optional[str] = None """ Localization code of a formatting language """ name: Optional[str] = None class ReadAccountInfoResponseRegionalSettingsTimeFormat(Enum): """ Time format setting. The default value is '12h' = ['12h', '24h'] """ OBJECT_12h = '12h' OBJECT_24h = '24h' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountInfoResponseRegionalSettingsCurrency(DataClassJsonMixin): """ Currency information """ id: Optional[str] = None """ Internal identifier of a currency """ code: Optional[str] = None """ Official code of a currency """ name: Optional[str] = None """ Official name of a currency """ symbol: Optional[str] = None """ Graphic symbol of a currency """ minor_symbol: Optional[str] = None """ Minor graphic symbol of a currency """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountInfoResponseRegionalSettings(DataClassJsonMixin): """ Account level region data (web service Auto-Receptionist settings) """ home_country: Optional[ReadAccountInfoResponseRegionalSettingsHomeCountry] = None """ Extension country information """ timezone: Optional[ReadAccountInfoResponseRegionalSettingsTimezone] = None """ Extension timezone information """ language: Optional[ReadAccountInfoResponseRegionalSettingsLanguage] = None """ User interface language data """ greeting_language: Optional[ReadAccountInfoResponseRegionalSettingsGreetingLanguage] = None """ Information on language used for telephony greetings """ formatting_locale: Optional[ReadAccountInfoResponseRegionalSettingsFormattingLocale] = None """ Formatting language preferences for numbers, dates and currencies """ time_format: Optional[ReadAccountInfoResponseRegionalSettingsTimeFormat] = None """ Time format setting. The default value is '12h' = ['12h', '24h'] """ currency: Optional[ReadAccountInfoResponseRegionalSettingsCurrency] = None """ Currency information """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountInfoResponseLimits(DataClassJsonMixin): """ Limits which are effective for the account """ free_soft_phone_lines_per_extension: Optional[int] = None """ Max number of free softphone phone lines per user extension """ meeting_size: Optional[int] = None """ Max number of participants in RingCentral meeting hosted by this account's user """ cloud_recording_storage: Optional[int] = None """ Meetings recording cloud storage limitaion in Gb """ max_monitored_extensions_per_user: Optional[int] = None """ Max number of extensions which can be included in the list of users monitored for Presence """ max_extension_number_length: Optional[int] = 5 """ Max length of extension numbers of an account; the supported value is up to 8 symbols, depends on account type """ site_code_length: Optional[int] = None """ Length of a site code """ short_extension_number_length: Optional[int] = None """ Length of a short extension number """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountInfoResponse(DataClassJsonMixin): id: Optional[int] = None """ Internal identifier of an account """ uri: Optional[str] = None """ Canonical URI of an account """ bsid: Optional[str] = None """ Internal identifier of an account in the billing system """ main_number: Optional[str] = None """ Main phone number of the current account """ operator: Optional[ReadAccountInfoResponseOperator] = None """ Operator's extension information. This extension will receive all calls and messages intended for the operator """ partner_id: Optional[str] = None """ Additional account identifier, created by partner application and applied on client side """ service_info: Optional[ReadAccountInfoResponseServiceInfo] = None """ Account service information, including brand, service plan and billing plan """ setup_wizard_state: Optional[ReadAccountInfoResponseSetupWizardState] = 'NotStarted' """ Specifies account configuration wizard state (web service setup) """ signup_info: Optional[ReadAccountInfoResponseSignupInfo] = None """ Account sign up data """ status: Optional[ReadAccountInfoResponseStatus] = None """ Status of the current account """ status_info: Optional[ReadAccountInfoResponseStatusInfo] = None """ Status information (reason, comment, lifetime). Returned for 'Disabled' status only """ regional_settings: Optional[ReadAccountInfoResponseRegionalSettings] = None """ Account level region data (web service Auto-Receptionist settings) """ federated: Optional[bool] = None """ Specifies whether an account is included into any federation of accounts or not """ outbound_call_prefix: Optional[int] = None """ If outbound call prefix is not specified, or set to null (0), then the parameter is not returned; the supported value range is 2-9 """ cfid: Optional[str] = None """ Customer facing identifier. Returned for accounts with the turned off PBX features. Equals to main company number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) (without '+' sign)format """ limits: Optional[ReadAccountInfoResponseLimits] = None """ Limits which are effective for the account """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountBusinessAddressResponseBusinessAddress(DataClassJsonMixin): country: Optional[str] = None """ Country name of an extension user company """ state: Optional[str] = None """ State/province name of an extension user company. Mandatory for the USA, UK and Canada """ city: Optional[str] = None """ City name of an extension user company """ street: Optional[str] = None """ Street address of an extension user company """ zip: Optional[str] = None """ Zip code of an extension user company """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountBusinessAddressResponse(DataClassJsonMixin): uri: Optional[str] = None business_address: Optional[ReadAccountBusinessAddressResponseBusinessAddress] = None company: Optional[str] = None email: Optional[str] = None main_site_name: Optional[str] = None """ Custom site name """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAccountBusinessAddressRequestBusinessAddress(DataClassJsonMixin): """ Company business address """ country: Optional[str] = None """ Name of a country """ state: Optional[str] = None """ Name of a state/province """ city: Optional[str] = None """ Name of a city """ street: Optional[str] = None """ Street address """ zip: Optional[str] = None """ Zip code """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAccountBusinessAddressRequest(DataClassJsonMixin): company: Optional[str] = None """ Company business name """ email: Optional[str] = None """ Company business email address """ business_address: Optional[UpdateAccountBusinessAddressRequestBusinessAddress] = None """ Company business address """ main_site_name: Optional[str] = None """ Custom site name """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAccountBusinessAddressResponseBusinessAddress(DataClassJsonMixin): country: Optional[str] = None """ Country name of an extension user company """ state: Optional[str] = None """ State/province name of an extension user company. Mandatory for the USA, UK and Canada """ city: Optional[str] = None """ City name of an extension user company """ street: Optional[str] = None """ Street address of an extension user company """ zip: Optional[str] = None """ Zip code of an extension user company """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateAccountBusinessAddressResponse(DataClassJsonMixin): uri: Optional[str] = None business_address: Optional[UpdateAccountBusinessAddressResponseBusinessAddress] = None company: Optional[str] = None email: Optional[str] = None main_site_name: Optional[str] = None """ Custom site name """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountServiceInfoResponseBrandHomeCountry(DataClassJsonMixin): """ Home country information """ id: Optional[str] = None """ Internal identifier of a home country """ uri: Optional[str] = None """ Canonical URI of a home country """ name: Optional[str] = None """ Official name of a home country """ iso_code: Optional[str] = None """ ISO code of a country """ calling_code: Optional[str] = None """ Calling code of a country """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountServiceInfoResponseBrand(DataClassJsonMixin): """ Information on account brand """ id: Optional[str] = None """ Internal identifier of a brand """ name: Optional[str] = None """ Brand name, for example RingCentral UK , ClearFax """ home_country: Optional[ReadAccountServiceInfoResponseBrandHomeCountry] = None """ Home country information """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountServiceInfoResponseContractedCountry(DataClassJsonMixin): """ Information on the contracted country of account """ id: Optional[str] = None """ Identifier of a contracted country """ uri: Optional[str] = None """ Canonical URI of a contracted country """ class ReadAccountServiceInfoResponseServicePlanFreemiumProductType(Enum): Freyja = 'Freyja' Phoenix = 'Phoenix' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountServiceInfoResponseServicePlan(DataClassJsonMixin): """ Information on account service plan """ id: Optional[str] = None """ Internal identifier of a service plan """ name: Optional[str] = None """ Name of a service plan """ edition: Optional[str] = None """ Edition of a service plan """ freemium_product_type: Optional[ReadAccountServiceInfoResponseServicePlanFreemiumProductType] = None class ReadAccountServiceInfoResponseTargetServicePlanFreemiumProductType(Enum): Freyja = 'Freyja' Phoenix = 'Phoenix' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountServiceInfoResponseTargetServicePlan(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a target service plan """ name: Optional[str] = None """ Name of a target service plan """ edition: Optional[str] = None """ Edition of a service plan """ freemium_product_type: Optional[ReadAccountServiceInfoResponseTargetServicePlanFreemiumProductType] = None class ReadAccountServiceInfoResponseBillingPlanDurationUnit(Enum): """ Duration period """ Month = 'Month' Day = 'Day' class ReadAccountServiceInfoResponseBillingPlanType(Enum): """ Billing plan type """ Initial = 'Initial' Regular = 'Regular' Suspended = 'Suspended' Trial = 'Trial' TrialNoCC = 'TrialNoCC' Free = 'Free' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountServiceInfoResponseBillingPlan(DataClassJsonMixin): """ Information on account billing plan """ id: Optional[str] = None """ Internal identifier of a billing plan """ name: Optional[str] = None """ Billing plan name """ duration_unit: Optional[ReadAccountServiceInfoResponseBillingPlanDurationUnit] = None """ Duration period """ duration: Optional[int] = None """ Number of duration units """ type: Optional[ReadAccountServiceInfoResponseBillingPlanType] = None """ Billing plan type """ included_phone_lines: Optional[int] = None """ Included digital lines count """ class ReadAccountServiceInfoResponseServiceFeaturesItemFeatureName(Enum): """ Feature name """ AccountFederation = 'AccountFederation' Archiver = 'Archiver' AutomaticCallRecordingMute = 'AutomaticCallRecordingMute' AutomaticInboundCallRecording = 'AutomaticInboundCallRecording' AutomaticOutboundCallRecording = 'AutomaticOutboundCallRecording' BlockedMessageForwarding = 'BlockedMessageForwarding' Calendar = 'Calendar' CallerIdControl = 'CallerIdControl' CallForwarding = 'CallForwarding' CallPark = 'CallPark' CallParkLocations = 'CallParkLocations' CallSupervision = 'CallSupervision' CallSwitch = 'CallSwitch' CallQualitySurvey = 'CallQualitySurvey' Conferencing = 'Conferencing' ConferencingNumber = 'ConferencingNumber' ConfigureDelegates = 'ConfigureDelegates' DeveloperPortal = 'DeveloperPortal' DND = 'DND' DynamicConference = 'DynamicConference' EmergencyAddressAutoUpdate = 'EmergencyAddressAutoUpdate' EmergencyCalling = 'EmergencyCalling' EncryptionAtRest = 'EncryptionAtRest' ExternalDirectoryIntegration = 'ExternalDirectoryIntegration' Fax = 'Fax' FaxReceiving = 'FaxReceiving' FreeSoftPhoneLines = 'FreeSoftPhoneLines' HDVoice = 'HDVoice' HipaaCompliance = 'HipaaCompliance' Intercom = 'Intercom' InternationalCalling = 'InternationalCalling' InternationalSMS = 'InternationalSMS' LinkedSoftphoneLines = 'LinkedSoftphoneLines' MMS = 'MMS' MobileVoipEmergencyCalling = 'MobileVoipEmergencyCalling' OnDemandCallRecording = 'OnDemandCallRecording' Pager = 'Pager' PagerReceiving = 'PagerReceiving' Paging = 'Paging' PasswordAuth = 'PasswordAuth' PromoMessage = 'PromoMessage' Reports = 'Reports' Presence = 'Presence' RCTeams = 'RCTeams' RingOut = 'RingOut' SalesForce = 'SalesForce' SharedLines = 'SharedLines' SingleExtensionUI = 'SingleExtensionUI' SiteCodes = 'SiteCodes' SMS = 'SMS' SMSReceiving = 'SMSReceiving' SoftPhoneUpdate = 'SoftPhoneUpdate' TelephonySessions = 'TelephonySessions' UserManagement = 'UserManagement' VideoConferencing = 'VideoConferencing' VoipCalling = 'VoipCalling' VoipCallingOnMobile = 'VoipCallingOnMobile' Voicemail = 'Voicemail' VoicemailToText = 'VoicemailToText' WebPhone = 'WebPhone' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountServiceInfoResponseServiceFeaturesItem(DataClassJsonMixin): feature_name: Optional[ReadAccountServiceInfoResponseServiceFeaturesItemFeatureName] = None """ Feature name """ enabled: Optional[bool] = None """ Feature status, shows feature availability for the extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountServiceInfoResponseLimits(DataClassJsonMixin): """ Limits which are effective for the account """ free_soft_phone_lines_per_extension: Optional[int] = None """ Max number of free softphone phone lines per user extension """ meeting_size: Optional[int] = None """ Max number of participants in RingCentral meeting hosted by this account's user """ cloud_recording_storage: Optional[int] = None """ Meetings recording cloud storage limitaion in Gb """ max_monitored_extensions_per_user: Optional[int] = None """ Max number of extensions which can be included in the list of users monitored for Presence """ max_extension_number_length: Optional[int] = 5 """ Max length of extension numbers of an account; the supported value is up to 8 symbols, depends on account type """ site_code_length: Optional[int] = None """ Length of a site code """ short_extension_number_length: Optional[int] = None """ Length of a short extension number """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountServiceInfoResponsePackage(DataClassJsonMixin): version: Optional[str] = None id: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountServiceInfoResponse(DataClassJsonMixin): uri: Optional[str] = None """ Canonical URI of the account Service Info resource """ service_plan_name: Optional[str] = None """ Account Service Plan name """ brand: Optional[ReadAccountServiceInfoResponseBrand] = None """ Information on account brand """ contracted_country: Optional[ReadAccountServiceInfoResponseContractedCountry] = None """ Information on the contracted country of account """ service_plan: Optional[ReadAccountServiceInfoResponseServicePlan] = None """ Information on account service plan """ target_service_plan: Optional[ReadAccountServiceInfoResponseTargetServicePlan] = None billing_plan: Optional[ReadAccountServiceInfoResponseBillingPlan] = None """ Information on account billing plan """ service_features: Optional[List[ReadAccountServiceInfoResponseServiceFeaturesItem]] = None """ Service features information, see Service Feature List """ limits: Optional[ReadAccountServiceInfoResponseLimits] = None """ Limits which are effective for the account """ package: Optional[ReadAccountServiceInfoResponsePackage] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListLanguagesResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a language """ uri: Optional[str] = None """ Canonical URI of a language """ greeting: Optional[bool] = None """ Indicates whether a language is available as greeting language """ formatting_locale: Optional[bool] = None """ Indicates whether a language is available as formatting locale """ locale_code: Optional[str] = None """ Localization code of a language """ iso_code: Optional[str] = None """ Country code according to the ISO standard, see [ISO 3166](https://www.iso.org/iso-3166-country-codes.html) """ name: Optional[str] = None """ Official name of a language """ ui: Optional[bool] = None """ Indicates whether a language is available as UI language """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListLanguagesResponseNavigationFirstPage(DataClassJsonMixin): """ Canonical URI for the first page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListLanguagesResponseNavigationNextPage(DataClassJsonMixin): """ Canonical URI for the next page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListLanguagesResponseNavigationPreviousPage(DataClassJsonMixin): """ Canonical URI for the previous page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListLanguagesResponseNavigationLastPage(DataClassJsonMixin): """ Canonical URI for the last page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListLanguagesResponseNavigation(DataClassJsonMixin): """ Information on navigation """ first_page: Optional[ListLanguagesResponseNavigationFirstPage] = None """ Canonical URI for the first page of the list """ next_page: Optional[ListLanguagesResponseNavigationNextPage] = None """ Canonical URI for the next page of the list """ previous_page: Optional[ListLanguagesResponseNavigationPreviousPage] = None """ Canonical URI for the previous page of the list """ last_page: Optional[ListLanguagesResponseNavigationLastPage] = None """ Canonical URI for the last page of the list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListLanguagesResponsePaging(DataClassJsonMixin): """ Information on paging """ page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) """ per_page: Optional[int] = None """ Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty """ total_pages: Optional[int] = None """ The total number of pages in a dataset. May be omitted for some resources due to performance reasons """ total_elements: Optional[int] = None """ The total number of elements in a dataset. May be omitted for some resource due to performance reasons """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListLanguagesResponse(DataClassJsonMixin): uri: Optional[str] = None """ Canonical URI of the language list resource """ records: Optional[List[ListLanguagesResponseRecordsItem]] = None """ Language data """ navigation: Optional[ListLanguagesResponseNavigation] = None """ Information on navigation """ paging: Optional[ListLanguagesResponsePaging] = None """ Information on paging """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadLanguageResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a language """ uri: Optional[str] = None """ Canonical URI of a language """ greeting: Optional[bool] = None """ Indicates whether a language is available as greeting language """ formatting_locale: Optional[bool] = None """ Indicates whether a language is available as formatting locale """ locale_code: Optional[str] = None """ Localization code of a language """ iso_code: Optional[str] = None """ Country code according to the ISO standard, see [ISO 3166](https://www.iso.org/iso-3166-country-codes.html) """ name: Optional[str] = None """ Official name of a language """ ui: Optional[bool] = None """ Indicates whether a language is available as UI language """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCountriesResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a country """ uri: Optional[str] = None """ Canonical URI of a country """ calling_code: Optional[str] = None """ Country calling code defined by ITU-T recommendations [E.123](https://www.itu.int/rec/T-REC-E.123-200102-I/en) and [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) """ emergency_calling: Optional[bool] = None """ Emergency calling feature availability/emergency address requirement indicator """ iso_code: Optional[str] = None """ Country code according to the ISO standard, see [ISO 3166](https://www.iso.org/iso-3166-country-codes.html) """ name: Optional[str] = None """ Official name of a country """ number_selling: Optional[bool] = None """ Determines whether phone numbers are available for a country """ login_allowed: Optional[bool] = None """ Specifies whether login with the phone numbers of this country is enabled or not """ signup_allowed: Optional[bool] = None """ Indicates whether signup/billing is allowed for a country """ free_softphone_line: Optional[bool] = None """ Specifies if free phone line for softphone is available for a country or not """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCountriesResponseNavigationFirstPage(DataClassJsonMixin): """ Canonical URI for the first page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCountriesResponseNavigationNextPage(DataClassJsonMixin): """ Canonical URI for the next page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCountriesResponseNavigationPreviousPage(DataClassJsonMixin): """ Canonical URI for the previous page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCountriesResponseNavigationLastPage(DataClassJsonMixin): """ Canonical URI for the last page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCountriesResponseNavigation(DataClassJsonMixin): """ Information on navigation """ first_page: Optional[ListCountriesResponseNavigationFirstPage] = None """ Canonical URI for the first page of the list """ next_page: Optional[ListCountriesResponseNavigationNextPage] = None """ Canonical URI for the next page of the list """ previous_page: Optional[ListCountriesResponseNavigationPreviousPage] = None """ Canonical URI for the previous page of the list """ last_page: Optional[ListCountriesResponseNavigationLastPage] = None """ Canonical URI for the last page of the list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCountriesResponsePaging(DataClassJsonMixin): """ Information on paging """ page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) """ per_page: Optional[int] = None """ Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty """ total_pages: Optional[int] = None """ The total number of pages in a dataset. May be omitted for some resources due to performance reasons """ total_elements: Optional[int] = None """ The total number of elements in a dataset. May be omitted for some resource due to performance reasons """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListCountriesResponse(DataClassJsonMixin): """ Required Properties: - navigation - paging - records Generated by Python OpenAPI Parser """ records: List[ListCountriesResponseRecordsItem] """ List of countries with the country data """ navigation: ListCountriesResponseNavigation """ Information on navigation """ paging: ListCountriesResponsePaging """ Information on paging """ uri: Optional[str] = None """ Link to the list of countries supported """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadCountryResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a country """ uri: Optional[str] = None """ Canonical URI of a country """ calling_code: Optional[str] = None """ Country calling code defined by ITU-T recommendations [E.123](https://www.itu.int/rec/T-REC-E.123-200102-I/en) and [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) """ emergency_calling: Optional[bool] = None """ Emergency calling feature availability/emergency address requirement indicator """ iso_code: Optional[str] = None """ Country code according to the ISO standard, see [ISO 3166](https://www.iso.org/iso-3166-country-codes.html) """ name: Optional[str] = None """ Official name of a country """ number_selling: Optional[bool] = None """ Determines whether phone numbers are available for a country """ login_allowed: Optional[bool] = None """ Specifies whether login with the phone numbers of this country is enabled or not """ signup_allowed: Optional[bool] = None """ Indicates whether signup/billing is allowed for a country """ free_softphone_line: Optional[bool] = None """ Specifies if free phone line for softphone is available for a country or not """ class ListLocationsOrderBy(Enum): Npa = 'Npa' City = 'City' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListLocationsResponseRecordsItemState(DataClassJsonMixin): """ Information on the state this location belongs to """ id: Optional[str] = None """ Internal identifier of a state """ uri: Optional[str] = None """ Link to a state resource """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListLocationsResponseRecordsItem(DataClassJsonMixin): uri: Optional[str] = None """ Canonical URI of a location """ area_code: Optional[str] = None """ Area code of the location """ city: Optional[str] = None """ Official name of the city, belonging to the certain state """ npa: Optional[str] = None """ Area code of the location (3-digit usually), according to the NANP number format, that can be summarized as NPA-NXX-xxxx and covers Canada, the United States, parts of the Caribbean Sea, and some Atlantic and Pacific islands. See for details North American Numbering Plan """ nxx: Optional[str] = None """ Central office code of the location, according to the NANP number format, that can be summarized as NPA-NXX-xxxx and covers Canada, the United States, parts of the Caribbean Sea, and some Atlantic and Pacific islands. See for details North American Numbering Plan """ state: Optional[ListLocationsResponseRecordsItemState] = None """ Information on the state this location belongs to """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListLocationsResponseNavigationFirstPage(DataClassJsonMixin): """ Canonical URI for the first page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListLocationsResponseNavigationNextPage(DataClassJsonMixin): """ Canonical URI for the next page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListLocationsResponseNavigationPreviousPage(DataClassJsonMixin): """ Canonical URI for the previous page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListLocationsResponseNavigationLastPage(DataClassJsonMixin): """ Canonical URI for the last page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListLocationsResponseNavigation(DataClassJsonMixin): """ Information on navigation """ first_page: Optional[ListLocationsResponseNavigationFirstPage] = None """ Canonical URI for the first page of the list """ next_page: Optional[ListLocationsResponseNavigationNextPage] = None """ Canonical URI for the next page of the list """ previous_page: Optional[ListLocationsResponseNavigationPreviousPage] = None """ Canonical URI for the previous page of the list """ last_page: Optional[ListLocationsResponseNavigationLastPage] = None """ Canonical URI for the last page of the list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListLocationsResponsePaging(DataClassJsonMixin): """ Information on paging """ page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) """ per_page: Optional[int] = None """ Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty """ total_pages: Optional[int] = None """ The total number of pages in a dataset. May be omitted for some resources due to performance reasons """ total_elements: Optional[int] = None """ The total number of elements in a dataset. May be omitted for some resource due to performance reasons """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListLocationsResponse(DataClassJsonMixin): """ Required Properties: - navigation - paging Generated by Python OpenAPI Parser """ navigation: ListLocationsResponseNavigation """ Information on navigation """ paging: ListLocationsResponsePaging """ Information on paging """ uri: Optional[str] = None """ Link to the location list resource """ records: Optional[List[ListLocationsResponseRecordsItem]] = None """ List of locations """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListStatesResponseRecordsItemCountry(DataClassJsonMixin): """ Information on a country the state belongs to """ id: Optional[str] = None """ Internal identifier of a state """ uri: Optional[str] = None """ Canonical URI of a state """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListStatesResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a state """ uri: Optional[str] = None """ Canonical URI of a state """ country: Optional[ListStatesResponseRecordsItemCountry] = None """ Information on a country the state belongs to """ iso_code: Optional[str] = None """ Short code for a state (2-letter usually) """ name: Optional[str] = None """ Official name of a state """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListStatesResponseNavigationFirstPage(DataClassJsonMixin): """ Canonical URI for the first page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListStatesResponseNavigationNextPage(DataClassJsonMixin): """ Canonical URI for the next page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListStatesResponseNavigationPreviousPage(DataClassJsonMixin): """ Canonical URI for the previous page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListStatesResponseNavigationLastPage(DataClassJsonMixin): """ Canonical URI for the last page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListStatesResponseNavigation(DataClassJsonMixin): """ Information on navigation """ first_page: Optional[ListStatesResponseNavigationFirstPage] = None """ Canonical URI for the first page of the list """ next_page: Optional[ListStatesResponseNavigationNextPage] = None """ Canonical URI for the next page of the list """ previous_page: Optional[ListStatesResponseNavigationPreviousPage] = None """ Canonical URI for the previous page of the list """ last_page: Optional[ListStatesResponseNavigationLastPage] = None """ Canonical URI for the last page of the list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListStatesResponsePaging(DataClassJsonMixin): """ Information on paging """ page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) """ per_page: Optional[int] = None """ Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty """ total_pages: Optional[int] = None """ The total number of pages in a dataset. May be omitted for some resources due to performance reasons """ total_elements: Optional[int] = None """ The total number of elements in a dataset. May be omitted for some resource due to performance reasons """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListStatesResponse(DataClassJsonMixin): uri: Optional[str] = None """ Link to the states list resource """ records: Optional[List[ListStatesResponseRecordsItem]] = None """ List of states """ navigation: Optional[ListStatesResponseNavigation] = None """ Information on navigation """ paging: Optional[ListStatesResponsePaging] = None """ Information on paging """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadStateResponseCountry(DataClassJsonMixin): """ Information on a country the state belongs to """ id: Optional[str] = None """ Internal identifier of a state """ uri: Optional[str] = None """ Canonical URI of a state """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadStateResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a state """ uri: Optional[str] = None """ Canonical URI of a state """ country: Optional[ReadStateResponseCountry] = None """ Information on a country the state belongs to """ iso_code: Optional[str] = None """ Short code for a state (2-letter usually) """ name: Optional[str] = None """ Official name of a state """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListTimezonesResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a timezone """ uri: Optional[str] = None """ Canonical URI of a timezone """ name: Optional[str] = None """ Short name of a timezone """ description: Optional[str] = None """ Description of a timezone """ bias: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListTimezonesResponseNavigationFirstPage(DataClassJsonMixin): """ Canonical URI for the first page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListTimezonesResponseNavigationNextPage(DataClassJsonMixin): """ Canonical URI for the next page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListTimezonesResponseNavigationPreviousPage(DataClassJsonMixin): """ Canonical URI for the previous page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListTimezonesResponseNavigationLastPage(DataClassJsonMixin): """ Canonical URI for the last page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListTimezonesResponseNavigation(DataClassJsonMixin): """ Information on navigation """ first_page: Optional[ListTimezonesResponseNavigationFirstPage] = None """ Canonical URI for the first page of the list """ next_page: Optional[ListTimezonesResponseNavigationNextPage] = None """ Canonical URI for the next page of the list """ previous_page: Optional[ListTimezonesResponseNavigationPreviousPage] = None """ Canonical URI for the previous page of the list """ last_page: Optional[ListTimezonesResponseNavigationLastPage] = None """ Canonical URI for the last page of the list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListTimezonesResponsePaging(DataClassJsonMixin): """ Information on paging """ page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) """ per_page: Optional[int] = None """ Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty """ total_pages: Optional[int] = None """ The total number of pages in a dataset. May be omitted for some resources due to performance reasons """ total_elements: Optional[int] = None """ The total number of elements in a dataset. May be omitted for some resource due to performance reasons """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListTimezonesResponse(DataClassJsonMixin): """ Required Properties: - navigation - paging - records Generated by Python OpenAPI Parser """ records: List[ListTimezonesResponseRecordsItem] """ List of timezones """ navigation: ListTimezonesResponseNavigation """ Information on navigation """ paging: ListTimezonesResponsePaging """ Information on paging """ uri: Optional[str] = None """ Link to the timezone list resource """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadTimezoneResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a timezone """ uri: Optional[str] = None """ Canonical URI of a timezone """ name: Optional[str] = None """ Short name of a timezone """ description: Optional[str] = None """ Description of a timezone """ bias: Optional[str] = None class ListAccountPhoneNumbersUsageTypeItem(Enum): MainCompanyNumber = 'MainCompanyNumber' AdditionalCompanyNumber = 'AdditionalCompanyNumber' CompanyNumber = 'CompanyNumber' DirectNumber = 'DirectNumber' CompanyFaxNumber = 'CompanyFaxNumber' ForwardedNumber = 'ForwardedNumber' ForwardedCompanyNumber = 'ForwardedCompanyNumber' ContactCenterNumber = 'ContactCenterNumber' ConferencingNumber = 'ConferencingNumber' MeetingsNumber = 'MeetingsNumber' BusinessMobileNumber = 'BusinessMobileNumber' class ListAccountPhoneNumbersStatus(Enum): Normal = 'Normal' Pending = 'Pending' PortedIn = 'PortedIn' Temporary = 'Temporary' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAccountPhoneNumbersResponseRecordsItemCountry(DataClassJsonMixin): """ Brief information on a phone number country """ id: Optional[str] = None """ Internal identifier of a home country """ uri: Optional[str] = None """ Canonical URI of a home country """ name: Optional[str] = None """ Official name of a home country """ iso_code: Optional[str] = None """ ISO code of a country """ calling_code: Optional[str] = None """ Calling code of a country """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAccountPhoneNumbersResponseRecordsItemExtension(DataClassJsonMixin): """ Information on the extension, to which the phone number is assigned. Returned only for the request of Account phone number list Generated by Python OpenAPI Parser """ id: Optional[str] = None """ Internal identifier of an extension """ uri: Optional[str] = None """ Canonical URI of an extension """ extension_number: Optional[str] = None """ Number of department extension """ partner_id: Optional[str] = None """ For Partner Applications Internal identifier of an extension created by partner. The RingCentral supports the mapping of accounts and stores the corresponding account ID/extension ID for each partner ID of a client application. In request URIs partner IDs are accepted instead of regular RingCentral native IDs as path parameters using pid = XXX clause. Though in response URIs contain the corresponding account IDs and extension IDs. In all request and response bodies these values are reflected via partnerId attributes of account and extension """ class ListAccountPhoneNumbersResponseRecordsItemPaymentType(Enum): """ Payment type. 'External' is returned for forwarded numbers which are not terminated in the RingCentral phone system Generated by Python OpenAPI Parser """ External = 'External' TollFree = 'TollFree' Local = 'Local' BusinessMobileNumberProvider = 'BusinessMobileNumberProvider' class ListAccountPhoneNumbersResponseRecordsItemType(Enum): """ Phone number type """ VoiceFax = 'VoiceFax' FaxOnly = 'FaxOnly' VoiceOnly = 'VoiceOnly' class ListAccountPhoneNumbersResponseRecordsItemUsageType(Enum): """ Usage type of a phone number. Usage type of a phone number. Numbers of 'NumberPool' type wont't be returned for phone number list requests Generated by Python OpenAPI Parser """ MainCompanyNumber = 'MainCompanyNumber' AdditionalCompanyNumber = 'AdditionalCompanyNumber' CompanyNumber = 'CompanyNumber' DirectNumber = 'DirectNumber' CompanyFaxNumber = 'CompanyFaxNumber' ForwardedNumber = 'ForwardedNumber' ForwardedCompanyNumber = 'ForwardedCompanyNumber' ContactCenterNumber = 'ContactCenterNumber' ConferencingNumber = 'ConferencingNumber' MeetingsNumber = 'MeetingsNumber' NumberPool = 'NumberPool' BusinessMobileNumber = 'BusinessMobileNumber' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAccountPhoneNumbersResponseRecordsItemTemporaryNumber(DataClassJsonMixin): """ Temporary phone number, if any. Returned for phone numbers in `Pending` porting status only """ id: Optional[str] = None """ Temporary phone number identifier """ phone_number: Optional[str] = None """ Temporary phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) (with '+' sign) format """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAccountPhoneNumbersResponseRecordsItemContactCenterProvider(DataClassJsonMixin): """ CCRN (Contact Center Routing Number) provider. If not specified then the default value 'InContact/North America' is used, its ID is '1' Generated by Python OpenAPI Parser """ id: Optional[str] = None """ Internal identifier of the provider """ name: Optional[str] = None """ Provider's name """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAccountPhoneNumbersResponseRecordsItem(DataClassJsonMixin): uri: Optional[str] = None """ Link to a company phone number resource """ id: Optional[int] = None """ Internal identifier of a phone number """ country: Optional[ListAccountPhoneNumbersResponseRecordsItemCountry] = None """ Brief information on a phone number country """ extension: Optional[ListAccountPhoneNumbersResponseRecordsItemExtension] = None """ Information on the extension, to which the phone number is assigned. Returned only for the request of Account phone number list """ label: Optional[str] = None """ Custom user name of a phone number, if any """ location: Optional[str] = None """ Location (City, State). Filled for local US numbers """ payment_type: Optional[ListAccountPhoneNumbersResponseRecordsItemPaymentType] = None """ Payment type. 'External' is returned for forwarded numbers which are not terminated in the RingCentral phone system """ phone_number: Optional[str] = None """ Phone number """ status: Optional[str] = None """ Status of a phone number. If the value is 'Normal', the phone number is ready to be used. Otherwise it is an external number not yet ported to RingCentral """ type: Optional[ListAccountPhoneNumbersResponseRecordsItemType] = None """ Phone number type """ usage_type: Optional[ListAccountPhoneNumbersResponseRecordsItemUsageType] = None """ Usage type of a phone number. Usage type of a phone number. Numbers of 'NumberPool' type wont't be returned for phone number list requests """ temporary_number: Optional[ListAccountPhoneNumbersResponseRecordsItemTemporaryNumber] = None """ Temporary phone number, if any. Returned for phone numbers in `Pending` porting status only """ contact_center_provider: Optional[ListAccountPhoneNumbersResponseRecordsItemContactCenterProvider] = None """ CCRN (Contact Center Routing Number) provider. If not specified then the default value 'InContact/North America' is used, its ID is '1' """ vanity_pattern: Optional[str] = None """ Vanity pattern for this number. Returned only when vanity search option is requested. Vanity pattern corresponds to request parameters nxx plus line or numberPattern """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAccountPhoneNumbersResponseNavigationFirstPage(DataClassJsonMixin): """ Canonical URI for the first page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAccountPhoneNumbersResponseNavigationNextPage(DataClassJsonMixin): """ Canonical URI for the next page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAccountPhoneNumbersResponseNavigationPreviousPage(DataClassJsonMixin): """ Canonical URI for the previous page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAccountPhoneNumbersResponseNavigationLastPage(DataClassJsonMixin): """ Canonical URI for the last page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAccountPhoneNumbersResponseNavigation(DataClassJsonMixin): """ Information on navigation """ first_page: Optional[ListAccountPhoneNumbersResponseNavigationFirstPage] = None """ Canonical URI for the first page of the list """ next_page: Optional[ListAccountPhoneNumbersResponseNavigationNextPage] = None """ Canonical URI for the next page of the list """ previous_page: Optional[ListAccountPhoneNumbersResponseNavigationPreviousPage] = None """ Canonical URI for the previous page of the list """ last_page: Optional[ListAccountPhoneNumbersResponseNavigationLastPage] = None """ Canonical URI for the last page of the list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAccountPhoneNumbersResponsePaging(DataClassJsonMixin): """ Information on paging """ page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) """ per_page: Optional[int] = None """ Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty """ total_pages: Optional[int] = None """ The total number of pages in a dataset. May be omitted for some resources due to performance reasons """ total_elements: Optional[int] = None """ The total number of elements in a dataset. May be omitted for some resource due to performance reasons """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAccountPhoneNumbersResponse(DataClassJsonMixin): uri: Optional[str] = None """ Link to the list of account phone numbers """ records: Optional[List[ListAccountPhoneNumbersResponseRecordsItem]] = None """ List of account phone numbers """ navigation: Optional[ListAccountPhoneNumbersResponseNavigation] = None """ Information on navigation """ paging: Optional[ListAccountPhoneNumbersResponsePaging] = None """ Information on paging """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountPhoneNumberResponseCountry(DataClassJsonMixin): """ Brief information on a phone number country """ id: Optional[str] = None """ Internal identifier of a home country """ uri: Optional[str] = None """ Canonical URI of a home country """ name: Optional[str] = None """ Official name of a home country """ iso_code: Optional[str] = None """ ISO code of a country """ calling_code: Optional[str] = None """ Calling code of a country """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountPhoneNumberResponseExtension(DataClassJsonMixin): """ Information on the extension, to which the phone number is assigned. Returned only for the request of Account phone number list Generated by Python OpenAPI Parser """ id: Optional[str] = None """ Internal identifier of an extension """ uri: Optional[str] = None """ Canonical URI of an extension """ extension_number: Optional[str] = None """ Number of department extension """ partner_id: Optional[str] = None """ For Partner Applications Internal identifier of an extension created by partner. The RingCentral supports the mapping of accounts and stores the corresponding account ID/extension ID for each partner ID of a client application. In request URIs partner IDs are accepted instead of regular RingCentral native IDs as path parameters using pid = XXX clause. Though in response URIs contain the corresponding account IDs and extension IDs. In all request and response bodies these values are reflected via partnerId attributes of account and extension """ class ReadAccountPhoneNumberResponsePaymentType(Enum): """ Payment type. 'External' is returned for forwarded numbers which are not terminated in the RingCentral phone system Generated by Python OpenAPI Parser """ External = 'External' TollFree = 'TollFree' Local = 'Local' BusinessMobileNumberProvider = 'BusinessMobileNumberProvider' class ReadAccountPhoneNumberResponseType(Enum): """ Phone number type """ VoiceFax = 'VoiceFax' FaxOnly = 'FaxOnly' VoiceOnly = 'VoiceOnly' class ReadAccountPhoneNumberResponseUsageType(Enum): """ Usage type of a phone number. Usage type of a phone number. Numbers of 'NumberPool' type wont't be returned for phone number list requests Generated by Python OpenAPI Parser """ MainCompanyNumber = 'MainCompanyNumber' AdditionalCompanyNumber = 'AdditionalCompanyNumber' CompanyNumber = 'CompanyNumber' DirectNumber = 'DirectNumber' CompanyFaxNumber = 'CompanyFaxNumber' ForwardedNumber = 'ForwardedNumber' ForwardedCompanyNumber = 'ForwardedCompanyNumber' ContactCenterNumber = 'ContactCenterNumber' ConferencingNumber = 'ConferencingNumber' MeetingsNumber = 'MeetingsNumber' NumberPool = 'NumberPool' BusinessMobileNumber = 'BusinessMobileNumber' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountPhoneNumberResponseTemporaryNumber(DataClassJsonMixin): """ Temporary phone number, if any. Returned for phone numbers in `Pending` porting status only """ id: Optional[str] = None """ Temporary phone number identifier """ phone_number: Optional[str] = None """ Temporary phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) (with '+' sign) format """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountPhoneNumberResponseContactCenterProvider(DataClassJsonMixin): """ CCRN (Contact Center Routing Number) provider. If not specified then the default value 'InContact/North America' is used, its ID is '1' Generated by Python OpenAPI Parser """ id: Optional[str] = None """ Internal identifier of the provider """ name: Optional[str] = None """ Provider's name """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAccountPhoneNumberResponse(DataClassJsonMixin): uri: Optional[str] = None """ Link to a company phone number resource """ id: Optional[int] = None """ Internal identifier of a phone number """ country: Optional[ReadAccountPhoneNumberResponseCountry] = None """ Brief information on a phone number country """ extension: Optional[ReadAccountPhoneNumberResponseExtension] = None """ Information on the extension, to which the phone number is assigned. Returned only for the request of Account phone number list """ label: Optional[str] = None """ Custom user name of a phone number, if any """ location: Optional[str] = None """ Location (City, State). Filled for local US numbers """ payment_type: Optional[ReadAccountPhoneNumberResponsePaymentType] = None """ Payment type. 'External' is returned for forwarded numbers which are not terminated in the RingCentral phone system """ phone_number: Optional[str] = None """ Phone number """ status: Optional[str] = None """ Status of a phone number. If the value is 'Normal', the phone number is ready to be used. Otherwise it is an external number not yet ported to RingCentral """ type: Optional[ReadAccountPhoneNumberResponseType] = None """ Phone number type """ usage_type: Optional[ReadAccountPhoneNumberResponseUsageType] = None """ Usage type of a phone number. Usage type of a phone number. Numbers of 'NumberPool' type wont't be returned for phone number list requests """ temporary_number: Optional[ReadAccountPhoneNumberResponseTemporaryNumber] = None """ Temporary phone number, if any. Returned for phone numbers in `Pending` porting status only """ contact_center_provider: Optional[ReadAccountPhoneNumberResponseContactCenterProvider] = None """ CCRN (Contact Center Routing Number) provider. If not specified then the default value 'InContact/North America' is used, its ID is '1' """ vanity_pattern: Optional[str] = None """ Vanity pattern for this number. Returned only when vanity search option is requested. Vanity pattern corresponds to request parameters nxx plus line or numberPattern """ class ListExtensionsStatusItem(Enum): Enabled = 'Enabled' Disabled = 'Disabled' NotActivated = 'NotActivated' Unassigned = 'Unassigned' class ListExtensionsTypeItem(Enum): User = 'User' FaxUser = 'FaxUser' VirtualUser = 'VirtualUser' DigitalUser = 'DigitalUser' Department = 'Department' Announcement = 'Announcement' Voicemail = 'Voicemail' SharedLinesGroup = 'SharedLinesGroup' PagingOnly = 'PagingOnly' IvrMenu = 'IvrMenu' ApplicationExtension = 'ApplicationExtension' ParkLocation = 'ParkLocation' Limited = 'Limited' Bot = 'Bot' ProxyAdmin = 'ProxyAdmin' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionsResponseRecordsItemAccount(DataClassJsonMixin): """ Account information """ id: Optional[str] = None """ Internal identifier of an account """ uri: Optional[str] = None """ Canonical URI of an account """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionsResponseRecordsItemContactBusinessAddress(DataClassJsonMixin): """ Business address of extension user company """ country: Optional[str] = None """ Country name of an extension user company """ state: Optional[str] = None """ State/province name of an extension user company. Mandatory for the USA, UK and Canada """ city: Optional[str] = None """ City name of an extension user company """ street: Optional[str] = None """ Street address of an extension user company """ zip: Optional[str] = None """ Zip code of an extension user company """ class ListExtensionsResponseRecordsItemContactPronouncedNameType(Enum): """ Voice name type. 'Default' - default extension name; first name and last name specified in user profile; 'TextToSpeech' - custom text; user name spelled the way it sounds and specified by user; 'Recorded' - custom audio, user name recorded in user's own voice (supported only for extension retrieval) Generated by Python OpenAPI Parser """ Default = 'Default' TextToSpeech = 'TextToSpeech' Recorded = 'Recorded' class ListExtensionsResponseRecordsItemContactPronouncedNamePromptContentType(Enum): """ Content media type """ AudioMpeg = 'audio/mpeg' AudioWav = 'audio/wav' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionsResponseRecordsItemContactPronouncedNamePrompt(DataClassJsonMixin): id: Optional[str] = None content_uri: Optional[str] = None """ Link to a prompt resource """ content_type: Optional[ListExtensionsResponseRecordsItemContactPronouncedNamePromptContentType] = None """ Content media type """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionsResponseRecordsItemContactPronouncedName(DataClassJsonMixin): type: Optional[ListExtensionsResponseRecordsItemContactPronouncedNameType] = None """ Voice name type. 'Default' - default extension name; first name and last name specified in user profile; 'TextToSpeech' - custom text; user name spelled the way it sounds and specified by user; 'Recorded' - custom audio, user name recorded in user's own voice (supported only for extension retrieval) """ text: Optional[str] = None """ Custom text """ prompt: Optional[ListExtensionsResponseRecordsItemContactPronouncedNamePrompt] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionsResponseRecordsItemContact(DataClassJsonMixin): """ Contact detailed information """ first_name: Optional[str] = None """ For User extension type only. Extension user first name """ last_name: Optional[str] = None """ For User extension type only. Extension user last name """ company: Optional[str] = None """ Extension user company name """ job_title: Optional[str] = None email: Optional[str] = None """ Email of extension user """ business_phone: Optional[str] = None """ Extension user contact phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) (with '+' sign) format """ mobile_phone: Optional[str] = None """ Extension user mobile (**non** Toll Free) phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) (with '+' sign) format """ business_address: Optional[ListExtensionsResponseRecordsItemContactBusinessAddress] = None """ Business address of extension user company """ email_as_login_name: Optional[bool] = 'False' """ If 'True' then contact email is enabled as login name for this user. Please note that email should be unique in this case. """ pronounced_name: Optional[ListExtensionsResponseRecordsItemContactPronouncedName] = None department: Optional[str] = None """ Extension user department, if any """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionsResponseRecordsItemCustomFieldsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a custom field """ value: Optional[str] = None """ Custom field value """ display_name: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionsResponseRecordsItemDepartmentsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a department extension """ uri: Optional[str] = None """ Canonical URI of a department extension """ extension_number: Optional[str] = None """ Number of a department extension """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionsResponseRecordsItemPermissionsAdmin(DataClassJsonMixin): """ Admin permission """ enabled: Optional[bool] = None """ Specifies if a permission is enabled or not """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionsResponseRecordsItemPermissionsInternationalCalling(DataClassJsonMixin): """ International Calling permission """ enabled: Optional[bool] = None """ Specifies if a permission is enabled or not """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionsResponseRecordsItemPermissions(DataClassJsonMixin): """ Extension permissions, corresponding to the Service Web permissions 'Admin' and 'InternationalCalling' Generated by Python OpenAPI Parser """ admin: Optional[ListExtensionsResponseRecordsItemPermissionsAdmin] = None """ Admin permission """ international_calling: Optional[ListExtensionsResponseRecordsItemPermissionsInternationalCalling] = None """ International Calling permission """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionsResponseRecordsItemProfileImageScalesItem(DataClassJsonMixin): uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionsResponseRecordsItemProfileImage(DataClassJsonMixin): """ Information on profile image Required Properties: - uri Generated by Python OpenAPI Parser """ uri: str """ Link to a profile image. If an image is not uploaded for an extension, only uri is returned """ etag: Optional[str] = None """ Identifier of an image """ last_modified: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ The datetime when an image was last updated in ISO 8601 format, for example 2016-03-10T18:07:52.534Z """ content_type: Optional[str] = None """ The type of an image """ scales: Optional[List[ListExtensionsResponseRecordsItemProfileImageScalesItem]] = None """ List of URIs to profile images in different dimensions """ class ListExtensionsResponseRecordsItemReferencesItemType(Enum): """ Type of external identifier """ PartnerId = 'PartnerId' CustomerDirectoryId = 'CustomerDirectoryId' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionsResponseRecordsItemReferencesItem(DataClassJsonMixin): ref: Optional[str] = None """ Non-RC identifier of an extension """ type: Optional[ListExtensionsResponseRecordsItemReferencesItemType] = None """ Type of external identifier """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionsResponseRecordsItemRolesItem(DataClassJsonMixin): uri: Optional[str] = None id: Optional[str] = None """ Internal identifier of a role """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionsResponseRecordsItemRegionalSettingsHomeCountry(DataClassJsonMixin): """ Extension country information """ id: Optional[str] = None """ Internal identifier of a home country """ uri: Optional[str] = None """ Canonical URI of a home country """ name: Optional[str] = None """ Official name of a home country """ iso_code: Optional[str] = None """ ISO code of a country """ calling_code: Optional[str] = None """ Calling code of a country """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionsResponseRecordsItemRegionalSettingsTimezone(DataClassJsonMixin): """ Extension timezone information """ id: Optional[str] = None """ Internal identifier of a timezone """ uri: Optional[str] = None """ Canonical URI of a timezone """ name: Optional[str] = None """ Short name of a timezone """ description: Optional[str] = None """ Meaningful description of the timezone """ bias: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionsResponseRecordsItemRegionalSettingsLanguage(DataClassJsonMixin): """ User interface language data """ id: Optional[str] = None """ Internal identifier of a language """ uri: Optional[str] = None """ Canonical URI of a language """ greeting: Optional[bool] = None """ Indicates whether a language is available as greeting language """ formatting_locale: Optional[bool] = None """ Indicates whether a language is available as formatting locale """ locale_code: Optional[str] = None """ Localization code of a language """ iso_code: Optional[str] = None """ Country code according to the ISO standard, see [ISO 3166](https://www.iso.org/iso-3166-country-codes.html) """ name: Optional[str] = None """ Official name of a language """ ui: Optional[bool] = None """ Indicates whether a language is available as UI language """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionsResponseRecordsItemRegionalSettingsGreetingLanguage(DataClassJsonMixin): """ Information on language used for telephony greetings """ id: Optional[str] = None """ Internal identifier of a greeting language """ locale_code: Optional[str] = None """ Localization code of a greeting language """ name: Optional[str] = None """ Official name of a greeting language """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionsResponseRecordsItemRegionalSettingsFormattingLocale(DataClassJsonMixin): """ Formatting language preferences for numbers, dates and currencies """ id: Optional[str] = None """ Internal identifier of a formatting language """ locale_code: Optional[str] = None """ Localization code of a formatting language """ name: Optional[str] = None class ListExtensionsResponseRecordsItemRegionalSettingsTimeFormat(Enum): """ Time format setting. The default value is '12h' = ['12h', '24h'] """ OBJECT_12h = '12h' OBJECT_24h = '24h' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionsResponseRecordsItemRegionalSettings(DataClassJsonMixin): """ Extension region data (timezone, home country, language) """ home_country: Optional[ListExtensionsResponseRecordsItemRegionalSettingsHomeCountry] = None """ Extension country information """ timezone: Optional[ListExtensionsResponseRecordsItemRegionalSettingsTimezone] = None """ Extension timezone information """ language: Optional[ListExtensionsResponseRecordsItemRegionalSettingsLanguage] = None """ User interface language data """ greeting_language: Optional[ListExtensionsResponseRecordsItemRegionalSettingsGreetingLanguage] = None """ Information on language used for telephony greetings """ formatting_locale: Optional[ListExtensionsResponseRecordsItemRegionalSettingsFormattingLocale] = None """ Formatting language preferences for numbers, dates and currencies """ time_format: Optional[ListExtensionsResponseRecordsItemRegionalSettingsTimeFormat] = None """ Time format setting. The default value is '12h' = ['12h', '24h'] """ class ListExtensionsResponseRecordsItemServiceFeaturesItemFeatureName(Enum): """ Feature name """ AccountFederation = 'AccountFederation' Archiver = 'Archiver' AutomaticCallRecordingMute = 'AutomaticCallRecordingMute' AutomaticInboundCallRecording = 'AutomaticInboundCallRecording' AutomaticOutboundCallRecording = 'AutomaticOutboundCallRecording' BlockedMessageForwarding = 'BlockedMessageForwarding' Calendar = 'Calendar' CallerIdControl = 'CallerIdControl' CallForwarding = 'CallForwarding' CallPark = 'CallPark' CallParkLocations = 'CallParkLocations' CallSupervision = 'CallSupervision' CallSwitch = 'CallSwitch' CallQualitySurvey = 'CallQualitySurvey' Conferencing = 'Conferencing' ConferencingNumber = 'ConferencingNumber' ConfigureDelegates = 'ConfigureDelegates' DeveloperPortal = 'DeveloperPortal' DND = 'DND' DynamicConference = 'DynamicConference' EmergencyAddressAutoUpdate = 'EmergencyAddressAutoUpdate' EmergencyCalling = 'EmergencyCalling' EncryptionAtRest = 'EncryptionAtRest' ExternalDirectoryIntegration = 'ExternalDirectoryIntegration' Fax = 'Fax' FaxReceiving = 'FaxReceiving' FreeSoftPhoneLines = 'FreeSoftPhoneLines' HDVoice = 'HDVoice' HipaaCompliance = 'HipaaCompliance' Intercom = 'Intercom' InternationalCalling = 'InternationalCalling' InternationalSMS = 'InternationalSMS' LinkedSoftphoneLines = 'LinkedSoftphoneLines' MMS = 'MMS' MobileVoipEmergencyCalling = 'MobileVoipEmergencyCalling' OnDemandCallRecording = 'OnDemandCallRecording' Pager = 'Pager' PagerReceiving = 'PagerReceiving' Paging = 'Paging' PasswordAuth = 'PasswordAuth' PromoMessage = 'PromoMessage' Reports = 'Reports' Presence = 'Presence' RCTeams = 'RCTeams' RingOut = 'RingOut' SalesForce = 'SalesForce' SharedLines = 'SharedLines' SingleExtensionUI = 'SingleExtensionUI' SiteCodes = 'SiteCodes' SMS = 'SMS' SMSReceiving = 'SMSReceiving' SoftPhoneUpdate = 'SoftPhoneUpdate' TelephonySessions = 'TelephonySessions' UserManagement = 'UserManagement' VideoConferencing = 'VideoConferencing' VoipCalling = 'VoipCalling' VoipCallingOnMobile = 'VoipCallingOnMobile' Voicemail = 'Voicemail' VoicemailToText = 'VoicemailToText' WebPhone = 'WebPhone' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionsResponseRecordsItemServiceFeaturesItem(DataClassJsonMixin): enabled: Optional[bool] = None """ Feature status; shows feature availability for an extension """ feature_name: Optional[ListExtensionsResponseRecordsItemServiceFeaturesItemFeatureName] = None """ Feature name """ reason: Optional[str] = None """ Reason for limitation of a particular service feature. Returned only if the enabled parameter value is 'False', see Service Feature Limitations and Reasons. When retrieving service features for an extension, the reasons for the limitations, if any, are returned in response """ class ListExtensionsResponseRecordsItemSetupWizardState(Enum): """ Specifies extension configuration wizard state (web service setup). """ NotStarted = 'NotStarted' Incomplete = 'Incomplete' Completed = 'Completed' class ListExtensionsResponseRecordsItemStatus(Enum): """ Extension current state. If 'Unassigned' is specified, then extensions without ‘extensionNumber’ are returned. If not specified, then all extensions are returned Generated by Python OpenAPI Parser """ Enabled = 'Enabled' Disabled = 'Disabled' Frozen = 'Frozen' NotActivated = 'NotActivated' Unassigned = 'Unassigned' class ListExtensionsResponseRecordsItemStatusInfoReason(Enum): """ Type of suspension """ Voluntarily = 'Voluntarily' Involuntarily = 'Involuntarily' SuspendedVoluntarily = 'SuspendedVoluntarily' SuspendedVoluntarily2 = 'SuspendedVoluntarily2' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionsResponseRecordsItemStatusInfo(DataClassJsonMixin): """ Status information (reason, comment). Returned for 'Disabled' status only """ comment: Optional[str] = None """ A free-form user comment, describing the status change reason """ reason: Optional[ListExtensionsResponseRecordsItemStatusInfoReason] = None """ Type of suspension """ class ListExtensionsResponseRecordsItemType(Enum): """ Extension type """ User = 'User' FaxUser = 'FaxUser' VirtualUser = 'VirtualUser' DigitalUser = 'DigitalUser' Department = 'Department' Announcement = 'Announcement' Voicemail = 'Voicemail' SharedLinesGroup = 'SharedLinesGroup' PagingOnly = 'PagingOnly' IvrMenu = 'IvrMenu' ApplicationExtension = 'ApplicationExtension' ParkLocation = 'ParkLocation' Bot = 'Bot' Room = 'Room' Limited = 'Limited' Site = 'Site' ProxyAdmin = 'ProxyAdmin' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionsResponseRecordsItemCallQueueInfo(DataClassJsonMixin): """ For Department extension type only. Call queue settings """ sla_goal: Optional[int] = None """ Target percentage of calls that must be answered by agents within the service level time threshold """ sla_threshold_seconds: Optional[int] = None """ Period of time in seconds that is considered to be an acceptable service level """ include_abandoned_calls: Optional[bool] = None """ If 'True' abandoned calls (hanged up prior to being served) are included into service level calculation """ abandoned_threshold_seconds: Optional[int] = None """ Period of time in seconds specifying abandoned calls duration - calls that are shorter will not be included into the calculation of service level.; zero value means that abandoned calls of any duration will be included into calculation """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionsResponseRecordsItemSite(DataClassJsonMixin): """ Site data. If multi-site feature is turned on for the account, then internal identifier of a site must be specified. To assign the wireless point to the main site (company) set site ID to `main-site` Generated by Python OpenAPI Parser """ id: Optional[str] = None """ Internal identifier of a site """ uri: Optional[str] = None """ Link to a site resource """ name: Optional[str] = None """ Name of a site """ code: Optional[str] = None """ Site code value. Returned only if specified """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionsResponseRecordsItem(DataClassJsonMixin): id: Optional[int] = None """ Internal identifier of an extension """ uri: Optional[str] = None """ Canonical URI of an extension """ account: Optional[ListExtensionsResponseRecordsItemAccount] = None """ Account information """ contact: Optional[ListExtensionsResponseRecordsItemContact] = None """ Contact detailed information """ custom_fields: Optional[List[ListExtensionsResponseRecordsItemCustomFieldsItem]] = None departments: Optional[List[ListExtensionsResponseRecordsItemDepartmentsItem]] = None """ Information on department extension(s), to which the requested extension belongs. Returned only for user extensions, members of department, requested by single extensionId """ extension_number: Optional[str] = None """ Number of department extension """ extension_numbers: Optional[List[str]] = None name: Optional[str] = None """ Extension name. For user extension types the value is a combination of the specified first name and last name """ partner_id: Optional[str] = None """ For Partner Applications Internal identifier of an extension created by partner. The RingCentral supports the mapping of accounts and stores the corresponding account ID/extension ID for each partner ID of a client application. In request URIs partner IDs are accepted instead of regular RingCentral native IDs as path parameters using pid = XXX clause. Though in response URIs contain the corresponding account IDs and extension IDs. In all request and response bodies these values are reflected via partnerId attributes of account and extension """ permissions: Optional[ListExtensionsResponseRecordsItemPermissions] = None """ Extension permissions, corresponding to the Service Web permissions 'Admin' and 'InternationalCalling' """ profile_image: Optional[ListExtensionsResponseRecordsItemProfileImage] = None """ Information on profile image """ references: Optional[List[ListExtensionsResponseRecordsItemReferencesItem]] = None """ List of non-RC internal identifiers assigned to an extension """ roles: Optional[List[ListExtensionsResponseRecordsItemRolesItem]] = None regional_settings: Optional[ListExtensionsResponseRecordsItemRegionalSettings] = None """ Extension region data (timezone, home country, language) """ service_features: Optional[List[ListExtensionsResponseRecordsItemServiceFeaturesItem]] = None """ Extension service features returned in response only when the logged-in user requests his/her own extension info, see also Extension Service Features """ setup_wizard_state: Optional[ListExtensionsResponseRecordsItemSetupWizardState] = 'NotStarted' """ Specifies extension configuration wizard state (web service setup). """ status: Optional[ListExtensionsResponseRecordsItemStatus] = None """ Extension current state. If 'Unassigned' is specified, then extensions without ‘extensionNumber’ are returned. If not specified, then all extensions are returned """ status_info: Optional[ListExtensionsResponseRecordsItemStatusInfo] = None """ Status information (reason, comment). Returned for 'Disabled' status only """ type: Optional[ListExtensionsResponseRecordsItemType] = None """ Extension type """ call_queue_info: Optional[ListExtensionsResponseRecordsItemCallQueueInfo] = None """ For Department extension type only. Call queue settings """ hidden: Optional[bool] = None """ Hides extension from showing in company directory. Supported for extensions of User type only """ site: Optional[ListExtensionsResponseRecordsItemSite] = None """ Site data. If multi-site feature is turned on for the account, then internal identifier of a site must be specified. To assign the wireless point to the main site (company) set site ID to `main-site` """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionsResponseNavigationFirstPage(DataClassJsonMixin): """ Canonical URI for the first page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionsResponseNavigationNextPage(DataClassJsonMixin): """ Canonical URI for the next page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionsResponseNavigationPreviousPage(DataClassJsonMixin): """ Canonical URI for the previous page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionsResponseNavigationLastPage(DataClassJsonMixin): """ Canonical URI for the last page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionsResponseNavigation(DataClassJsonMixin): """ Information on navigation """ first_page: Optional[ListExtensionsResponseNavigationFirstPage] = None """ Canonical URI for the first page of the list """ next_page: Optional[ListExtensionsResponseNavigationNextPage] = None """ Canonical URI for the next page of the list """ previous_page: Optional[ListExtensionsResponseNavigationPreviousPage] = None """ Canonical URI for the previous page of the list """ last_page: Optional[ListExtensionsResponseNavigationLastPage] = None """ Canonical URI for the last page of the list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionsResponsePaging(DataClassJsonMixin): """ Information on paging """ page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) """ per_page: Optional[int] = None """ Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty """ total_pages: Optional[int] = None """ The total number of pages in a dataset. May be omitted for some resources due to performance reasons """ total_elements: Optional[int] = None """ The total number of elements in a dataset. May be omitted for some resource due to performance reasons """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListExtensionsResponse(DataClassJsonMixin): """ Required Properties: - records Generated by Python OpenAPI Parser """ records: List[ListExtensionsResponseRecordsItem] """ List of extensions with extension information """ uri: Optional[str] = None """ Link to the extension list resource """ navigation: Optional[ListExtensionsResponseNavigation] = None """ Information on navigation """ paging: Optional[ListExtensionsResponsePaging] = None """ Information on paging """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateExtensionRequestContactBusinessAddress(DataClassJsonMixin): country: Optional[str] = None """ Country name of an extension user company """ state: Optional[str] = None """ State/province name of an extension user company. Mandatory for the USA, UK and Canada """ city: Optional[str] = None """ City name of an extension user company """ street: Optional[str] = None """ Street address of an extension user company """ zip: Optional[str] = None """ Zip code of an extension user company """ class CreateExtensionRequestContactPronouncedNameType(Enum): """ Voice name type. 'Default' - default extension name; first name and last name specified in user profile; 'TextToSpeech' - custom text; user name spelled the way it sounds and specified by user; 'Recorded' - custom audio, user name recorded in user's own voice (supported only for extension retrieval) Generated by Python OpenAPI Parser """ Default = 'Default' TextToSpeech = 'TextToSpeech' Recorded = 'Recorded' class CreateExtensionRequestContactPronouncedNamePromptContentType(Enum): """ Content media type """ AudioMpeg = 'audio/mpeg' AudioWav = 'audio/wav' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateExtensionRequestContactPronouncedNamePrompt(DataClassJsonMixin): id: Optional[str] = None content_uri: Optional[str] = None """ Link to a prompt resource """ content_type: Optional[CreateExtensionRequestContactPronouncedNamePromptContentType] = None """ Content media type """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateExtensionRequestContactPronouncedName(DataClassJsonMixin): type: Optional[CreateExtensionRequestContactPronouncedNameType] = None """ Voice name type. 'Default' - default extension name; first name and last name specified in user profile; 'TextToSpeech' - custom text; user name spelled the way it sounds and specified by user; 'Recorded' - custom audio, user name recorded in user's own voice (supported only for extension retrieval) """ text: Optional[str] = None """ Custom text """ prompt: Optional[CreateExtensionRequestContactPronouncedNamePrompt] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateExtensionRequestContact(DataClassJsonMixin): """ Contact Information """ first_name: Optional[str] = None """ For User extension type only. Extension user first name """ last_name: Optional[str] = None """ For User extension type only. Extension user last name """ company: Optional[str] = None """ Extension user company name """ job_title: Optional[str] = None email: Optional[str] = None """ Email of extension user """ business_phone: Optional[str] = None """ Extension user contact phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) format """ mobile_phone: Optional[str] = None """ Extension user mobile (**non** Toll Free) phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) (with '+' sign) format """ business_address: Optional[CreateExtensionRequestContactBusinessAddress] = None email_as_login_name: Optional[bool] = None """ If 'True' then contact email is enabled as login name for this user. Please note that email should be unique in this case. The default value is 'False' """ pronounced_name: Optional[CreateExtensionRequestContactPronouncedName] = None department: Optional[str] = None """ Extension user department, if any """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateExtensionRequestCustomFieldsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a custom field """ value: Optional[str] = None """ Custom field value """ display_name: Optional[str] = None class CreateExtensionRequestReferencesItemType(Enum): """ Type of external identifier """ PartnerId = 'PartnerId' CustomerDirectoryId = 'CustomerDirectoryId' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateExtensionRequestReferencesItem(DataClassJsonMixin): ref: Optional[str] = None """ Non-RC identifier of an extension """ type: Optional[CreateExtensionRequestReferencesItemType] = None """ Type of external identifier """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateExtensionRequestRegionalSettingsHomeCountry(DataClassJsonMixin): """ Extension country information """ id: Optional[str] = None """ Internal identifier of a home country """ uri: Optional[str] = None """ Canonical URI of a home country """ name: Optional[str] = None """ Official name of a home country """ iso_code: Optional[str] = None """ ISO code of a country """ calling_code: Optional[str] = None """ Calling code of a country """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateExtensionRequestRegionalSettingsTimezone(DataClassJsonMixin): """ Extension timezone information """ id: Optional[str] = None """ Internal identifier of a timezone """ uri: Optional[str] = None """ Canonical URI of a timezone """ name: Optional[str] = None """ Short name of a timezone """ description: Optional[str] = None """ Meaningful description of the timezone """ bias: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateExtensionRequestRegionalSettingsLanguage(DataClassJsonMixin): """ User interface language data """ id: Optional[str] = None """ Internal identifier of a language """ uri: Optional[str] = None """ Canonical URI of a language """ greeting: Optional[bool] = None """ Indicates whether a language is available as greeting language """ formatting_locale: Optional[bool] = None """ Indicates whether a language is available as formatting locale """ locale_code: Optional[str] = None """ Localization code of a language """ iso_code: Optional[str] = None """ Country code according to the ISO standard, see [ISO 3166](https://www.iso.org/iso-3166-country-codes.html) """ name: Optional[str] = None """ Official name of a language """ ui: Optional[bool] = None """ Indicates whether a language is available as UI language """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateExtensionRequestRegionalSettingsGreetingLanguage(DataClassJsonMixin): """ Information on language used for telephony greetings """ id: Optional[str] = None """ Internal identifier of a greeting language """ locale_code: Optional[str] = None """ Localization code of a greeting language """ name: Optional[str] = None """ Official name of a greeting language """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateExtensionRequestRegionalSettingsFormattingLocale(DataClassJsonMixin): """ Formatting language preferences for numbers, dates and currencies """ id: Optional[str] = None """ Internal identifier of a formatting language """ locale_code: Optional[str] = None """ Localization code of a formatting language """ name: Optional[str] = None class CreateExtensionRequestRegionalSettingsTimeFormat(Enum): """ Time format setting. The default value is '12h' = ['12h', '24h'] """ OBJECT_12h = '12h' OBJECT_24h = '24h' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateExtensionRequestRegionalSettings(DataClassJsonMixin): """ Extension region data (timezone, home country, language) """ home_country: Optional[CreateExtensionRequestRegionalSettingsHomeCountry] = None """ Extension country information """ timezone: Optional[CreateExtensionRequestRegionalSettingsTimezone] = None """ Extension timezone information """ language: Optional[CreateExtensionRequestRegionalSettingsLanguage] = None """ User interface language data """ greeting_language: Optional[CreateExtensionRequestRegionalSettingsGreetingLanguage] = None """ Information on language used for telephony greetings """ formatting_locale: Optional[CreateExtensionRequestRegionalSettingsFormattingLocale] = None """ Formatting language preferences for numbers, dates and currencies """ time_format: Optional[CreateExtensionRequestRegionalSettingsTimeFormat] = None """ Time format setting. The default value is '12h' = ['12h', '24h'] """ class CreateExtensionRequestSetupWizardState(Enum): """ Specifies extension configuration wizard state (web service setup). """ NotStarted = 'NotStarted' Incomplete = 'Incomplete' Completed = 'Completed' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateExtensionRequestSiteBusinessAddress(DataClassJsonMixin): """ Extension user business address. The default is Company settings """ country: Optional[str] = None """ Country name of an extension user company """ state: Optional[str] = None """ State/province name of an extension user company. Mandatory for the USA, UK and Canada """ city: Optional[str] = None """ City name of an extension user company """ street: Optional[str] = None """ Street address of an extension user company """ zip: Optional[str] = None """ Zip code of an extension user company """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateExtensionRequestSiteRegionalSettingsHomeCountry(DataClassJsonMixin): """ Extension country information """ id: Optional[str] = None """ Internal identifier of a home country """ uri: Optional[str] = None """ Canonical URI of a home country """ name: Optional[str] = None """ Official name of a home country """ iso_code: Optional[str] = None """ ISO code of a country """ calling_code: Optional[str] = None """ Calling code of a country """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateExtensionRequestSiteRegionalSettingsTimezone(DataClassJsonMixin): """ Extension timezone information """ id: Optional[str] = None """ Internal identifier of a timezone """ uri: Optional[str] = None """ Canonical URI of a timezone """ name: Optional[str] = None """ Short name of a timezone """ description: Optional[str] = None """ Meaningful description of the timezone """ bias: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateExtensionRequestSiteRegionalSettingsLanguage(DataClassJsonMixin): """ User interface language data """ id: Optional[str] = None """ Internal identifier of a language """ uri: Optional[str] = None """ Canonical URI of a language """ greeting: Optional[bool] = None """ Indicates whether a language is available as greeting language """ formatting_locale: Optional[bool] = None """ Indicates whether a language is available as formatting locale """ locale_code: Optional[str] = None """ Localization code of a language """ iso_code: Optional[str] = None """ Country code according to the ISO standard, see [ISO 3166](https://www.iso.org/iso-3166-country-codes.html) """ name: Optional[str] = None """ Official name of a language """ ui: Optional[bool] = None """ Indicates whether a language is available as UI language """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateExtensionRequestSiteRegionalSettingsGreetingLanguage(DataClassJsonMixin): """ Information on language used for telephony greetings """ id: Optional[str] = None """ Internal identifier of a greeting language """ locale_code: Optional[str] = None """ Localization code of a greeting language """ name: Optional[str] = None """ Official name of a greeting language """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateExtensionRequestSiteRegionalSettingsFormattingLocale(DataClassJsonMixin): """ Formatting language preferences for numbers, dates and currencies """ id: Optional[str] = None """ Internal identifier of a formatting language """ locale_code: Optional[str] = None """ Localization code of a formatting language """ name: Optional[str] = None class CreateExtensionRequestSiteRegionalSettingsTimeFormat(Enum): """ Time format setting. The default value is '12h' = ['12h', '24h'] """ OBJECT_12h = '12h' OBJECT_24h = '24h' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateExtensionRequestSiteRegionalSettings(DataClassJsonMixin): """ Information about regional settings. The default is Company settings """ home_country: Optional[CreateExtensionRequestSiteRegionalSettingsHomeCountry] = None """ Extension country information """ timezone: Optional[CreateExtensionRequestSiteRegionalSettingsTimezone] = None """ Extension timezone information """ language: Optional[CreateExtensionRequestSiteRegionalSettingsLanguage] = None """ User interface language data """ greeting_language: Optional[CreateExtensionRequestSiteRegionalSettingsGreetingLanguage] = None """ Information on language used for telephony greetings """ formatting_locale: Optional[CreateExtensionRequestSiteRegionalSettingsFormattingLocale] = None """ Formatting language preferences for numbers, dates and currencies """ time_format: Optional[CreateExtensionRequestSiteRegionalSettingsTimeFormat] = None """ Time format setting. The default value is '12h' = ['12h', '24h'] """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateExtensionRequestSiteOperator(DataClassJsonMixin): """ Site Fax/SMS recipient (operator) reference. Multi-level IVR should be enabled """ id: Optional[str] = None """ Internal identifier of an operator """ uri: Optional[str] = None """ Link to an operator resource """ extension_number: Optional[str] = None """ Extension number (pin) """ name: Optional[str] = None """ Operator extension user full name """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateExtensionRequestSite(DataClassJsonMixin): id: Optional[str] = None """ Internal idetifier of a site extension """ uri: Optional[str] = None """ Link to a site resource """ name: Optional[str] = None """ Extension user first name """ extension_number: Optional[str] = None """ Extension number """ caller_id_name: Optional[str] = None """ Custom name of a caller. Max number of characters is 15 (only alphabetical symbols, numbers and commas are supported) """ email: Optional[str] = None """ Exetnsion user email """ business_address: Optional[CreateExtensionRequestSiteBusinessAddress] = None """ Extension user business address. The default is Company settings """ regional_settings: Optional[CreateExtensionRequestSiteRegionalSettings] = None """ Information about regional settings. The default is Company settings """ operator: Optional[CreateExtensionRequestSiteOperator] = None """ Site Fax/SMS recipient (operator) reference. Multi-level IVR should be enabled """ code: Optional[str] = None """ Site code value. Returned only if specified """ class CreateExtensionRequestStatus(Enum): """ Extension current state """ Enabled = 'Enabled' Disabled = 'Disabled' NotActivated = 'NotActivated' Unassigned = 'Unassigned' Frozen = 'Frozen' class CreateExtensionRequestStatusInfoReason(Enum): """ Type of suspension """ Voluntarily = 'Voluntarily' Involuntarily = 'Involuntarily' SuspendedVoluntarily = 'SuspendedVoluntarily' SuspendedVoluntarily2 = 'SuspendedVoluntarily2' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateExtensionRequestStatusInfo(DataClassJsonMixin): """ Status information (reason, comment). For 'Disabled' status only """ comment: Optional[str] = None """ A free-form user comment, describing the status change reason """ reason: Optional[CreateExtensionRequestStatusInfoReason] = None """ Type of suspension """ class CreateExtensionRequestType(Enum): """ Extension type """ User = 'User' VirtualUser = 'VirtualUser' DigitalUser = 'DigitalUser' Department = 'Department' Announcement = 'Announcement' Voicemail = 'Voicemail' SharedLinesGroup = 'SharedLinesGroup' PagingOnly = 'PagingOnly' ParkLocation = 'ParkLocation' Limited = 'Limited' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateExtensionRequest(DataClassJsonMixin): contact: Optional[CreateExtensionRequestContact] = None """ Contact Information """ extension_number: Optional[str] = None """ Number of extension """ custom_fields: Optional[List[CreateExtensionRequestCustomFieldsItem]] = None password: Optional[str] = None """ Password for extension. If not specified, the password is auto-generated """ references: Optional[List[CreateExtensionRequestReferencesItem]] = None """ List of non-RC internal identifiers assigned to an extension """ regional_settings: Optional[CreateExtensionRequestRegionalSettings] = None """ Extension region data (timezone, home country, language) """ partner_id: Optional[str] = None """ Additional extension identifier, created by partner application and applied on client side """ ivr_pin: Optional[str] = None """ IVR PIN """ setup_wizard_state: Optional[CreateExtensionRequestSetupWizardState] = 'NotStarted' """ Specifies extension configuration wizard state (web service setup). """ site: Optional[CreateExtensionRequestSite] = None status: Optional[CreateExtensionRequestStatus] = None """ Extension current state """ status_info: Optional[CreateExtensionRequestStatusInfo] = None """ Status information (reason, comment). For 'Disabled' status only """ type: Optional[CreateExtensionRequestType] = None """ Extension type """ hidden: Optional[bool] = None """ Hides extension from showing in company directory. Supported for extensions of User type only. For unassigned extensions the value is set to 'True' by default. For assigned extensions the value is set to 'False' by default """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateExtensionResponseContactBusinessAddress(DataClassJsonMixin): """ Business address of extension user company """ country: Optional[str] = None """ Country name of an extension user company """ state: Optional[str] = None """ State/province name of an extension user company. Mandatory for the USA, UK and Canada """ city: Optional[str] = None """ City name of an extension user company """ street: Optional[str] = None """ Street address of an extension user company """ zip: Optional[str] = None """ Zip code of an extension user company """ class CreateExtensionResponseContactPronouncedNameType(Enum): """ Voice name type. 'Default' - default extension name; first name and last name specified in user profile; 'TextToSpeech' - custom text; user name spelled the way it sounds and specified by user; 'Recorded' - custom audio, user name recorded in user's own voice (supported only for extension retrieval) Generated by Python OpenAPI Parser """ Default = 'Default' TextToSpeech = 'TextToSpeech' Recorded = 'Recorded' class CreateExtensionResponseContactPronouncedNamePromptContentType(Enum): """ Content media type """ AudioMpeg = 'audio/mpeg' AudioWav = 'audio/wav' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateExtensionResponseContactPronouncedNamePrompt(DataClassJsonMixin): id: Optional[str] = None content_uri: Optional[str] = None """ Link to a prompt resource """ content_type: Optional[CreateExtensionResponseContactPronouncedNamePromptContentType] = None """ Content media type """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateExtensionResponseContactPronouncedName(DataClassJsonMixin): type: Optional[CreateExtensionResponseContactPronouncedNameType] = None """ Voice name type. 'Default' - default extension name; first name and last name specified in user profile; 'TextToSpeech' - custom text; user name spelled the way it sounds and specified by user; 'Recorded' - custom audio, user name recorded in user's own voice (supported only for extension retrieval) """ text: Optional[str] = None """ Custom text """ prompt: Optional[CreateExtensionResponseContactPronouncedNamePrompt] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateExtensionResponseContact(DataClassJsonMixin): """ Contact detailed information """ first_name: Optional[str] = None """ For User extension type only. Extension user first name """ last_name: Optional[str] = None """ For User extension type only. Extension user last name """ company: Optional[str] = None """ Extension user company name """ job_title: Optional[str] = None email: Optional[str] = None """ Email of extension user """ business_phone: Optional[str] = None """ Extension user contact phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) (with '+' sign) format """ mobile_phone: Optional[str] = None """ Extension user mobile (**non** Toll Free) phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) (with '+' sign) format """ business_address: Optional[CreateExtensionResponseContactBusinessAddress] = None """ Business address of extension user company """ email_as_login_name: Optional[bool] = 'False' """ If 'True' then contact email is enabled as login name for this user. Please note that email should be unique in this case. """ pronounced_name: Optional[CreateExtensionResponseContactPronouncedName] = None department: Optional[str] = None """ Extension user department, if any """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateExtensionResponseCustomFieldsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a custom field """ value: Optional[str] = None """ Custom field value """ display_name: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateExtensionResponsePermissionsAdmin(DataClassJsonMixin): """ Admin permission """ enabled: Optional[bool] = None """ Specifies if a permission is enabled or not """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateExtensionResponsePermissionsInternationalCalling(DataClassJsonMixin): """ International Calling permission """ enabled: Optional[bool] = None """ Specifies if a permission is enabled or not """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateExtensionResponsePermissions(DataClassJsonMixin): """ Extension permissions, corresponding to the Service Web permissions 'Admin' and 'InternationalCalling' Generated by Python OpenAPI Parser """ admin: Optional[CreateExtensionResponsePermissionsAdmin] = None """ Admin permission """ international_calling: Optional[CreateExtensionResponsePermissionsInternationalCalling] = None """ International Calling permission """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateExtensionResponseProfileImageScalesItem(DataClassJsonMixin): uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateExtensionResponseProfileImage(DataClassJsonMixin): """ Information on profile image Required Properties: - uri Generated by Python OpenAPI Parser """ uri: str """ Link to a profile image. If an image is not uploaded for an extension, only uri is returned """ etag: Optional[str] = None """ Identifier of an image """ last_modified: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ The datetime when an image was last updated in ISO 8601 format, for example 2016-03-10T18:07:52.534Z """ content_type: Optional[str] = None """ The type of an image """ scales: Optional[List[CreateExtensionResponseProfileImageScalesItem]] = None """ List of URIs to profile images in different dimensions """ class CreateExtensionResponseReferencesItemType(Enum): """ Type of external identifier """ PartnerId = 'PartnerId' CustomerDirectoryId = 'CustomerDirectoryId' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateExtensionResponseReferencesItem(DataClassJsonMixin): ref: Optional[str] = None """ Non-RC identifier of an extension """ type: Optional[CreateExtensionResponseReferencesItemType] = None """ Type of external identifier """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateExtensionResponseRegionalSettingsHomeCountry(DataClassJsonMixin): """ Extension country information """ id: Optional[str] = None """ Internal identifier of a home country """ uri: Optional[str] = None """ Canonical URI of a home country """ name: Optional[str] = None """ Official name of a home country """ iso_code: Optional[str] = None """ ISO code of a country """ calling_code: Optional[str] = None """ Calling code of a country """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateExtensionResponseRegionalSettingsTimezone(DataClassJsonMixin): """ Extension timezone information """ id: Optional[str] = None """ Internal identifier of a timezone """ uri: Optional[str] = None """ Canonical URI of a timezone """ name: Optional[str] = None """ Short name of a timezone """ description: Optional[str] = None """ Meaningful description of the timezone """ bias: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateExtensionResponseRegionalSettingsLanguage(DataClassJsonMixin): """ User interface language data """ id: Optional[str] = None """ Internal identifier of a language """ uri: Optional[str] = None """ Canonical URI of a language """ greeting: Optional[bool] = None """ Indicates whether a language is available as greeting language """ formatting_locale: Optional[bool] = None """ Indicates whether a language is available as formatting locale """ locale_code: Optional[str] = None """ Localization code of a language """ iso_code: Optional[str] = None """ Country code according to the ISO standard, see [ISO 3166](https://www.iso.org/iso-3166-country-codes.html) """ name: Optional[str] = None """ Official name of a language """ ui: Optional[bool] = None """ Indicates whether a language is available as UI language """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateExtensionResponseRegionalSettingsGreetingLanguage(DataClassJsonMixin): """ Information on language used for telephony greetings """ id: Optional[str] = None """ Internal identifier of a greeting language """ locale_code: Optional[str] = None """ Localization code of a greeting language """ name: Optional[str] = None """ Official name of a greeting language """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateExtensionResponseRegionalSettingsFormattingLocale(DataClassJsonMixin): """ Formatting language preferences for numbers, dates and currencies """ id: Optional[str] = None """ Internal identifier of a formatting language """ locale_code: Optional[str] = None """ Localization code of a formatting language """ name: Optional[str] = None class CreateExtensionResponseRegionalSettingsTimeFormat(Enum): """ Time format setting. The default value is '12h' = ['12h', '24h'] """ OBJECT_12h = '12h' OBJECT_24h = '24h' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateExtensionResponseRegionalSettings(DataClassJsonMixin): """ Extension region data (timezone, home country, language) """ home_country: Optional[CreateExtensionResponseRegionalSettingsHomeCountry] = None """ Extension country information """ timezone: Optional[CreateExtensionResponseRegionalSettingsTimezone] = None """ Extension timezone information """ language: Optional[CreateExtensionResponseRegionalSettingsLanguage] = None """ User interface language data """ greeting_language: Optional[CreateExtensionResponseRegionalSettingsGreetingLanguage] = None """ Information on language used for telephony greetings """ formatting_locale: Optional[CreateExtensionResponseRegionalSettingsFormattingLocale] = None """ Formatting language preferences for numbers, dates and currencies """ time_format: Optional[CreateExtensionResponseRegionalSettingsTimeFormat] = None """ Time format setting. The default value is '12h' = ['12h', '24h'] """ class CreateExtensionResponseServiceFeaturesItemFeatureName(Enum): """ Feature name """ AccountFederation = 'AccountFederation' Archiver = 'Archiver' AutomaticCallRecordingMute = 'AutomaticCallRecordingMute' AutomaticInboundCallRecording = 'AutomaticInboundCallRecording' AutomaticOutboundCallRecording = 'AutomaticOutboundCallRecording' BlockedMessageForwarding = 'BlockedMessageForwarding' Calendar = 'Calendar' CallerIdControl = 'CallerIdControl' CallForwarding = 'CallForwarding' CallPark = 'CallPark' CallParkLocations = 'CallParkLocations' CallSupervision = 'CallSupervision' CallSwitch = 'CallSwitch' CallQualitySurvey = 'CallQualitySurvey' Conferencing = 'Conferencing' ConferencingNumber = 'ConferencingNumber' ConfigureDelegates = 'ConfigureDelegates' DeveloperPortal = 'DeveloperPortal' DND = 'DND' DynamicConference = 'DynamicConference' EmergencyAddressAutoUpdate = 'EmergencyAddressAutoUpdate' EmergencyCalling = 'EmergencyCalling' EncryptionAtRest = 'EncryptionAtRest' ExternalDirectoryIntegration = 'ExternalDirectoryIntegration' Fax = 'Fax' FaxReceiving = 'FaxReceiving' FreeSoftPhoneLines = 'FreeSoftPhoneLines' HDVoice = 'HDVoice' HipaaCompliance = 'HipaaCompliance' Intercom = 'Intercom' InternationalCalling = 'InternationalCalling' InternationalSMS = 'InternationalSMS' LinkedSoftphoneLines = 'LinkedSoftphoneLines' MMS = 'MMS' MobileVoipEmergencyCalling = 'MobileVoipEmergencyCalling' OnDemandCallRecording = 'OnDemandCallRecording' Pager = 'Pager' PagerReceiving = 'PagerReceiving' Paging = 'Paging' PasswordAuth = 'PasswordAuth' PromoMessage = 'PromoMessage' Reports = 'Reports' Presence = 'Presence' RCTeams = 'RCTeams' RingOut = 'RingOut' SalesForce = 'SalesForce' SharedLines = 'SharedLines' SingleExtensionUI = 'SingleExtensionUI' SiteCodes = 'SiteCodes' SMS = 'SMS' SMSReceiving = 'SMSReceiving' SoftPhoneUpdate = 'SoftPhoneUpdate' TelephonySessions = 'TelephonySessions' UserManagement = 'UserManagement' VideoConferencing = 'VideoConferencing' VoipCalling = 'VoipCalling' VoipCallingOnMobile = 'VoipCallingOnMobile' Voicemail = 'Voicemail' VoicemailToText = 'VoicemailToText' WebPhone = 'WebPhone' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateExtensionResponseServiceFeaturesItem(DataClassJsonMixin): enabled: Optional[bool] = None """ Feature status; shows feature availability for an extension """ feature_name: Optional[CreateExtensionResponseServiceFeaturesItemFeatureName] = None """ Feature name """ reason: Optional[str] = None """ Reason for limitation of a particular service feature. Returned only if the enabled parameter value is 'False', see Service Feature Limitations and Reasons. When retrieving service features for an extension, the reasons for the limitations, if any, are returned in response """ class CreateExtensionResponseSetupWizardState(Enum): """ Specifies extension configuration wizard state (web service setup). The default value is 'NotStarted' Generated by Python OpenAPI Parser """ NotStarted = 'NotStarted' Incomplete = 'Incomplete' Completed = 'Completed' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateExtensionResponseSite(DataClassJsonMixin): """ Site data. If multi-site feature is turned on for the account, then internal identifier of a site must be specified. To assign the wireless point to the main site (company) set site ID to `main-site` Generated by Python OpenAPI Parser """ id: Optional[str] = None """ Internal identifier of a site """ uri: Optional[str] = None """ Link to a site resource """ name: Optional[str] = None """ Name of a site """ code: Optional[str] = None """ Site code value. Returned only if specified """ class CreateExtensionResponseStatus(Enum): """ Extension current state. If 'Unassigned' is specified, then extensions without ‘extensionNumber’ are returned. If not specified, then all extensions are returned Generated by Python OpenAPI Parser """ Enabled = 'Enabled' Disabled = 'Disabled' Frozen = 'Frozen' NotActivated = 'NotActivated' Unassigned = 'Unassigned' class CreateExtensionResponseStatusInfoReason(Enum): """ Type of suspension """ Voluntarily = 'Voluntarily' Involuntarily = 'Involuntarily' SuspendedVoluntarily = 'SuspendedVoluntarily' SuspendedVoluntarily2 = 'SuspendedVoluntarily2' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateExtensionResponseStatusInfo(DataClassJsonMixin): """ Status information (reason, comment). Returned for 'Disabled' status only """ comment: Optional[str] = None """ A free-form user comment, describing the status change reason """ reason: Optional[CreateExtensionResponseStatusInfoReason] = None """ Type of suspension """ class CreateExtensionResponseType(Enum): """ Extension type """ User = 'User' VirtualUser = 'VirtualUser' DigitalUser = 'DigitalUser' Department = 'Department' Announcement = 'Announcement' Voicemail = 'Voicemail' SharedLinesGroup = 'SharedLinesGroup' PagingOnly = 'PagingOnly' ParkLocation = 'ParkLocation' Limited = 'Limited' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateExtensionResponse(DataClassJsonMixin): id: Optional[int] = None """ Internal identifier of an extension """ uri: Optional[str] = None """ Canonical URI of an extension """ contact: Optional[CreateExtensionResponseContact] = None """ Contact detailed information """ custom_fields: Optional[List[CreateExtensionResponseCustomFieldsItem]] = None extension_number: Optional[str] = None """ Number of department extension """ name: Optional[str] = None """ Extension name. For user extension types the value is a combination of the specified first name and last name """ partner_id: Optional[str] = None """ For Partner Applications Internal identifier of an extension created by partner. The RingCentral supports the mapping of accounts and stores the corresponding account ID/extension ID for each partner ID of a client application. In request URIs partner IDs are accepted instead of regular RingCentral native IDs as path parameters using pid = XXX clause. Though in response URIs contain the corresponding account IDs and extension IDs. In all request and response bodies these values are reflected via partnerId attributes of account and extension """ permissions: Optional[CreateExtensionResponsePermissions] = None """ Extension permissions, corresponding to the Service Web permissions 'Admin' and 'InternationalCalling' """ profile_image: Optional[CreateExtensionResponseProfileImage] = None """ Information on profile image """ references: Optional[List[CreateExtensionResponseReferencesItem]] = None """ List of non-RC internal identifiers assigned to an extension """ regional_settings: Optional[CreateExtensionResponseRegionalSettings] = None """ Extension region data (timezone, home country, language) """ service_features: Optional[List[CreateExtensionResponseServiceFeaturesItem]] = None """ Extension service features returned in response only when the logged-in user requests his/her own extension info, see also Extension Service Features """ setup_wizard_state: Optional[CreateExtensionResponseSetupWizardState] = None """ Specifies extension configuration wizard state (web service setup). The default value is 'NotStarted' """ site: Optional[CreateExtensionResponseSite] = None """ Site data. If multi-site feature is turned on for the account, then internal identifier of a site must be specified. To assign the wireless point to the main site (company) set site ID to `main-site` """ status: Optional[CreateExtensionResponseStatus] = None """ Extension current state. If 'Unassigned' is specified, then extensions without ‘extensionNumber’ are returned. If not specified, then all extensions are returned """ status_info: Optional[CreateExtensionResponseStatusInfo] = None """ Status information (reason, comment). Returned for 'Disabled' status only """ type: Optional[CreateExtensionResponseType] = None """ Extension type """ hidden: Optional[bool] = None """ Hides extension from showing in company directory. Supported for extensions of User type only """ class ListUserTemplatesType(Enum): UserSettings = 'UserSettings' CallHandling = 'CallHandling' class ListUserTemplatesResponseRecordsItemType(Enum): UserSettings = 'UserSettings' CallHandling = 'CallHandling' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListUserTemplatesResponseRecordsItem(DataClassJsonMixin): uri: Optional[str] = None """ Link to a template """ id: Optional[str] = None """ Internal identifier of a template """ type: Optional[ListUserTemplatesResponseRecordsItemType] = None name: Optional[str] = None """ Name of a template """ creation_time: Optional[str] = None """ Time of a template creation """ last_modified_time: Optional[str] = None """ Time of the last template modification """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListUserTemplatesResponseNavigationFirstPage(DataClassJsonMixin): """ Canonical URI for the first page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListUserTemplatesResponseNavigationNextPage(DataClassJsonMixin): """ Canonical URI for the next page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListUserTemplatesResponseNavigationPreviousPage(DataClassJsonMixin): """ Canonical URI for the previous page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListUserTemplatesResponseNavigationLastPage(DataClassJsonMixin): """ Canonical URI for the last page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListUserTemplatesResponseNavigation(DataClassJsonMixin): """ Information on navigation """ first_page: Optional[ListUserTemplatesResponseNavigationFirstPage] = None """ Canonical URI for the first page of the list """ next_page: Optional[ListUserTemplatesResponseNavigationNextPage] = None """ Canonical URI for the next page of the list """ previous_page: Optional[ListUserTemplatesResponseNavigationPreviousPage] = None """ Canonical URI for the previous page of the list """ last_page: Optional[ListUserTemplatesResponseNavigationLastPage] = None """ Canonical URI for the last page of the list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListUserTemplatesResponsePaging(DataClassJsonMixin): """ Information on paging """ page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) """ per_page: Optional[int] = None """ Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty """ total_pages: Optional[int] = None """ The total number of pages in a dataset. May be omitted for some resources due to performance reasons """ total_elements: Optional[int] = None """ The total number of elements in a dataset. May be omitted for some resource due to performance reasons """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListUserTemplatesResponse(DataClassJsonMixin): """ Required Properties: - navigation - paging - records Generated by Python OpenAPI Parser """ records: List[ListUserTemplatesResponseRecordsItem] """ List of user templates """ navigation: ListUserTemplatesResponseNavigation """ Information on navigation """ paging: ListUserTemplatesResponsePaging """ Information on paging """ uri: Optional[str] = None """ Link to user templates resource """ class ReadUserTemplateResponseType(Enum): UserSettings = 'UserSettings' CallHandling = 'CallHandling' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserTemplateResponse(DataClassJsonMixin): uri: Optional[str] = None """ Link to a template """ id: Optional[str] = None """ Internal identifier of a template """ type: Optional[ReadUserTemplateResponseType] = None name: Optional[str] = None """ Name of a template """ creation_time: Optional[str] = None """ Time of a template creation """ last_modified_time: Optional[str] = None """ Time of the last template modification """ class ReadUserVideoConfigurationResponseProvider(Enum): """ Video provider of the user """ RCMeetings = 'RCMeetings' RCVideo = 'RCVideo' None_ = 'None'
/ringcentral_async_client-1.0.3-py3-none-any.whl/ringcentral_async_client/_code_gen/model/_13.py
0.771413
0.322659
_13.py
pypi
from ._8 import * @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListGlipPostsResponseNavigation(DataClassJsonMixin): prev_page_token: Optional[str] = None """ Previous page token. To get previous page, user should pass one of returned token in next request and, in turn, required page will be returned with new tokens """ next_page_token: Optional[str] = None """ Next page token. To get next page, user should pass one of returned token in next request and, in turn, required page will be returned with new tokens """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListGlipPostsResponse(DataClassJsonMixin): """ Required Properties: - records Generated by Python OpenAPI Parser """ records: List[ListGlipPostsResponseRecordsItem] """ List of posts """ navigation: Optional[ListGlipPostsResponseNavigation] = None class CreatePostRequestAttachmentsItemType(Enum): """ Type of attachment """ Card = 'Card' Event = 'Event' Note = 'Note' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreatePostRequestAttachmentsItemAuthor(DataClassJsonMixin): """ Information about the author """ name: Optional[str] = None """ Name of a message author """ uri: Optional[str] = None """ Link to an author's name """ icon_uri: Optional[str] = None """ Link to an image displayed to the left of an author's name; sized 82x82px """ class CreatePostRequestAttachmentsItemFieldsItemStyle(Enum): """ Style of width span applied to a field """ Short = 'Short' Long = 'Long' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreatePostRequestAttachmentsItemFieldsItem(DataClassJsonMixin): title: Optional[str] = None """ Title of an individual field """ value: Optional[str] = None """ Value of an individual field (supports Markdown) """ style: Optional[CreatePostRequestAttachmentsItemFieldsItemStyle] = 'Short' """ Style of width span applied to a field """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreatePostRequestAttachmentsItemFootnote(DataClassJsonMixin): """ Message footer information """ text: Optional[str] = None """ Text of a footer """ icon_uri: Optional[str] = None """ Link to an icon displayed to the left of a footer; sized 32x32px """ time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Message creation datetime in ISO 8601 format including timezone, for example *2016-03-10T18:07:52.534Z* """ class CreatePostRequestAttachmentsItemRecurrence(Enum): """ Event recurrence settings. For non-periodic events the value is 'None'. Must be greater or equal to event duration: 1- Day/Weekday; 7 - Week; 28 - Month; 365 - Year Generated by Python OpenAPI Parser """ None_ = 'None' Day = 'Day' Weekday = 'Weekday' Week = 'Week' Month = 'Month' Year = 'Year' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreatePostRequestAttachmentsItem(DataClassJsonMixin): type: Optional[CreatePostRequestAttachmentsItemType] = 'Card' """ Type of attachment """ title: Optional[str] = None """ Attachment title """ fallback: Optional[str] = None """ Default message returned in case the client does not support interactive messages """ color: Optional[str] = None """ Color of Event title, including its presentation in Calendar; or the color of the side border of an interactive message of a Card. The default color is 'Black' """ intro: Optional[str] = None """ Introductory text displayed directly above a message """ author: Optional[CreatePostRequestAttachmentsItemAuthor] = None """ Information about the author """ text: Optional[str] = None """ Text of attachment (up to 1000 chars), supports GlipDown """ image_uri: Optional[str] = None """ Link to an image displayed at the bottom of a message """ thumbnail_uri: Optional[str] = None """ Link to an image preview displayed to the right of a message (82x82) """ fields: Optional[List[CreatePostRequestAttachmentsItemFieldsItem]] = None """ Individual subsections within a message """ footnote: Optional[CreatePostRequestAttachmentsItemFootnote] = None """ Message footer information """ start_time: Optional[str] = None """ Datetime of starting an event """ end_time: Optional[str] = None """ Datetime of ending an event """ all_day: Optional[bool] = False """ Indicates whether an event has some specific time slot or lasts for the whole day(s) """ recurrence: Optional[CreatePostRequestAttachmentsItemRecurrence] = None """ Event recurrence settings. For non-periodic events the value is 'None'. Must be greater or equal to event duration: 1- Day/Weekday; 7 - Week; 28 - Month; 365 - Year """ ending_condition: Optional[str] = None """ Condition of ending an event """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreatePostRequest(DataClassJsonMixin): activity: Optional[str] = None title: Optional[str] = None """ Title of a message. (Can be set for bot's messages only). """ text: Optional[str] = None """ Text of a post """ group_id: Optional[str] = None """ Internal identifier of a group """ attachments: Optional[List[CreatePostRequestAttachmentsItem]] = None """ List of attachments to be posted """ person_ids: Optional[List[str]] = None system: Optional[bool] = None class CreatePostResponseType(Enum): """ Type of a post """ TextMessage = 'TextMessage' PersonJoined = 'PersonJoined' PersonsAdded = 'PersonsAdded' class CreatePostResponseAttachmentsItemType(Enum): """ Type of an attachment """ Card = 'Card' Event = 'Event' Note = 'Note' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreatePostResponseAttachmentsItemAuthor(DataClassJsonMixin): """ Information about the author """ name: Optional[str] = None """ Name of a message author """ uri: Optional[str] = None """ Link to an author's name """ icon_uri: Optional[str] = None """ Link to an image displayed to the left of an author's name; sized 82x82px """ class CreatePostResponseAttachmentsItemFieldsItemStyle(Enum): """ Style of width span applied to a field """ Short = 'Short' Long = 'Long' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreatePostResponseAttachmentsItemFieldsItem(DataClassJsonMixin): title: Optional[str] = None """ Title of an individual field """ value: Optional[str] = None """ Value of an individual field (supports Markdown) """ style: Optional[CreatePostResponseAttachmentsItemFieldsItemStyle] = 'Short' """ Style of width span applied to a field """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreatePostResponseAttachmentsItemFootnote(DataClassJsonMixin): """ Message Footer """ text: Optional[str] = None """ Text of a footer """ icon_uri: Optional[str] = None """ Link to an icon displayed to the left of a footer; sized 32x32px """ time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Message creation datetime in ISO 8601 format including timezone, for example *2016-03-10T18:07:52.534Z* """ class CreatePostResponseAttachmentsItemRecurrence(Enum): """ Event recurrence settings. """ None_ = 'None' Day = 'Day' Weekday = 'Weekday' Week = 'Week' Month = 'Month' Year = 'Year' class CreatePostResponseAttachmentsItemEndingOn(Enum): """ Iterations end datetime for periodic events """ None_ = 'None' Count = 'Count' Date = 'Date' class CreatePostResponseAttachmentsItemColor(Enum): """ Color of Event title, including its presentation in Calendar; or the color of the side border of an interactive message of a Card Generated by Python OpenAPI Parser """ Black = 'Black' Red = 'Red' Orange = 'Orange' Yellow = 'Yellow' Green = 'Green' Blue = 'Blue' Purple = 'Purple' Magenta = 'Magenta' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreatePostResponseAttachmentsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an attachment """ type: Optional[CreatePostResponseAttachmentsItemType] = 'Card' """ Type of an attachment """ fallback: Optional[str] = None """ A string of default text that will be rendered in the case that the client does not support Interactive Messages """ intro: Optional[str] = None """ A pretext to the message """ author: Optional[CreatePostResponseAttachmentsItemAuthor] = None """ Information about the author """ title: Optional[str] = None """ Message title """ text: Optional[str] = None """ A large string field (up to 1000 chars) to be displayed as the body of a message (Supports GlipDown) """ image_uri: Optional[str] = None """ Link to an image displayed at the bottom of a message """ thumbnail_uri: Optional[str] = None """ Link to an image preview displayed to the right of a message (82x82) """ fields: Optional[List[CreatePostResponseAttachmentsItemFieldsItem]] = None """ Information on navigation """ footnote: Optional[CreatePostResponseAttachmentsItemFootnote] = None """ Message Footer """ creator_id: Optional[str] = None """ Internal identifier of a person created an event """ start_time: Optional[str] = None """ Datetime of starting an event """ end_time: Optional[str] = None """ Datetime of ending an event """ all_day: Optional[bool] = False """ Indicates whether an event has some specific time slot or lasts for the whole day(s) """ recurrence: Optional[CreatePostResponseAttachmentsItemRecurrence] = None """ Event recurrence settings. """ ending_condition: Optional[str] = None """ Condition of ending """ ending_after: Optional[int] = None """ Count of iterations. For periodic events only """ ending_on: Optional[CreatePostResponseAttachmentsItemEndingOn] = 'None' """ Iterations end datetime for periodic events """ color: Optional[CreatePostResponseAttachmentsItemColor] = 'Black' """ Color of Event title, including its presentation in Calendar; or the color of the side border of an interactive message of a Card """ location: Optional[str] = None """ Event location """ description: Optional[str] = None """ Event details """ class CreatePostResponseMentionsItemType(Enum): """ Type of mentions """ Person = 'Person' Team = 'Team' File = 'File' Link = 'Link' Event = 'Event' Task = 'Task' Note = 'Note' Card = 'Card' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreatePostResponseMentionsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a user """ type: Optional[CreatePostResponseMentionsItemType] = None """ Type of mentions """ name: Optional[str] = None """ Name of a user """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreatePostResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a post """ group_id: Optional[str] = None """ Internal identifier of a group a post belongs to """ type: Optional[CreatePostResponseType] = None """ Type of a post """ text: Optional[str] = None """ For 'TextMessage' post type only. Text of a message """ creator_id: Optional[str] = None """ Internal identifier of a user - author of a post """ added_person_ids: Optional[List[str]] = None """ For 'PersonsAdded' post type only. Identifiers of persons added to a group """ creation_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Post creation datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format """ last_modified_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Post last modification datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format """ attachments: Optional[List[CreatePostResponseAttachmentsItem]] = None """ List of posted attachments """ mentions: Optional[List[CreatePostResponseMentionsItem]] = None activity: Optional[str] = None """ Label of activity type """ title: Optional[str] = None """ Title of a message. (Can be set for bot's messages only) """ icon_uri: Optional[str] = None """ Link to an image used as an icon for this message """ icon_emoji: Optional[str] = None """ Emoji used as an icon for this message """ class ReadUnifiedPresenceResponseStatus(Enum): """ Aggregated presence status of the user """ Available = 'Available' Offline = 'Offline' DND = 'DND' Busy = 'Busy' class ReadUnifiedPresenceResponseGlipStatus(Enum): """ Glip connection status calculated from all user's apps. Returned always for the requester's extension; returned for another users if their glip visibility is set to 'Visible' Generated by Python OpenAPI Parser """ Offline = 'Offline' Online = 'Online' class ReadUnifiedPresenceResponseGlipVisibility(Enum): """ Visibility setting allowing other users to see the user's Glip presence status; returned only for requester's extension Generated by Python OpenAPI Parser """ Visible = 'Visible' Invisible = 'Invisible' class ReadUnifiedPresenceResponseGlipAvailability(Enum): """ Shows whether user wants to receive Glip notifications or not. """ Available = 'Available' DND = 'DND' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUnifiedPresenceResponseGlip(DataClassJsonMixin): """ Returned if *Glip* feature is switched on """ status: Optional[ReadUnifiedPresenceResponseGlipStatus] = None """ Glip connection status calculated from all user's apps. Returned always for the requester's extension; returned for another users if their glip visibility is set to 'Visible' """ visibility: Optional[ReadUnifiedPresenceResponseGlipVisibility] = None """ Visibility setting allowing other users to see the user's Glip presence status; returned only for requester's extension """ availability: Optional[ReadUnifiedPresenceResponseGlipAvailability] = None """ Shows whether user wants to receive Glip notifications or not. """ class ReadUnifiedPresenceResponseTelephonyStatus(Enum): """ Telephony status calculated from all user's phone numbers. Returned always for the requester's extension; returned for another users if their telephony visibility is set to 'Visible' Generated by Python OpenAPI Parser """ NoCall = 'NoCall' Ringing = 'Ringing' CallConnected = 'CallConnected' OnHold = 'OnHold' ParkedCall = 'ParkedCall' class ReadUnifiedPresenceResponseTelephonyVisibility(Enum): """ Specifies if the user hardphone presence status is visible to other users; returned only for requester's extension Generated by Python OpenAPI Parser """ Visible = 'Visible' Invisible = 'Invisible' class ReadUnifiedPresenceResponseTelephonyAvailability(Enum): """ Telephony DND status. Returned if *DND* feature is switched on """ TakeAllCalls = 'TakeAllCalls' DoNotAcceptAnyCalls = 'DoNotAcceptAnyCalls' DoNotAcceptQueueCalls = 'DoNotAcceptQueueCalls' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUnifiedPresenceResponseTelephony(DataClassJsonMixin): """ Returned if *BLF* feature is switched on """ status: Optional[ReadUnifiedPresenceResponseTelephonyStatus] = None """ Telephony status calculated from all user's phone numbers. Returned always for the requester's extension; returned for another users if their telephony visibility is set to 'Visible' """ visibility: Optional[ReadUnifiedPresenceResponseTelephonyVisibility] = None """ Specifies if the user hardphone presence status is visible to other users; returned only for requester's extension """ availability: Optional[ReadUnifiedPresenceResponseTelephonyAvailability] = None """ Telephony DND status. Returned if *DND* feature is switched on """ class ReadUnifiedPresenceResponseMeetingStatus(Enum): """ Meeting status calculated from all user`s meetings """ NoMeeting = 'NoMeeting' InMeeting = 'InMeeting' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUnifiedPresenceResponseMeeting(DataClassJsonMixin): """ Returned if *Meetings* feature is switched on """ status: Optional[ReadUnifiedPresenceResponseMeetingStatus] = None """ Meeting status calculated from all user`s meetings """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUnifiedPresenceResponse(DataClassJsonMixin): status: Optional[ReadUnifiedPresenceResponseStatus] = None """ Aggregated presence status of the user """ glip: Optional[ReadUnifiedPresenceResponseGlip] = None """ Returned if *Glip* feature is switched on """ telephony: Optional[ReadUnifiedPresenceResponseTelephony] = None """ Returned if *BLF* feature is switched on """ meeting: Optional[ReadUnifiedPresenceResponseMeeting] = None """ Returned if *Meetings* feature is switched on """ class ReadUnifiedPresenceResponseBodyStatus(Enum): """ Aggregated presence status of the user """ Available = 'Available' Offline = 'Offline' DND = 'DND' Busy = 'Busy' class ReadUnifiedPresenceResponseBodyGlipStatus(Enum): """ Glip connection status calculated from all user's apps. Returned always for the requester's extension; returned for another users if their glip visibility is set to 'Visible' Generated by Python OpenAPI Parser """ Offline = 'Offline' Online = 'Online' class ReadUnifiedPresenceResponseBodyGlipVisibility(Enum): """ Visibility setting allowing other users to see the user's Glip presence status; returned only for requester's extension Generated by Python OpenAPI Parser """ Visible = 'Visible' Invisible = 'Invisible' class ReadUnifiedPresenceResponseBodyGlipAvailability(Enum): """ Shows whether user wants to receive Glip notifications or not. """ Available = 'Available' DND = 'DND' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUnifiedPresenceResponseBodyGlip(DataClassJsonMixin): """ Returned if *Glip* feature is switched on """ status: Optional[ReadUnifiedPresenceResponseBodyGlipStatus] = None """ Glip connection status calculated from all user's apps. Returned always for the requester's extension; returned for another users if their glip visibility is set to 'Visible' """ visibility: Optional[ReadUnifiedPresenceResponseBodyGlipVisibility] = None """ Visibility setting allowing other users to see the user's Glip presence status; returned only for requester's extension """ availability: Optional[ReadUnifiedPresenceResponseBodyGlipAvailability] = None """ Shows whether user wants to receive Glip notifications or not. """ class ReadUnifiedPresenceResponseBodyTelephonyStatus(Enum): """ Telephony status calculated from all user's phone numbers. Returned always for the requester's extension; returned for another users if their telephony visibility is set to 'Visible' Generated by Python OpenAPI Parser """ NoCall = 'NoCall' Ringing = 'Ringing' CallConnected = 'CallConnected' OnHold = 'OnHold' ParkedCall = 'ParkedCall' class ReadUnifiedPresenceResponseBodyTelephonyVisibility(Enum): """ Specifies if the user hardphone presence status is visible to other users; returned only for requester's extension Generated by Python OpenAPI Parser """ Visible = 'Visible' Invisible = 'Invisible' class ReadUnifiedPresenceResponseBodyTelephonyAvailability(Enum): """ Telephony DND status. Returned if *DND* feature is switched on """ TakeAllCalls = 'TakeAllCalls' DoNotAcceptAnyCalls = 'DoNotAcceptAnyCalls' DoNotAcceptQueueCalls = 'DoNotAcceptQueueCalls' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUnifiedPresenceResponseBodyTelephony(DataClassJsonMixin): """ Returned if *BLF* feature is switched on """ status: Optional[ReadUnifiedPresenceResponseBodyTelephonyStatus] = None """ Telephony status calculated from all user's phone numbers. Returned always for the requester's extension; returned for another users if their telephony visibility is set to 'Visible' """ visibility: Optional[ReadUnifiedPresenceResponseBodyTelephonyVisibility] = None """ Specifies if the user hardphone presence status is visible to other users; returned only for requester's extension """ availability: Optional[ReadUnifiedPresenceResponseBodyTelephonyAvailability] = None """ Telephony DND status. Returned if *DND* feature is switched on """ class ReadUnifiedPresenceResponseBodyMeetingStatus(Enum): """ Meeting status calculated from all user`s meetings """ NoMeeting = 'NoMeeting' InMeeting = 'InMeeting' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUnifiedPresenceResponseBodyMeeting(DataClassJsonMixin): """ Returned if *Meetings* feature is switched on """ status: Optional[ReadUnifiedPresenceResponseBodyMeetingStatus] = None """ Meeting status calculated from all user`s meetings """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUnifiedPresenceResponseBody(DataClassJsonMixin): status: Optional[ReadUnifiedPresenceResponseBodyStatus] = None """ Aggregated presence status of the user """ glip: Optional[ReadUnifiedPresenceResponseBodyGlip] = None """ Returned if *Glip* feature is switched on """ telephony: Optional[ReadUnifiedPresenceResponseBodyTelephony] = None """ Returned if *BLF* feature is switched on """ meeting: Optional[ReadUnifiedPresenceResponseBodyMeeting] = None """ Returned if *Meetings* feature is switched on """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUnifiedPresenceResponse(DataClassJsonMixin): resource_id: Optional[str] = None """ Internal identifier of the resource """ status: Optional[int] = None """ Status code of resource retrieval """ body: Optional[ReadUnifiedPresenceResponseBody] = None class UpdateUnifiedPresenceRequestGlipVisibility(Enum): """ Visibility setting allowing other users to see Glip presence status """ Visible = 'Visible' Invisible = 'Invisible' class UpdateUnifiedPresenceRequestGlipAvailability(Enum): """ Availability setting specifing whether to receive Glip notifications or not """ Available = 'Available' DND = 'DND' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateUnifiedPresenceRequestGlip(DataClassJsonMixin): visibility: Optional[UpdateUnifiedPresenceRequestGlipVisibility] = None """ Visibility setting allowing other users to see Glip presence status """ availability: Optional[UpdateUnifiedPresenceRequestGlipAvailability] = None """ Availability setting specifing whether to receive Glip notifications or not """ class UpdateUnifiedPresenceRequestTelephonyAvailability(Enum): """ Telephony DND status """ TakeAllCalls = 'TakeAllCalls' DoNotAcceptAnyCalls = 'DoNotAcceptAnyCalls' DoNotAcceptQueueCalls = 'DoNotAcceptQueueCalls' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateUnifiedPresenceRequestTelephony(DataClassJsonMixin): availability: Optional[UpdateUnifiedPresenceRequestTelephonyAvailability] = None """ Telephony DND status """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateUnifiedPresenceRequest(DataClassJsonMixin): glip: Optional[UpdateUnifiedPresenceRequestGlip] = None telephony: Optional[UpdateUnifiedPresenceRequestTelephony] = None class UpdateUnifiedPresenceResponseStatus(Enum): """ Aggregated presence status of the user """ Available = 'Available' Offline = 'Offline' DND = 'DND' Busy = 'Busy' class UpdateUnifiedPresenceResponseGlipStatus(Enum): """ Glip connection status calculated from all user's apps. Returned always for the requester's extension; returned for another users if their glip visibility is set to 'Visible' Generated by Python OpenAPI Parser """ Offline = 'Offline' Online = 'Online' class UpdateUnifiedPresenceResponseGlipVisibility(Enum): """ Visibility setting allowing other users to see the user's Glip presence status; returned only for requester's extension Generated by Python OpenAPI Parser """ Visible = 'Visible' Invisible = 'Invisible' class UpdateUnifiedPresenceResponseGlipAvailability(Enum): """ Shows whether user wants to receive Glip notifications or not. """ Available = 'Available' DND = 'DND' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateUnifiedPresenceResponseGlip(DataClassJsonMixin): """ Returned if *Glip* feature is switched on """ status: Optional[UpdateUnifiedPresenceResponseGlipStatus] = None """ Glip connection status calculated from all user's apps. Returned always for the requester's extension; returned for another users if their glip visibility is set to 'Visible' """ visibility: Optional[UpdateUnifiedPresenceResponseGlipVisibility] = None """ Visibility setting allowing other users to see the user's Glip presence status; returned only for requester's extension """ availability: Optional[UpdateUnifiedPresenceResponseGlipAvailability] = None """ Shows whether user wants to receive Glip notifications or not. """ class UpdateUnifiedPresenceResponseTelephonyStatus(Enum): """ Telephony status calculated from all user's phone numbers. Returned always for the requester's extension; returned for another users if their telephony visibility is set to 'Visible' Generated by Python OpenAPI Parser """ NoCall = 'NoCall' Ringing = 'Ringing' CallConnected = 'CallConnected' OnHold = 'OnHold' ParkedCall = 'ParkedCall' class UpdateUnifiedPresenceResponseTelephonyVisibility(Enum): """ Specifies if the user hardphone presence status is visible to other users; returned only for requester's extension Generated by Python OpenAPI Parser """ Visible = 'Visible' Invisible = 'Invisible' class UpdateUnifiedPresenceResponseTelephonyAvailability(Enum): """ Telephony DND status. Returned if *DND* feature is switched on """ TakeAllCalls = 'TakeAllCalls' DoNotAcceptAnyCalls = 'DoNotAcceptAnyCalls' DoNotAcceptQueueCalls = 'DoNotAcceptQueueCalls' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateUnifiedPresenceResponseTelephony(DataClassJsonMixin): """ Returned if *BLF* feature is switched on """ status: Optional[UpdateUnifiedPresenceResponseTelephonyStatus] = None """ Telephony status calculated from all user's phone numbers. Returned always for the requester's extension; returned for another users if their telephony visibility is set to 'Visible' """ visibility: Optional[UpdateUnifiedPresenceResponseTelephonyVisibility] = None """ Specifies if the user hardphone presence status is visible to other users; returned only for requester's extension """ availability: Optional[UpdateUnifiedPresenceResponseTelephonyAvailability] = None """ Telephony DND status. Returned if *DND* feature is switched on """ class UpdateUnifiedPresenceResponseMeetingStatus(Enum): """ Meeting status calculated from all user`s meetings """ NoMeeting = 'NoMeeting' InMeeting = 'InMeeting' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateUnifiedPresenceResponseMeeting(DataClassJsonMixin): """ Returned if *Meetings* feature is switched on """ status: Optional[UpdateUnifiedPresenceResponseMeetingStatus] = None """ Meeting status calculated from all user`s meetings """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateUnifiedPresenceResponse(DataClassJsonMixin): status: Optional[UpdateUnifiedPresenceResponseStatus] = None """ Aggregated presence status of the user """ glip: Optional[UpdateUnifiedPresenceResponseGlip] = None """ Returned if *Glip* feature is switched on """ telephony: Optional[UpdateUnifiedPresenceResponseTelephony] = None """ Returned if *BLF* feature is switched on """ meeting: Optional[UpdateUnifiedPresenceResponseMeeting] = None """ Returned if *Meetings* feature is switched on """ class ListMeetingsResponseRecordsItemMeetingType(Enum): Instant = 'Instant' Scheduled = 'Scheduled' ScheduledRecurring = 'ScheduledRecurring' Recurring = 'Recurring' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListMeetingsResponseRecordsItemLinks(DataClassJsonMixin): start_uri: Optional[str] = None join_uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListMeetingsResponseRecordsItemScheduleTimeZone(DataClassJsonMixin): uri: Optional[str] = None id: Optional[str] = None name: Optional[str] = None description: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListMeetingsResponseRecordsItemSchedule(DataClassJsonMixin): start_time: Optional[str] = None duration_in_minutes: Optional[int] = None time_zone: Optional[ListMeetingsResponseRecordsItemScheduleTimeZone] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListMeetingsResponseRecordsItemHost(DataClassJsonMixin): uri: Optional[str] = None """ Link to the meeting host resource """ id: Optional[str] = None """ Internal identifier of an extension which is assigned to be a meeting host. The default value is currently logged-in extension identifier """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListMeetingsResponseRecordsItemOccurrencesItem(DataClassJsonMixin): id: Optional[str] = None """ Identifier of a meeting occurrence """ start_time: Optional[str] = None """ Starting time of a meeting occurrence """ duration_in_minutes: Optional[int] = None """ Duration of a meeting occurrence """ status: Optional[str] = None """ Status of a meeting occurrence """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListMeetingsResponseRecordsItem(DataClassJsonMixin): uri: Optional[str] = None uuid: Optional[str] = None id: Optional[str] = None topic: Optional[str] = None meeting_type: Optional[ListMeetingsResponseRecordsItemMeetingType] = None password: Optional[str] = None h323_password: Optional[str] = None status: Optional[str] = None links: Optional[ListMeetingsResponseRecordsItemLinks] = None schedule: Optional[ListMeetingsResponseRecordsItemSchedule] = None host: Optional[ListMeetingsResponseRecordsItemHost] = None allow_join_before_host: Optional[bool] = False start_host_video: Optional[bool] = False start_participants_video: Optional[bool] = False audio_options: Optional[List[str]] = None occurrences: Optional[List[ListMeetingsResponseRecordsItemOccurrencesItem]] = None """ List of meeting occurrences """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListMeetingsResponsePaging(DataClassJsonMixin): page: Optional[int] = None total_pages: Optional[int] = None per_page: Optional[int] = None total_elements: Optional[int] = None page_start: Optional[int] = None page_end: Optional[int] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListMeetingsResponseNavigationNextPage(DataClassJsonMixin): uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListMeetingsResponseNavigationPreviousPage(DataClassJsonMixin): uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListMeetingsResponseNavigationFirstPage(DataClassJsonMixin): uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListMeetingsResponseNavigationLastPage(DataClassJsonMixin): uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListMeetingsResponseNavigation(DataClassJsonMixin): next_page: Optional[ListMeetingsResponseNavigationNextPage] = None previous_page: Optional[ListMeetingsResponseNavigationPreviousPage] = None first_page: Optional[ListMeetingsResponseNavigationFirstPage] = None last_page: Optional[ListMeetingsResponseNavigationLastPage] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListMeetingsResponse(DataClassJsonMixin): uri: Optional[str] = None records: Optional[List[ListMeetingsResponseRecordsItem]] = None paging: Optional[ListMeetingsResponsePaging] = None navigation: Optional[ListMeetingsResponseNavigation] = None class CreateMeetingRequestMeetingType(Enum): Instant = 'Instant' Scheduled = 'Scheduled' ScheduledRecurring = 'ScheduledRecurring' Recurring = 'Recurring' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateMeetingRequestScheduleTimeZone(DataClassJsonMixin): uri: Optional[str] = None id: Optional[str] = None name: Optional[str] = None description: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateMeetingRequestSchedule(DataClassJsonMixin): start_time: Optional[str] = None duration_in_minutes: Optional[int] = None time_zone: Optional[CreateMeetingRequestScheduleTimeZone] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateMeetingRequestHost(DataClassJsonMixin): uri: Optional[str] = None """ Link to the meeting host resource """ id: Optional[str] = None """ Internal identifier of an extension which is assigned to be a meeting host. The default value is currently logged-in extension identifier """ class CreateMeetingRequestRecurrenceFrequency(Enum): """ Recurrence time frame """ Daily = 'Daily' Weekly = 'Weekly' Monthly = 'Monthly' class CreateMeetingRequestRecurrenceMonthlyByWeek(Enum): """ Supported together with `weeklyByDay` """ Last = 'Last' First = 'First' Second = 'Second' Third = 'Third' Fourth = 'Fourth' class CreateMeetingRequestRecurrenceWeeklyByDay(Enum): Sunday = 'Sunday' Monday = 'Monday' Tuesday = 'Tuesday' Wednesday = 'Wednesday' Thursday = 'Thursday' Friday = 'Friday' Saturday = 'Saturday' class CreateMeetingRequestRecurrenceWeeklyByDays(Enum): """ Multiple values are supported, should be specified separated by comma """ Sunday = 'Sunday' Monday = 'Monday' Tuesday = 'Tuesday' Wednesday = 'Wednesday' Thursday = 'Thursday' Friday = 'Friday' Saturday = 'Saturday' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateMeetingRequestRecurrence(DataClassJsonMixin): """ Recurrence settings """ frequency: Optional[CreateMeetingRequestRecurrenceFrequency] = None """ Recurrence time frame """ interval: Optional[int] = None """ Reccurence interval. The supported ranges are: 1-90 for `Daily`; 1-12 for `Weekly`; 1-3 for `Monthly` """ monthly_by_week: Optional[CreateMeetingRequestRecurrenceMonthlyByWeek] = None """ Supported together with `weeklyByDay` """ weekly_by_day: Optional[CreateMeetingRequestRecurrenceWeeklyByDay] = None weekly_by_days: Optional[CreateMeetingRequestRecurrenceWeeklyByDays] = None """ Multiple values are supported, should be specified separated by comma """ monthly_by_day: Optional[int] = None """ The supported range is 1-31 """ count: Optional[int] = None """ Number of occurences """ until: Optional[str] = None """ Meeting expiration datetime """ class CreateMeetingRequestAutoRecordType(Enum): """ Automatic record type """ Local = 'local' Cloud = 'cloud' None_ = 'none' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateMeetingRequest(DataClassJsonMixin): topic: Optional[str] = None meeting_type: Optional[CreateMeetingRequestMeetingType] = None schedule: Optional[CreateMeetingRequestSchedule] = None password: Optional[str] = None host: Optional[CreateMeetingRequestHost] = None allow_join_before_host: Optional[bool] = False start_host_video: Optional[bool] = False start_participants_video: Optional[bool] = False use_personal_meeting_id: Optional[bool] = None audio_options: Optional[List[str]] = None recurrence: Optional[CreateMeetingRequestRecurrence] = None """ Recurrence settings """ auto_record_type: Optional[CreateMeetingRequestAutoRecordType] = 'local' """ Automatic record type """ class CreateMeetingResponseMeetingType(Enum): Instant = 'Instant' Scheduled = 'Scheduled' ScheduledRecurring = 'ScheduledRecurring' Recurring = 'Recurring' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateMeetingResponseLinks(DataClassJsonMixin): start_uri: Optional[str] = None join_uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateMeetingResponseScheduleTimeZone(DataClassJsonMixin): uri: Optional[str] = None id: Optional[str] = None name: Optional[str] = None description: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateMeetingResponseSchedule(DataClassJsonMixin): start_time: Optional[str] = None duration_in_minutes: Optional[int] = None time_zone: Optional[CreateMeetingResponseScheduleTimeZone] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateMeetingResponseHost(DataClassJsonMixin): uri: Optional[str] = None """ Link to the meeting host resource """ id: Optional[str] = None """ Internal identifier of an extension which is assigned to be a meeting host. The default value is currently logged-in extension identifier """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateMeetingResponseOccurrencesItem(DataClassJsonMixin): id: Optional[str] = None """ Identifier of a meeting occurrence """ start_time: Optional[str] = None """ Starting time of a meeting occurrence """ duration_in_minutes: Optional[int] = None """ Duration of a meeting occurrence """ status: Optional[str] = None """ Status of a meeting occurrence """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateMeetingResponse(DataClassJsonMixin): uri: Optional[str] = None uuid: Optional[str] = None id: Optional[str] = None topic: Optional[str] = None meeting_type: Optional[CreateMeetingResponseMeetingType] = None password: Optional[str] = None h323_password: Optional[str] = None status: Optional[str] = None links: Optional[CreateMeetingResponseLinks] = None schedule: Optional[CreateMeetingResponseSchedule] = None host: Optional[CreateMeetingResponseHost] = None allow_join_before_host: Optional[bool] = False start_host_video: Optional[bool] = False start_participants_video: Optional[bool] = False audio_options: Optional[List[str]] = None occurrences: Optional[List[CreateMeetingResponseOccurrencesItem]] = None """ List of meeting occurrences """ class GetUserSettingResponseRecordingAutoRecording(Enum): """ Automatical recording (local/cloud/none) of meetings as they start """ Local = 'local' Cloud = 'cloud' None_ = 'none' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetUserSettingResponseRecording(DataClassJsonMixin): local_recording: Optional[bool] = None """ Allows hosts and participants to record a meeting to a local file """ cloud_recording: Optional[bool] = None """ Allows hosts to record and save a meeting/webinar in the cloud """ record_speaker_view: Optional[bool] = False """ Allows to record active speaker with the shared screen """ record_gallery_view: Optional[bool] = False """ Allows to record gallery view with the shared screen """ record_audio_file: Optional[bool] = False """ Allows to record an audio-only file """ save_chat_text: Optional[bool] = False """ Allows to save chat text from a meeting """ show_timestamp: Optional[bool] = False """ Allows to show timestamp on video """ auto_recording: Optional[GetUserSettingResponseRecordingAutoRecording] = 'local' """ Automatical recording (local/cloud/none) of meetings as they start """ auto_delete_cmr: Optional[str] = False """ Automatical deletion of cloud recordings """ auto_delete_cmr_days: Optional[int] = None """ A specified number of days for automatical deletion of cloud recordings, the value range is 1-60 """ class GetUserSettingResponseScheduleMeetingAudioOptionsItem(Enum): Phone = 'Phone' ComputerAudio = 'ComputerAudio' class GetUserSettingResponseScheduleMeetingRequirePasswordForPmiMeetings(Enum): """ Specifies whether to require a password for meetings using Personal Meeting ID (PMI). The supported values are: 'none', 'all' and 'jbhOnly' (joined before host only) Generated by Python OpenAPI Parser """ All = 'all' None_ = 'none' JbhOnly = 'jbhOnly' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetUserSettingResponseScheduleMeeting(DataClassJsonMixin): """ Settings defining how to schedule user meetings """ start_host_video: Optional[bool] = None """ Starting meetings with host video on/off (true/false) """ start_participants_video: Optional[bool] = None """ Starting meetings with participant video on/off (true/false) """ audio_options: Optional[List[GetUserSettingResponseScheduleMeetingAudioOptionsItem]] = None """ Determines how participants can join the audio channel of a meeting """ allow_join_before_host: Optional[bool] = None """ Allows participants to join the meeting before the host arrives """ use_pmi_for_scheduled_meetings: Optional[bool] = None """ Determines whether to use Personal Meeting ID (PMI) when scheduling a meeting """ use_pmi_for_instant_meetings: Optional[bool] = None """ Determines whether to use Personal Meeting ID (PMI) when starting an instant meeting """ require_password_for_scheduling_new_meetings: Optional[bool] = None """ A password will be generated when scheduling a meeting and participants will require password to join a meeting. The Personal Meeting ID (PMI) meetings are not included """ require_password_for_scheduled_meetings: Optional[bool] = None """ Specifies whether to require a password for meetings which have already been scheduled """ default_password_for_scheduled_meetings: Optional[str] = None """ Password for already scheduled meetings. Users can set it individually """ require_password_for_instant_meetings: Optional[bool] = None """ A random password will be generated for an instant meeting, if set to 'True'. If you use PMI for your instant meetings, this option will be disabled """ require_password_for_pmi_meetings: Optional[GetUserSettingResponseScheduleMeetingRequirePasswordForPmiMeetings] = None """ Specifies whether to require a password for meetings using Personal Meeting ID (PMI). The supported values are: 'none', 'all' and 'jbhOnly' (joined before host only) """ pmi_password: Optional[str] = None """ The default password for Personal Meeting ID (PMI) meetings """ pstn_password_protected: Optional[bool] = None """ Specifies whether to generate and require a password for participants joining by phone """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetUserSettingResponse(DataClassJsonMixin): recording: Optional[GetUserSettingResponseRecording] = None schedule_meeting: Optional[GetUserSettingResponseScheduleMeeting] = None """ Settings defining how to schedule user meetings """ class GetAccountLockedSettingResponseScheduleMeetingAudioOptionsItem(Enum): Phone = 'Phone' ComputerAudio = 'ComputerAudio' class GetAccountLockedSettingResponseScheduleMeetingRequirePasswordForPmiMeetings(Enum): """ Specifies whether to require a password for meetings using Personal Meeting ID (PMI). The supported values are: 'none', 'all' and 'jbhOnly' (joined before host only) Generated by Python OpenAPI Parser """ All = 'all' None_ = 'none' JbhOnly = 'jbhOnly' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetAccountLockedSettingResponseScheduleMeeting(DataClassJsonMixin): """ Scheduling meeting settings locked on account level """ start_host_video: Optional[bool] = None """ Starting meetings with host video on/off (true/false) """ start_participants_video: Optional[bool] = None """ Starting meetings with participant video on/off (true/false) """ audio_options: Optional[List[GetAccountLockedSettingResponseScheduleMeetingAudioOptionsItem]] = None """ Determines how participants can join the audio channel of a meeting """ allow_join_before_host: Optional[bool] = None """ Allows participants to join the meeting before the host arrives """ use_pmi_for_scheduled_meetings: Optional[bool] = None """ Determines whether to use Personal Meeting ID (PMI) when scheduling a meeting """ use_pmi_for_instant_meetings: Optional[bool] = None """ Determines whether to use Personal Meeting ID (PMI) when starting an instant meeting """ require_password_for_scheduling_new_meetings: Optional[bool] = None """ A password will be generated when scheduling a meeting and participants will require password to join a meeting. The Personal Meeting ID (PMI) meetings are not included """ require_password_for_scheduled_meetings: Optional[bool] = None """ Specifies whether to require a password for meetings which have already been scheduled """ default_password_for_scheduled_meetings: Optional[str] = None """ Password for already scheduled meetings. Users can set it individually """ require_password_for_instant_meetings: Optional[bool] = None """ A random password will be generated for an instant meeting, if set to 'True'. If you use PMI for your instant meetings, this option will be disabled """ require_password_for_pmi_meetings: Optional[GetAccountLockedSettingResponseScheduleMeetingRequirePasswordForPmiMeetings] = None """ Specifies whether to require a password for meetings using Personal Meeting ID (PMI). The supported values are: 'none', 'all' and 'jbhOnly' (joined before host only) """ pmi_password: Optional[str] = None """ The default password for Personal Meeting ID (PMI) meetings """ pstn_password_protected: Optional[bool] = None """ Specifies whether to generate and require a password for participants joining by phone """ class GetAccountLockedSettingResponseRecordingAutoRecording(Enum): """ Automatical recording (local/cloud/none) of meetings as they start """ Local = 'local' Cloud = 'cloud' None_ = 'none' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetAccountLockedSettingResponseRecording(DataClassJsonMixin): """ Meeting recording settings locked on account level """ local_recording: Optional[bool] = None """ Allows hosts and participants to record a meeting to a local file """ cloud_recording: Optional[bool] = None """ Allows hosts to record and save a meeting/webinar in the cloud """ record_speaker_view: Optional[bool] = False """ Allows to record active speaker with the shared screen """ record_gallery_view: Optional[bool] = False """ Allows to record gallery view with the shared screen """ record_audio_file: Optional[bool] = False """ Allows to record an audio-only file """ save_chat_text: Optional[bool] = False """ Allows to save chat text from a meeting """ show_timestamp: Optional[bool] = False """ Allows to show timestamp on video """ auto_recording: Optional[GetAccountLockedSettingResponseRecordingAutoRecording] = 'local' """ Automatical recording (local/cloud/none) of meetings as they start """ auto_delete_cmr: Optional[str] = False """ Automatical deletion of cloud recordings """ auto_delete_cmr_days: Optional[int] = None """ A specified number of days for automatical deletion of cloud recordings, the value range is 1-60 """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class GetAccountLockedSettingResponse(DataClassJsonMixin): schedule_meeting: Optional[GetAccountLockedSettingResponseScheduleMeeting] = None """ Scheduling meeting settings locked on account level """ recording: Optional[GetAccountLockedSettingResponseRecording] = None """ Meeting recording settings locked on account level """ class ReadMeetingResponseMeetingType(Enum): Instant = 'Instant' Scheduled = 'Scheduled' ScheduledRecurring = 'ScheduledRecurring' Recurring = 'Recurring' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadMeetingResponseLinks(DataClassJsonMixin): start_uri: Optional[str] = None join_uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadMeetingResponseScheduleTimeZone(DataClassJsonMixin): uri: Optional[str] = None id: Optional[str] = None name: Optional[str] = None description: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadMeetingResponseSchedule(DataClassJsonMixin): start_time: Optional[str] = None duration_in_minutes: Optional[int] = None time_zone: Optional[ReadMeetingResponseScheduleTimeZone] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadMeetingResponseHost(DataClassJsonMixin): uri: Optional[str] = None """ Link to the meeting host resource """ id: Optional[str] = None """ Internal identifier of an extension which is assigned to be a meeting host. The default value is currently logged-in extension identifier """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadMeetingResponseOccurrencesItem(DataClassJsonMixin): id: Optional[str] = None """ Identifier of a meeting occurrence """ start_time: Optional[str] = None """ Starting time of a meeting occurrence """ duration_in_minutes: Optional[int] = None """ Duration of a meeting occurrence """ status: Optional[str] = None """ Status of a meeting occurrence """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadMeetingResponse(DataClassJsonMixin): uri: Optional[str] = None uuid: Optional[str] = None id: Optional[str] = None topic: Optional[str] = None meeting_type: Optional[ReadMeetingResponseMeetingType] = None password: Optional[str] = None h323_password: Optional[str] = None status: Optional[str] = None links: Optional[ReadMeetingResponseLinks] = None schedule: Optional[ReadMeetingResponseSchedule] = None host: Optional[ReadMeetingResponseHost] = None allow_join_before_host: Optional[bool] = False start_host_video: Optional[bool] = False start_participants_video: Optional[bool] = False audio_options: Optional[List[str]] = None occurrences: Optional[List[ReadMeetingResponseOccurrencesItem]] = None """ List of meeting occurrences """ class UpdateMeetingResponseMeetingType(Enum): Instant = 'Instant' Scheduled = 'Scheduled' ScheduledRecurring = 'ScheduledRecurring' Recurring = 'Recurring' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateMeetingResponseLinks(DataClassJsonMixin): start_uri: Optional[str] = None join_uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateMeetingResponseScheduleTimeZone(DataClassJsonMixin): uri: Optional[str] = None id: Optional[str] = None name: Optional[str] = None description: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateMeetingResponseSchedule(DataClassJsonMixin): start_time: Optional[str] = None duration_in_minutes: Optional[int] = None time_zone: Optional[UpdateMeetingResponseScheduleTimeZone] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateMeetingResponseHost(DataClassJsonMixin): uri: Optional[str] = None """ Link to the meeting host resource """ id: Optional[str] = None """ Internal identifier of an extension which is assigned to be a meeting host. The default value is currently logged-in extension identifier """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateMeetingResponseOccurrencesItem(DataClassJsonMixin): id: Optional[str] = None """ Identifier of a meeting occurrence """ start_time: Optional[str] = None """ Starting time of a meeting occurrence """ duration_in_minutes: Optional[int] = None """ Duration of a meeting occurrence """ status: Optional[str] = None """ Status of a meeting occurrence """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateMeetingResponse(DataClassJsonMixin): uri: Optional[str] = None uuid: Optional[str] = None id: Optional[str] = None topic: Optional[str] = None meeting_type: Optional[UpdateMeetingResponseMeetingType] = None password: Optional[str] = None h323_password: Optional[str] = None status: Optional[str] = None links: Optional[UpdateMeetingResponseLinks] = None schedule: Optional[UpdateMeetingResponseSchedule] = None host: Optional[UpdateMeetingResponseHost] = None allow_join_before_host: Optional[bool] = False start_host_video: Optional[bool] = False start_participants_video: Optional[bool] = False audio_options: Optional[List[str]] = None occurrences: Optional[List[UpdateMeetingResponseOccurrencesItem]] = None """ List of meeting occurrences """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadMeetingServiceInfoResponseExternalUserInfo(DataClassJsonMixin): uri: Optional[str] = None user_id: Optional[str] = None account_id: Optional[str] = None user_type: Optional[int] = None user_token: Optional[str] = None host_key: Optional[str] = None personal_meeting_id: Optional[str] = None personal_link: Optional[str] = None """ Link to the user's personal meeting room, used as an alias for personal meeting URL (with personal meeting ID) Example: `https://meetings.ringcentral.com/my/jsmith` """ use_pmi_for_instant_meetings: Optional[bool] = False """ Enables using personal meeting ID for instant meetings """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadMeetingServiceInfoResponseDialInNumbersItemCountry(DataClassJsonMixin): uri: Optional[str] = None id: Optional[str] = None name: Optional[str] = None iso_code: Optional[str] = None calling_code: Optional[str] = None emergency_calling: Optional[bool] = False number_selling: Optional[bool] = False login_allowed: Optional[bool] = False @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadMeetingServiceInfoResponseDialInNumbersItem(DataClassJsonMixin): phone_number: Optional[str] = None formatted_number: Optional[str] = None location: Optional[str] = None country: Optional[ReadMeetingServiceInfoResponseDialInNumbersItemCountry] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadMeetingServiceInfoResponse(DataClassJsonMixin): uri: Optional[str] = None support_uri: Optional[str] = None intl_dial_in_numbers_uri: Optional[str] = None external_user_info: Optional[ReadMeetingServiceInfoResponseExternalUserInfo] = None dial_in_numbers: Optional[List[ReadMeetingServiceInfoResponseDialInNumbersItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateMeetingServiceInfoRequestExternalUserInfo(DataClassJsonMixin): uri: Optional[str] = None user_id: Optional[str] = None account_id: Optional[str] = None user_type: Optional[int] = None user_token: Optional[str] = None host_key: Optional[str] = None personal_meeting_id: Optional[str] = None personal_link: Optional[str] = None """ Link to the user's personal meeting room, used as an alias for personal meeting URL (with personal meeting ID) Example: `https://meetings.ringcentral.com/my/jsmith` """ use_pmi_for_instant_meetings: Optional[bool] = False """ Enables using personal meeting ID for instant meetings """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateMeetingServiceInfoRequest(DataClassJsonMixin): external_user_info: Optional[UpdateMeetingServiceInfoRequestExternalUserInfo] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateMeetingServiceInfoResponseExternalUserInfo(DataClassJsonMixin): uri: Optional[str] = None user_id: Optional[str] = None account_id: Optional[str] = None user_type: Optional[int] = None user_token: Optional[str] = None host_key: Optional[str] = None personal_meeting_id: Optional[str] = None personal_link: Optional[str] = None """ Link to the user's personal meeting room, used as an alias for personal meeting URL (with personal meeting ID) Example: `https://meetings.ringcentral.com/my/jsmith` """ use_pmi_for_instant_meetings: Optional[bool] = False """ Enables using personal meeting ID for instant meetings """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateMeetingServiceInfoResponseDialInNumbersItemCountry(DataClassJsonMixin): uri: Optional[str] = None id: Optional[str] = None name: Optional[str] = None iso_code: Optional[str] = None calling_code: Optional[str] = None emergency_calling: Optional[bool] = False number_selling: Optional[bool] = False login_allowed: Optional[bool] = False @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateMeetingServiceInfoResponseDialInNumbersItem(DataClassJsonMixin): phone_number: Optional[str] = None formatted_number: Optional[str] = None location: Optional[str] = None country: Optional[UpdateMeetingServiceInfoResponseDialInNumbersItemCountry] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateMeetingServiceInfoResponse(DataClassJsonMixin): uri: Optional[str] = None support_uri: Optional[str] = None intl_dial_in_numbers_uri: Optional[str] = None external_user_info: Optional[UpdateMeetingServiceInfoResponseExternalUserInfo] = None dial_in_numbers: Optional[List[UpdateMeetingServiceInfoResponseDialInNumbersItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAssistantsResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None name: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAssistantsResponse(DataClassJsonMixin): records: Optional[List[ReadAssistantsResponseRecordsItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAssistedUsersResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None name: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAssistedUsersResponse(DataClassJsonMixin): records: Optional[List[ReadAssistedUsersResponseRecordsItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadMeetingInvitationResponse(DataClassJsonMixin): invitation: Optional[str] = None """ Meeting invitation """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListSubscriptionsResponseRecordsItemDisabledFiltersItem(DataClassJsonMixin): filter: Optional[str] = None """ Event filter that is disabled for the user """ reason: Optional[str] = None """ Reason why the filter is disabled for the user """ message: Optional[str] = None """ Error message """ class ListSubscriptionsResponseRecordsItemStatus(Enum): """ Subscription status """ Active = 'Active' Suspended = 'Suspended' Blacklisted = 'Blacklisted' class ListSubscriptionsResponseRecordsItemDeliveryModeTransportType(Enum): """ Notifications transportation provider name """ PubNub = 'PubNub' WebHook = 'WebHook' RC_APNS = 'RC/APNS' RC_GCM = 'RC/GCM' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListSubscriptionsResponseRecordsItemDeliveryMode(DataClassJsonMixin): """ Delivery mode data """ encryption: Optional[bool] = None """ Optional parameter. Specifies if the message will be encrypted or not """ address: Optional[str] = None """ PubNub channel name """ subscriber_key: Optional[str] = None """ PubNub subscriber credentials required to subscribe to the channel """ secret_key: Optional[str] = None """ PubNub subscriber credentials required to subscribe to the channel. Optional (for PubNub transport type only) """ encryption_algorithm: Optional[str] = None """ Encryption algorithm 'AES' (for PubNub transport type only) """ encryption_key: Optional[str] = None """ Key for notification message decryption (for PubNub transport type only) """ transport_type: Optional[ListSubscriptionsResponseRecordsItemDeliveryModeTransportType] = None """ Notifications transportation provider name """ certificate_name: Optional[str] = None """ Name of a certificate. Supported for 'RC/APNS' and 'RC/GCM' transport types """ registration_id: Optional[str] = None """ Identifier of a registration. Supported for 'RC/APNS' and 'RC/GCM' transport types """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListSubscriptionsResponseRecordsItemBlacklistedData(DataClassJsonMixin): """ Returned if WebHook subscription is blacklisted """ blacklisted_at: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Time of adding subscrition to a black list in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format including timezone, for example *2016-03-10T18:07:52.534Z* """ reason: Optional[str] = None """ Reason for adding subscrition to a black list """ class ListSubscriptionsResponseRecordsItemTransportType(Enum): """ Notifications transportation provider name """ PubNub = 'PubNub' WebHook = 'WebHook' RC_APNS = 'RC/APNS' RC_GCM = 'RC/GCM' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListSubscriptionsResponseRecordsItem(DataClassJsonMixin): """ Required Properties: - delivery_mode Generated by Python OpenAPI Parser """ delivery_mode: ListSubscriptionsResponseRecordsItemDeliveryMode """ Delivery mode data """ id: Optional[str] = None """ Internal identifier of a subscription """ uri: Optional[str] = None """ Canonical URI of a subscription """ event_filters: Optional[List[str]] = None """ Collection of API resources (message-store/presence/detailed presence) corresponding to events the user is subscribed to """ disabled_filters: Optional[List[ListSubscriptionsResponseRecordsItemDisabledFiltersItem]] = None """ Collection of API resources (message-store/presence/detailed presence) corresponding to events the user is not subscribed to due to certain limitations """ expiration_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Subscription expiration datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format including timezone, for example 2016-03-10T18:07:52.534Z """ expires_in: Optional[int] = 900 """ Subscription lifetime in seconds """ status: Optional[ListSubscriptionsResponseRecordsItemStatus] = None """ Subscription status """ creation_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Subscription creation datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format including timezone, for example 2016-03-10T18:07:52.534Z """ blacklisted_data: Optional[ListSubscriptionsResponseRecordsItemBlacklistedData] = None """ Returned if WebHook subscription is blacklisted """ transport_type: Optional[ListSubscriptionsResponseRecordsItemTransportType] = None """ Notifications transportation provider name """ certificate_name: Optional[str] = None """ Name of a certificate. Supported for 'RC/APNS' and 'RC/GCM' transport types """ registration_id: Optional[str] = None """ Identifier of a registration. Supported for 'RC/APNS' and 'RC/GCM' transport types """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListSubscriptionsResponse(DataClassJsonMixin): uri: Optional[str] = None records: Optional[List[ListSubscriptionsResponseRecordsItem]] = None class CreateSubscriptionRequestDeliveryModeTransportType(Enum): """ Notifications transportation provider name """ PubNub = 'PubNub' WebHook = 'WebHook' RC_APNS = 'RC/APNS' RC_GCM = 'RC/GCM' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSubscriptionRequestDeliveryMode(DataClassJsonMixin): """ Notification delivery settings """ transport_type: Optional[CreateSubscriptionRequestDeliveryModeTransportType] = None """ Notifications transportation provider name """ address: Optional[str] = None """ Mandatory for 'WebHook' transport type, URL of a consumer service (cannot be changed during subscription update) """ encryption: Optional[bool] = None """ Optional parameter. Specifies if the message will be encrypted or not. If request contains any presence event filter the value by default is 'True' (even if specified as 'false'). If request contains only message event filters the value by default is 'False' """ certificate_name: Optional[str] = None """ Name of a certificate. Supported for 'RC/APNS' and 'RC/GCM' transport types """ registration_id: Optional[str] = None """ Identifier of a registration. Supported for 'RC/APNS' and 'RC/GCM' transport types """ verification_token: Optional[str] = None """ Verification key of a subscription ensuring data security. Supported for 'Webhook' transport type """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSubscriptionRequest(DataClassJsonMixin): """ Required Properties: - delivery_mode - event_filters Generated by Python OpenAPI Parser """ event_filters: List[str] """ Collection of URIs to API resources """ delivery_mode: CreateSubscriptionRequestDeliveryMode """ Notification delivery settings """ expires_in: Optional[int] = 604800 """ Subscription lifetime in seconds. Max value is 7 days (604800 sec). For *WebHook* transport type max value might be set up to 630720000 seconds (20 years) """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSubscriptionResponseDisabledFiltersItem(DataClassJsonMixin): filter: Optional[str] = None """ Event filter that is disabled for the user """ reason: Optional[str] = None """ Reason why the filter is disabled for the user """ message: Optional[str] = None """ Error message """ class CreateSubscriptionResponseStatus(Enum): """ Subscription status """ Active = 'Active' Suspended = 'Suspended' Blacklisted = 'Blacklisted' class CreateSubscriptionResponseDeliveryModeTransportType(Enum): """ Notifications transportation provider name """ PubNub = 'PubNub' WebHook = 'WebHook' RC_APNS = 'RC/APNS' RC_GCM = 'RC/GCM' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSubscriptionResponseDeliveryMode(DataClassJsonMixin): """ Delivery mode data """ encryption: Optional[bool] = None """ Optional parameter. Specifies if the message will be encrypted or not """ address: Optional[str] = None """ PubNub channel name """ subscriber_key: Optional[str] = None """ PubNub subscriber credentials required to subscribe to the channel """ secret_key: Optional[str] = None """ PubNub subscriber credentials required to subscribe to the channel. Optional (for PubNub transport type only) """ encryption_algorithm: Optional[str] = None """ Encryption algorithm 'AES' (for PubNub transport type only) """ encryption_key: Optional[str] = None """ Key for notification message decryption (for PubNub transport type only) """ transport_type: Optional[CreateSubscriptionResponseDeliveryModeTransportType] = None """ Notifications transportation provider name """ certificate_name: Optional[str] = None """ Name of a certificate. Supported for 'RC/APNS' and 'RC/GCM' transport types """ registration_id: Optional[str] = None """ Identifier of a registration. Supported for 'RC/APNS' and 'RC/GCM' transport types """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSubscriptionResponseBlacklistedData(DataClassJsonMixin): """ Returned if WebHook subscription is blacklisted """ blacklisted_at: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Time of adding subscrition to a black list in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format including timezone, for example *2016-03-10T18:07:52.534Z* """ reason: Optional[str] = None """ Reason for adding subscrition to a black list """ class CreateSubscriptionResponseTransportType(Enum): """ Notifications transportation provider name """ PubNub = 'PubNub' WebHook = 'WebHook' RC_APNS = 'RC/APNS' RC_GCM = 'RC/GCM' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateSubscriptionResponse(DataClassJsonMixin): """ Required Properties: - delivery_mode Generated by Python OpenAPI Parser """ delivery_mode: CreateSubscriptionResponseDeliveryMode """ Delivery mode data """ id: Optional[str] = None """ Internal identifier of a subscription """ uri: Optional[str] = None """ Canonical URI of a subscription """ event_filters: Optional[List[str]] = None """ Collection of API resources (message-store/presence/detailed presence) corresponding to events the user is subscribed to """ disabled_filters: Optional[List[CreateSubscriptionResponseDisabledFiltersItem]] = None """ Collection of API resources (message-store/presence/detailed presence) corresponding to events the user is not subscribed to due to certain limitations """ expiration_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Subscription expiration datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format including timezone, for example 2016-03-10T18:07:52.534Z """ expires_in: Optional[int] = 900 """ Subscription lifetime in seconds """ status: Optional[CreateSubscriptionResponseStatus] = None """ Subscription status """ creation_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Subscription creation datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format including timezone, for example 2016-03-10T18:07:52.534Z """ blacklisted_data: Optional[CreateSubscriptionResponseBlacklistedData] = None """ Returned if WebHook subscription is blacklisted """ transport_type: Optional[CreateSubscriptionResponseTransportType] = None """ Notifications transportation provider name """ certificate_name: Optional[str] = None """ Name of a certificate. Supported for 'RC/APNS' and 'RC/GCM' transport types """ registration_id: Optional[str] = None """ Identifier of a registration. Supported for 'RC/APNS' and 'RC/GCM' transport types """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadSubscriptionResponseDisabledFiltersItem(DataClassJsonMixin): filter: Optional[str] = None """ Event filter that is disabled for the user """ reason: Optional[str] = None """ Reason why the filter is disabled for the user """ message: Optional[str] = None """ Error message """ class ReadSubscriptionResponseStatus(Enum): """ Subscription status """ Active = 'Active' Suspended = 'Suspended' Blacklisted = 'Blacklisted' class ReadSubscriptionResponseDeliveryModeTransportType(Enum): """ Notifications transportation provider name """ PubNub = 'PubNub' WebHook = 'WebHook' RC_APNS = 'RC/APNS' RC_GCM = 'RC/GCM' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadSubscriptionResponseDeliveryMode(DataClassJsonMixin): """ Delivery mode data """ encryption: Optional[bool] = None """ Optional parameter. Specifies if the message will be encrypted or not """ address: Optional[str] = None """ PubNub channel name """ subscriber_key: Optional[str] = None """ PubNub subscriber credentials required to subscribe to the channel """ secret_key: Optional[str] = None """ PubNub subscriber credentials required to subscribe to the channel. Optional (for PubNub transport type only) """ encryption_algorithm: Optional[str] = None """ Encryption algorithm 'AES' (for PubNub transport type only) """ encryption_key: Optional[str] = None """ Key for notification message decryption (for PubNub transport type only) """ transport_type: Optional[ReadSubscriptionResponseDeliveryModeTransportType] = None """ Notifications transportation provider name """ certificate_name: Optional[str] = None """ Name of a certificate. Supported for 'RC/APNS' and 'RC/GCM' transport types """ registration_id: Optional[str] = None """ Identifier of a registration. Supported for 'RC/APNS' and 'RC/GCM' transport types """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadSubscriptionResponseBlacklistedData(DataClassJsonMixin): """ Returned if WebHook subscription is blacklisted """ blacklisted_at: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Time of adding subscrition to a black list in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format including timezone, for example *2016-03-10T18:07:52.534Z* """ reason: Optional[str] = None """ Reason for adding subscrition to a black list """ class ReadSubscriptionResponseTransportType(Enum): """ Notifications transportation provider name """ PubNub = 'PubNub' WebHook = 'WebHook' RC_APNS = 'RC/APNS' RC_GCM = 'RC/GCM' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadSubscriptionResponse(DataClassJsonMixin): """ Required Properties: - delivery_mode Generated by Python OpenAPI Parser """ delivery_mode: ReadSubscriptionResponseDeliveryMode """ Delivery mode data """ id: Optional[str] = None """ Internal identifier of a subscription """ uri: Optional[str] = None """ Canonical URI of a subscription """ event_filters: Optional[List[str]] = None """ Collection of API resources (message-store/presence/detailed presence) corresponding to events the user is subscribed to """ disabled_filters: Optional[List[ReadSubscriptionResponseDisabledFiltersItem]] = None """ Collection of API resources (message-store/presence/detailed presence) corresponding to events the user is not subscribed to due to certain limitations """ expiration_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Subscription expiration datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format including timezone, for example 2016-03-10T18:07:52.534Z """ expires_in: Optional[int] = 900 """ Subscription lifetime in seconds """ status: Optional[ReadSubscriptionResponseStatus] = None """ Subscription status """ creation_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Subscription creation datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format including timezone, for example 2016-03-10T18:07:52.534Z """ blacklisted_data: Optional[ReadSubscriptionResponseBlacklistedData] = None """ Returned if WebHook subscription is blacklisted """ transport_type: Optional[ReadSubscriptionResponseTransportType] = None """ Notifications transportation provider name """ certificate_name: Optional[str] = None """ Name of a certificate. Supported for 'RC/APNS' and 'RC/GCM' transport types """ registration_id: Optional[str] = None """ Identifier of a registration. Supported for 'RC/APNS' and 'RC/GCM' transport types """ class UpdateSubscriptionRequestDeliveryModeTransportType(Enum): """ Notifications transportation provider name """ PubNub = 'PubNub' WebHook = 'WebHook' RC_APNS = 'RC/APNS' RC_GCM = 'RC/GCM' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateSubscriptionRequestDeliveryMode(DataClassJsonMixin): """ Notification delivery settings """ transport_type: Optional[UpdateSubscriptionRequestDeliveryModeTransportType] = None """ Notifications transportation provider name """ address: Optional[str] = None """ Mandatory for 'WebHook' transport type, URL of a consumer service (cannot be changed during subscription update) """ encryption: Optional[bool] = None """ Optional parameter. Specifies if the message will be encrypted or not. If request contains any presence event filter the value by default is 'True' (even if specified as 'false'). If request contains only message event filters the value by default is 'False' """ certificate_name: Optional[str] = None """ Name of a certificate. Supported for 'RC/APNS' and 'RC/GCM' transport types """ registration_id: Optional[str] = None """ Identifier of a registration. Supported for 'RC/APNS' and 'RC/GCM' transport types """ verification_token: Optional[str] = None """ Verification key of a subscription ensuring data security. Supported for 'Webhook' transport type """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateSubscriptionRequest(DataClassJsonMixin): """ Required Properties: - event_filters Generated by Python OpenAPI Parser """ event_filters: List[str] """ Collection of URIs to API resources """ delivery_mode: Optional[UpdateSubscriptionRequestDeliveryMode] = None """ Notification delivery settings """ expires_in: Optional[int] = 604800 """ Subscription lifetime in seconds. Max value is 7 days (604800 sec). For *WebHook* transport type max value might be set up to 630720000 seconds (20 years) """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateSubscriptionResponseDisabledFiltersItem(DataClassJsonMixin): filter: Optional[str] = None """ Event filter that is disabled for the user """ reason: Optional[str] = None """ Reason why the filter is disabled for the user """ message: Optional[str] = None """ Error message """ class UpdateSubscriptionResponseStatus(Enum): """ Subscription status """ Active = 'Active' Suspended = 'Suspended' Blacklisted = 'Blacklisted' class UpdateSubscriptionResponseDeliveryModeTransportType(Enum): """ Notifications transportation provider name """ PubNub = 'PubNub' WebHook = 'WebHook' RC_APNS = 'RC/APNS' RC_GCM = 'RC/GCM' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateSubscriptionResponseDeliveryMode(DataClassJsonMixin): """ Delivery mode data """ encryption: Optional[bool] = None """ Optional parameter. Specifies if the message will be encrypted or not """ address: Optional[str] = None """ PubNub channel name """ subscriber_key: Optional[str] = None """ PubNub subscriber credentials required to subscribe to the channel """ secret_key: Optional[str] = None """ PubNub subscriber credentials required to subscribe to the channel. Optional (for PubNub transport type only) """ encryption_algorithm: Optional[str] = None """ Encryption algorithm 'AES' (for PubNub transport type only) """ encryption_key: Optional[str] = None """ Key for notification message decryption (for PubNub transport type only) """ transport_type: Optional[UpdateSubscriptionResponseDeliveryModeTransportType] = None """ Notifications transportation provider name """ certificate_name: Optional[str] = None """ Name of a certificate. Supported for 'RC/APNS' and 'RC/GCM' transport types """ registration_id: Optional[str] = None """ Identifier of a registration. Supported for 'RC/APNS' and 'RC/GCM' transport types """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateSubscriptionResponseBlacklistedData(DataClassJsonMixin): """ Returned if WebHook subscription is blacklisted """ blacklisted_at: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Time of adding subscrition to a black list in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format including timezone, for example *2016-03-10T18:07:52.534Z* """ reason: Optional[str] = None """ Reason for adding subscrition to a black list """ class UpdateSubscriptionResponseTransportType(Enum): """ Notifications transportation provider name """ PubNub = 'PubNub' WebHook = 'WebHook' RC_APNS = 'RC/APNS' RC_GCM = 'RC/GCM' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateSubscriptionResponse(DataClassJsonMixin): """ Required Properties: - delivery_mode Generated by Python OpenAPI Parser """ delivery_mode: UpdateSubscriptionResponseDeliveryMode """ Delivery mode data """ id: Optional[str] = None """ Internal identifier of a subscription """ uri: Optional[str] = None """ Canonical URI of a subscription """ event_filters: Optional[List[str]] = None """ Collection of API resources (message-store/presence/detailed presence) corresponding to events the user is subscribed to """ disabled_filters: Optional[List[UpdateSubscriptionResponseDisabledFiltersItem]] = None """ Collection of API resources (message-store/presence/detailed presence) corresponding to events the user is not subscribed to due to certain limitations """ expiration_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Subscription expiration datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format including timezone, for example 2016-03-10T18:07:52.534Z """ expires_in: Optional[int] = 900 """ Subscription lifetime in seconds """ status: Optional[UpdateSubscriptionResponseStatus] = None """ Subscription status """ creation_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Subscription creation datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format including timezone, for example 2016-03-10T18:07:52.534Z """ blacklisted_data: Optional[UpdateSubscriptionResponseBlacklistedData] = None """ Returned if WebHook subscription is blacklisted """ transport_type: Optional[UpdateSubscriptionResponseTransportType] = None """ Notifications transportation provider name """ certificate_name: Optional[str] = None """ Name of a certificate. Supported for 'RC/APNS' and 'RC/GCM' transport types """ registration_id: Optional[str] = None """ Identifier of a registration. Supported for 'RC/APNS' and 'RC/GCM' transport types """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class RenewSubscriptionResponseDisabledFiltersItem(DataClassJsonMixin): filter: Optional[str] = None """ Event filter that is disabled for the user """ reason: Optional[str] = None """ Reason why the filter is disabled for the user """ message: Optional[str] = None """ Error message """ class RenewSubscriptionResponseStatus(Enum): """ Subscription status """ Active = 'Active' Suspended = 'Suspended' Blacklisted = 'Blacklisted' class RenewSubscriptionResponseDeliveryModeTransportType(Enum): """ Notifications transportation provider name """ PubNub = 'PubNub' WebHook = 'WebHook' RC_APNS = 'RC/APNS' RC_GCM = 'RC/GCM' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class RenewSubscriptionResponseDeliveryMode(DataClassJsonMixin): """ Delivery mode data """ encryption: Optional[bool] = None """ Optional parameter. Specifies if the message will be encrypted or not """ address: Optional[str] = None """ PubNub channel name """ subscriber_key: Optional[str] = None """ PubNub subscriber credentials required to subscribe to the channel """ secret_key: Optional[str] = None """ PubNub subscriber credentials required to subscribe to the channel. Optional (for PubNub transport type only) """ encryption_algorithm: Optional[str] = None """ Encryption algorithm 'AES' (for PubNub transport type only) """ encryption_key: Optional[str] = None """ Key for notification message decryption (for PubNub transport type only) """ transport_type: Optional[RenewSubscriptionResponseDeliveryModeTransportType] = None """ Notifications transportation provider name """ certificate_name: Optional[str] = None """ Name of a certificate. Supported for 'RC/APNS' and 'RC/GCM' transport types """ registration_id: Optional[str] = None """ Identifier of a registration. Supported for 'RC/APNS' and 'RC/GCM' transport types """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class RenewSubscriptionResponseBlacklistedData(DataClassJsonMixin): """ Returned if WebHook subscription is blacklisted """ blacklisted_at: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Time of adding subscrition to a black list in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format including timezone, for example *2016-03-10T18:07:52.534Z* """ reason: Optional[str] = None """ Reason for adding subscrition to a black list """ class RenewSubscriptionResponseTransportType(Enum): """ Notifications transportation provider name """ PubNub = 'PubNub' WebHook = 'WebHook' RC_APNS = 'RC/APNS' RC_GCM = 'RC/GCM' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class RenewSubscriptionResponse(DataClassJsonMixin): """ Required Properties: - delivery_mode Generated by Python OpenAPI Parser """ delivery_mode: RenewSubscriptionResponseDeliveryMode """ Delivery mode data """ id: Optional[str] = None """ Internal identifier of a subscription """ uri: Optional[str] = None """ Canonical URI of a subscription """ event_filters: Optional[List[str]] = None """ Collection of API resources (message-store/presence/detailed presence) corresponding to events the user is subscribed to """ disabled_filters: Optional[List[RenewSubscriptionResponseDisabledFiltersItem]] = None """ Collection of API resources (message-store/presence/detailed presence) corresponding to events the user is not subscribed to due to certain limitations """ expiration_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Subscription expiration datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format including timezone, for example 2016-03-10T18:07:52.534Z """ expires_in: Optional[int] = 900 """ Subscription lifetime in seconds """ status: Optional[RenewSubscriptionResponseStatus] = None """ Subscription status """ creation_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Subscription creation datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format including timezone, for example 2016-03-10T18:07:52.534Z """ blacklisted_data: Optional[RenewSubscriptionResponseBlacklistedData] = None """ Returned if WebHook subscription is blacklisted """ transport_type: Optional[RenewSubscriptionResponseTransportType] = None """ Notifications transportation provider name """ certificate_name: Optional[str] = None """ Name of a certificate. Supported for 'RC/APNS' and 'RC/GCM' transport types """ registration_id: Optional[str] = None """ Identifier of a registration. Supported for 'RC/APNS' and 'RC/GCM' transport types """ class ReadAuthorizationProfileResponsePermissionsItemPermissionSiteCompatible(Enum): """ Site compatibility flag set for permission """ Compatible = 'Compatible' Incompatible = 'Incompatible' Independent = 'Independent' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAuthorizationProfileResponsePermissionsItemPermission(DataClassJsonMixin): uri: Optional[str] = None id: Optional[str] = None site_compatible: Optional[ReadAuthorizationProfileResponsePermissionsItemPermissionSiteCompatible] = None """ Site compatibility flag set for permission """ read_only: Optional[bool] = None """ Specifies if the permission is editable on UI (if set to 'True') or not (if set to 'False') """ assignable: Optional[bool] = None """ Specifies if the permission can be assigned by the account administrator """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAuthorizationProfileResponsePermissionsItemEffectiveRole(DataClassJsonMixin): uri: Optional[str] = None id: Optional[str] = None class ReadAuthorizationProfileResponsePermissionsItemScopesItem(Enum): Account = 'Account' AllExtensions = 'AllExtensions' Federation = 'Federation' NonUserExtensions = 'NonUserExtensions' RoleBased = 'RoleBased' Self = 'Self' UserExtensions = 'UserExtensions' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAuthorizationProfileResponsePermissionsItem(DataClassJsonMixin): permission: Optional[ReadAuthorizationProfileResponsePermissionsItemPermission] = None effective_role: Optional[ReadAuthorizationProfileResponsePermissionsItemEffectiveRole] = None scopes: Optional[List[ReadAuthorizationProfileResponsePermissionsItemScopesItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadAuthorizationProfileResponse(DataClassJsonMixin): uri: Optional[str] = None permissions: Optional[List[ReadAuthorizationProfileResponsePermissionsItem]] = None class CheckUserPermissionResponseDetailsPermissionSiteCompatible(Enum): """ Site compatibility flag set for permission """ Compatible = 'Compatible' Incompatible = 'Incompatible' Independent = 'Independent' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CheckUserPermissionResponseDetailsPermission(DataClassJsonMixin): uri: Optional[str] = None id: Optional[str] = None site_compatible: Optional[CheckUserPermissionResponseDetailsPermissionSiteCompatible] = None """ Site compatibility flag set for permission """ read_only: Optional[bool] = None """ Specifies if the permission is editable on UI (if set to 'True') or not (if set to 'False') """ assignable: Optional[bool] = None """ Specifies if the permission can be assigned by the account administrator """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CheckUserPermissionResponseDetailsEffectiveRole(DataClassJsonMixin): uri: Optional[str] = None id: Optional[str] = None class CheckUserPermissionResponseDetailsScopesItem(Enum): Account = 'Account' AllExtensions = 'AllExtensions' Federation = 'Federation' NonUserExtensions = 'NonUserExtensions' RoleBased = 'RoleBased' Self = 'Self' UserExtensions = 'UserExtensions' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CheckUserPermissionResponseDetails(DataClassJsonMixin): permission: Optional[CheckUserPermissionResponseDetailsPermission] = None effective_role: Optional[CheckUserPermissionResponseDetailsEffectiveRole] = None scopes: Optional[List[CheckUserPermissionResponseDetailsScopesItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CheckUserPermissionResponse(DataClassJsonMixin): uri: Optional[str] = None successful: Optional[bool] = False details: Optional[CheckUserPermissionResponseDetails] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserBusinessHoursResponseScheduleWeeklyRangesMondayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserBusinessHoursResponseScheduleWeeklyRangesTuesdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserBusinessHoursResponseScheduleWeeklyRangesWednesdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserBusinessHoursResponseScheduleWeeklyRangesThursdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserBusinessHoursResponseScheduleWeeklyRangesFridayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserBusinessHoursResponseScheduleWeeklyRangesSaturdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserBusinessHoursResponseScheduleWeeklyRangesSundayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserBusinessHoursResponseScheduleWeeklyRanges(DataClassJsonMixin): """ Weekly schedule """ monday: Optional[List[ReadUserBusinessHoursResponseScheduleWeeklyRangesMondayItem]] = None """ Time intervals for a particular day """ tuesday: Optional[List[ReadUserBusinessHoursResponseScheduleWeeklyRangesTuesdayItem]] = None """ Time intervals for a particular day """ wednesday: Optional[List[ReadUserBusinessHoursResponseScheduleWeeklyRangesWednesdayItem]] = None """ Time intervals for a particular day """ thursday: Optional[List[ReadUserBusinessHoursResponseScheduleWeeklyRangesThursdayItem]] = None """ Time intervals for a particular day """ friday: Optional[List[ReadUserBusinessHoursResponseScheduleWeeklyRangesFridayItem]] = None """ Time intervals for a particular day """ saturday: Optional[List[ReadUserBusinessHoursResponseScheduleWeeklyRangesSaturdayItem]] = None """ Time intervals for a particular day """ sunday: Optional[List[ReadUserBusinessHoursResponseScheduleWeeklyRangesSundayItem]] = None """ Time intervals for a particular day """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserBusinessHoursResponseSchedule(DataClassJsonMixin): """ Schedule when an answering rule is applied """ weekly_ranges: Optional[ReadUserBusinessHoursResponseScheduleWeeklyRanges] = None """ Weekly schedule """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserBusinessHoursResponse(DataClassJsonMixin): """ Example: ```json { "uri": "https.../restapi/v1.0/account/401800045008/extension/401800045008/business-hours", "schedule": { "weeklyRanges": { "wednesday": [ { "from": "09:00", "to": "18:00" } ], "friday": [ { "from": "09:00", "to": "18:00" } ], "tuesday": [ { "from": "09:00", "to": "18:00" } ], "monday": [ { "from": "09:00", "to": "18:00" } ], "thursday": [ { "from": "09:00", "to": "18:00" } ] } } } ``` Generated by Python OpenAPI Parser """ uri: Optional[str] = None """ Canonical URI of a business-hours resource """ schedule: Optional[ReadUserBusinessHoursResponseSchedule] = None """ Schedule when an answering rule is applied """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateUserBusinessHoursRequestScheduleWeeklyRangesMondayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateUserBusinessHoursRequestScheduleWeeklyRangesTuesdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateUserBusinessHoursRequestScheduleWeeklyRangesWednesdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateUserBusinessHoursRequestScheduleWeeklyRangesThursdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateUserBusinessHoursRequestScheduleWeeklyRangesFridayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateUserBusinessHoursRequestScheduleWeeklyRangesSaturdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateUserBusinessHoursRequestScheduleWeeklyRangesSundayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateUserBusinessHoursRequestScheduleWeeklyRanges(DataClassJsonMixin): """ Weekly schedule """ monday: Optional[List[UpdateUserBusinessHoursRequestScheduleWeeklyRangesMondayItem]] = None """ Time intervals for a particular day """ tuesday: Optional[List[UpdateUserBusinessHoursRequestScheduleWeeklyRangesTuesdayItem]] = None """ Time intervals for a particular day """ wednesday: Optional[List[UpdateUserBusinessHoursRequestScheduleWeeklyRangesWednesdayItem]] = None """ Time intervals for a particular day """ thursday: Optional[List[UpdateUserBusinessHoursRequestScheduleWeeklyRangesThursdayItem]] = None """ Time intervals for a particular day """ friday: Optional[List[UpdateUserBusinessHoursRequestScheduleWeeklyRangesFridayItem]] = None """ Time intervals for a particular day """ saturday: Optional[List[UpdateUserBusinessHoursRequestScheduleWeeklyRangesSaturdayItem]] = None """ Time intervals for a particular day """ sunday: Optional[List[UpdateUserBusinessHoursRequestScheduleWeeklyRangesSundayItem]] = None """ Time intervals for a particular day """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateUserBusinessHoursRequestSchedule(DataClassJsonMixin): """ Schedule when an answering rule is applied """ weekly_ranges: Optional[UpdateUserBusinessHoursRequestScheduleWeeklyRanges] = None """ Weekly schedule """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateUserBusinessHoursRequest(DataClassJsonMixin): schedule: Optional[UpdateUserBusinessHoursRequestSchedule] = None """ Schedule when an answering rule is applied """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateUserBusinessHoursResponseScheduleWeeklyRangesMondayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateUserBusinessHoursResponseScheduleWeeklyRangesTuesdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateUserBusinessHoursResponseScheduleWeeklyRangesWednesdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateUserBusinessHoursResponseScheduleWeeklyRangesThursdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateUserBusinessHoursResponseScheduleWeeklyRangesFridayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateUserBusinessHoursResponseScheduleWeeklyRangesSaturdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateUserBusinessHoursResponseScheduleWeeklyRangesSundayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateUserBusinessHoursResponseScheduleWeeklyRanges(DataClassJsonMixin): """ Weekly schedule """ monday: Optional[List[UpdateUserBusinessHoursResponseScheduleWeeklyRangesMondayItem]] = None """ Time intervals for a particular day """ tuesday: Optional[List[UpdateUserBusinessHoursResponseScheduleWeeklyRangesTuesdayItem]] = None """ Time intervals for a particular day """ wednesday: Optional[List[UpdateUserBusinessHoursResponseScheduleWeeklyRangesWednesdayItem]] = None """ Time intervals for a particular day """ thursday: Optional[List[UpdateUserBusinessHoursResponseScheduleWeeklyRangesThursdayItem]] = None """ Time intervals for a particular day """ friday: Optional[List[UpdateUserBusinessHoursResponseScheduleWeeklyRangesFridayItem]] = None """ Time intervals for a particular day """ saturday: Optional[List[UpdateUserBusinessHoursResponseScheduleWeeklyRangesSaturdayItem]] = None """ Time intervals for a particular day """ sunday: Optional[List[UpdateUserBusinessHoursResponseScheduleWeeklyRangesSundayItem]] = None """ Time intervals for a particular day """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateUserBusinessHoursResponseSchedule(DataClassJsonMixin): """ Schedule when an answering rule is applied """ weekly_ranges: Optional[UpdateUserBusinessHoursResponseScheduleWeeklyRanges] = None """ Weekly schedule """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateUserBusinessHoursResponse(DataClassJsonMixin): uri: Optional[str] = None """ Canonical URI of a business-hours resource """ schedule: Optional[UpdateUserBusinessHoursResponseSchedule] = None """ Schedule when an answering rule is applied """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadCompanyBusinessHoursResponseScheduleWeeklyRangesMondayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadCompanyBusinessHoursResponseScheduleWeeklyRangesTuesdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadCompanyBusinessHoursResponseScheduleWeeklyRangesWednesdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadCompanyBusinessHoursResponseScheduleWeeklyRangesThursdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadCompanyBusinessHoursResponseScheduleWeeklyRangesFridayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadCompanyBusinessHoursResponseScheduleWeeklyRangesSaturdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadCompanyBusinessHoursResponseScheduleWeeklyRangesSundayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadCompanyBusinessHoursResponseScheduleWeeklyRanges(DataClassJsonMixin): monday: Optional[List[ReadCompanyBusinessHoursResponseScheduleWeeklyRangesMondayItem]] = None """ Time intervals for a particular day """ tuesday: Optional[List[ReadCompanyBusinessHoursResponseScheduleWeeklyRangesTuesdayItem]] = None """ Time intervals for a particular day """ wednesday: Optional[List[ReadCompanyBusinessHoursResponseScheduleWeeklyRangesWednesdayItem]] = None """ Time intervals for a particular day """ thursday: Optional[List[ReadCompanyBusinessHoursResponseScheduleWeeklyRangesThursdayItem]] = None """ Time intervals for a particular day """ friday: Optional[List[ReadCompanyBusinessHoursResponseScheduleWeeklyRangesFridayItem]] = None """ Time intervals for a particular day """ saturday: Optional[List[ReadCompanyBusinessHoursResponseScheduleWeeklyRangesSaturdayItem]] = None """ Time intervals for a particular day """ sunday: Optional[List[ReadCompanyBusinessHoursResponseScheduleWeeklyRangesSundayItem]] = None """ Time intervals for a particular day """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadCompanyBusinessHoursResponseSchedule(DataClassJsonMixin): """ Schedule when an answering rule is applied """ weekly_ranges: Optional[ReadCompanyBusinessHoursResponseScheduleWeeklyRanges] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadCompanyBusinessHoursResponse(DataClassJsonMixin): """ Example: ```json { "uri": "https.../restapi/v1.0/account/401800045008/business-hours", "schedule": { "weeklyRanges": { "wednesday": [ { "from": "09:00", "to": "18:00" } ], "friday": [ { "from": "09:00", "to": "18:00" } ], "tuesday": [ { "from": "09:00", "to": "18:00" } ], "monday": [ { "from": "09:00", "to": "18:00" } ], "thursday": [ { "from": "09:00", "to": "18:00" } ] } } } ``` Generated by Python OpenAPI Parser """ uri: Optional[str] = None """ Canonical URI of a business-hours resource """ schedule: Optional[ReadCompanyBusinessHoursResponseSchedule] = None """ Schedule when an answering rule is applied """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyBusinessHoursRequestScheduleWeeklyRangesMondayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyBusinessHoursRequestScheduleWeeklyRangesTuesdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyBusinessHoursRequestScheduleWeeklyRangesWednesdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyBusinessHoursRequestScheduleWeeklyRangesThursdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyBusinessHoursRequestScheduleWeeklyRangesFridayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyBusinessHoursRequestScheduleWeeklyRangesSaturdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyBusinessHoursRequestScheduleWeeklyRangesSundayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyBusinessHoursRequestScheduleWeeklyRanges(DataClassJsonMixin): monday: Optional[List[UpdateCompanyBusinessHoursRequestScheduleWeeklyRangesMondayItem]] = None """ Time intervals for a particular day """ tuesday: Optional[List[UpdateCompanyBusinessHoursRequestScheduleWeeklyRangesTuesdayItem]] = None """ Time intervals for a particular day """ wednesday: Optional[List[UpdateCompanyBusinessHoursRequestScheduleWeeklyRangesWednesdayItem]] = None """ Time intervals for a particular day """ thursday: Optional[List[UpdateCompanyBusinessHoursRequestScheduleWeeklyRangesThursdayItem]] = None """ Time intervals for a particular day """ friday: Optional[List[UpdateCompanyBusinessHoursRequestScheduleWeeklyRangesFridayItem]] = None """ Time intervals for a particular day """ saturday: Optional[List[UpdateCompanyBusinessHoursRequestScheduleWeeklyRangesSaturdayItem]] = None """ Time intervals for a particular day """ sunday: Optional[List[UpdateCompanyBusinessHoursRequestScheduleWeeklyRangesSundayItem]] = None """ Time intervals for a particular day """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyBusinessHoursRequestSchedule(DataClassJsonMixin): """ Schedule when an answering rule is applied """ weekly_ranges: Optional[UpdateCompanyBusinessHoursRequestScheduleWeeklyRanges] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyBusinessHoursRequest(DataClassJsonMixin): """ Example: ```json { "schedule": { "weeklyRanges": { "tuesday": [ { "from": "09:00", "to": "18:00" } ], "friday": [ { "from": "09:00", "to": "18:00" } ], "thursday": [ { "from": "09:00", "to": "18:00" } ], "wednesday": [ { "from": "09:00", "to": "18:00" } ], "monday": [ { "from": "09:00", "to": "18:00" } ] } } } ``` Generated by Python OpenAPI Parser """ schedule: Optional[UpdateCompanyBusinessHoursRequestSchedule] = None """ Schedule when an answering rule is applied """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyBusinessHoursResponseScheduleWeeklyRangesMondayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyBusinessHoursResponseScheduleWeeklyRangesTuesdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyBusinessHoursResponseScheduleWeeklyRangesWednesdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyBusinessHoursResponseScheduleWeeklyRangesThursdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyBusinessHoursResponseScheduleWeeklyRangesFridayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyBusinessHoursResponseScheduleWeeklyRangesSaturdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyBusinessHoursResponseScheduleWeeklyRangesSundayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyBusinessHoursResponseScheduleWeeklyRanges(DataClassJsonMixin): monday: Optional[List[UpdateCompanyBusinessHoursResponseScheduleWeeklyRangesMondayItem]] = None """ Time intervals for a particular day """ tuesday: Optional[List[UpdateCompanyBusinessHoursResponseScheduleWeeklyRangesTuesdayItem]] = None """ Time intervals for a particular day """ wednesday: Optional[List[UpdateCompanyBusinessHoursResponseScheduleWeeklyRangesWednesdayItem]] = None """ Time intervals for a particular day """ thursday: Optional[List[UpdateCompanyBusinessHoursResponseScheduleWeeklyRangesThursdayItem]] = None """ Time intervals for a particular day """ friday: Optional[List[UpdateCompanyBusinessHoursResponseScheduleWeeklyRangesFridayItem]] = None """ Time intervals for a particular day """ saturday: Optional[List[UpdateCompanyBusinessHoursResponseScheduleWeeklyRangesSaturdayItem]] = None """ Time intervals for a particular day """ sunday: Optional[List[UpdateCompanyBusinessHoursResponseScheduleWeeklyRangesSundayItem]] = None """ Time intervals for a particular day """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyBusinessHoursResponseSchedule(DataClassJsonMixin): """ Schedule when an answering rule is applied """ weekly_ranges: Optional[UpdateCompanyBusinessHoursResponseScheduleWeeklyRanges] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCompanyBusinessHoursResponse(DataClassJsonMixin): """ Example: ```json { "uri": "https.../restapi/v1.0/account/401800045008/business-hours", "schedule": { "weeklyRanges": { "wednesday": [ { "from": "09:00", "to": "18:00" } ], "friday": [ { "from": "09:00", "to": "18:00" } ], "tuesday": [ { "from": "09:00", "to": "18:00" } ], "monday": [ { "from": "09:00", "to": "18:00" } ], "thursday": [ { "from": "09:00", "to": "18:00" } ] } } } ``` Generated by Python OpenAPI Parser """ uri: Optional[str] = None """ Canonical URI of a business-hours resource """ schedule: Optional[UpdateCompanyBusinessHoursResponseSchedule] = None """ Schedule when an answering rule is applied """ class ReadCallerBlockingSettingsResponseMode(Enum): """ Call blocking options: either specific or all calls and faxes """ Specific = 'Specific' All = 'All' class ReadCallerBlockingSettingsResponseNoCallerId(Enum): """ Determines how to handle calls with no caller ID in 'Specific' mode """ BlockCallsAndFaxes = 'BlockCallsAndFaxes' BlockFaxes = 'BlockFaxes' Allow = 'Allow' class ReadCallerBlockingSettingsResponsePayPhones(Enum): """ Blocking settings for pay phones """ Block = 'Block' Allow = 'Allow' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadCallerBlockingSettingsResponseGreetingsItemPreset(DataClassJsonMixin): uri: Optional[str] = None """ Link to a greeting resource """ id: Optional[str] = None """ Internal identifier of a greeting """ name: Optional[str] = None """ Name of a greeting """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadCallerBlockingSettingsResponseGreetingsItem(DataClassJsonMixin): type: Optional[str] = None """ Type of a greeting """ preset: Optional[ReadCallerBlockingSettingsResponseGreetingsItemPreset] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadCallerBlockingSettingsResponse(DataClassJsonMixin): """ Returns the lists of blocked and allowed phone numbers """ mode: Optional[ReadCallerBlockingSettingsResponseMode] = None """ Call blocking options: either specific or all calls and faxes """ no_caller_id: Optional[ReadCallerBlockingSettingsResponseNoCallerId] = None """ Determines how to handle calls with no caller ID in 'Specific' mode """ pay_phones: Optional[ReadCallerBlockingSettingsResponsePayPhones] = None """ Blocking settings for pay phones """ greetings: Optional[List[ReadCallerBlockingSettingsResponseGreetingsItem]] = None """ List of greetings played for blocked callers """ class UpdateCallerBlockingSettingsRequestMode(Enum): """ Call blocking options: either specific or all calls and faxes """ Specific = 'Specific' All = 'All' class UpdateCallerBlockingSettingsRequestNoCallerId(Enum): """ Determines how to handle calls with no caller ID in 'Specific' mode """ BlockCallsAndFaxes = 'BlockCallsAndFaxes' BlockFaxes = 'BlockFaxes' Allow = 'Allow' class UpdateCallerBlockingSettingsRequestPayPhones(Enum): """ Blocking settings for pay phones """ Block = 'Block' Allow = 'Allow' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCallerBlockingSettingsRequestGreetingsItemPreset(DataClassJsonMixin): uri: Optional[str] = None """ Link to a greeting resource """ id: Optional[str] = None """ Internal identifier of a greeting """ name: Optional[str] = None """ Name of a greeting """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCallerBlockingSettingsRequestGreetingsItem(DataClassJsonMixin): type: Optional[str] = None """ Type of a greeting """ preset: Optional[UpdateCallerBlockingSettingsRequestGreetingsItemPreset] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCallerBlockingSettingsRequest(DataClassJsonMixin): """ Returns the lists of blocked and allowed phone numbers """ mode: Optional[UpdateCallerBlockingSettingsRequestMode] = None """ Call blocking options: either specific or all calls and faxes """ no_caller_id: Optional[UpdateCallerBlockingSettingsRequestNoCallerId] = None """ Determines how to handle calls with no caller ID in 'Specific' mode """ pay_phones: Optional[UpdateCallerBlockingSettingsRequestPayPhones] = None """ Blocking settings for pay phones """ greetings: Optional[List[UpdateCallerBlockingSettingsRequestGreetingsItem]] = None """ List of greetings played for blocked callers """ class UpdateCallerBlockingSettingsResponseMode(Enum): """ Call blocking options: either specific or all calls and faxes """ Specific = 'Specific' All = 'All' class UpdateCallerBlockingSettingsResponseNoCallerId(Enum): """ Determines how to handle calls with no caller ID in 'Specific' mode """ BlockCallsAndFaxes = 'BlockCallsAndFaxes' BlockFaxes = 'BlockFaxes' Allow = 'Allow' class UpdateCallerBlockingSettingsResponsePayPhones(Enum): """ Blocking settings for pay phones """ Block = 'Block' Allow = 'Allow' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCallerBlockingSettingsResponseGreetingsItemPreset(DataClassJsonMixin): uri: Optional[str] = None """ Link to a greeting resource """ id: Optional[str] = None """ Internal identifier of a greeting """ name: Optional[str] = None """ Name of a greeting """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCallerBlockingSettingsResponseGreetingsItem(DataClassJsonMixin): type: Optional[str] = None """ Type of a greeting """ preset: Optional[UpdateCallerBlockingSettingsResponseGreetingsItemPreset] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateCallerBlockingSettingsResponse(DataClassJsonMixin): """ Returns the lists of blocked and allowed phone numbers """ mode: Optional[UpdateCallerBlockingSettingsResponseMode] = None """ Call blocking options: either specific or all calls and faxes """ no_caller_id: Optional[UpdateCallerBlockingSettingsResponseNoCallerId] = None """ Determines how to handle calls with no caller ID in 'Specific' mode """ pay_phones: Optional[UpdateCallerBlockingSettingsResponsePayPhones] = None """ Blocking settings for pay phones """ greetings: Optional[List[UpdateCallerBlockingSettingsResponseGreetingsItem]] = None """ List of greetings played for blocked callers """ class ListBlockedAllowedNumbersStatus(Enum): Blocked = 'Blocked' Allowed = 'Allowed' class ListBlockedAllowedNumbersResponseRecordsItemStatus(Enum): """ Status of a phone number """ Blocked = 'Blocked' Allowed = 'Allowed' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListBlockedAllowedNumbersResponseRecordsItem(DataClassJsonMixin): """ Information on a blocked/allowed phone number """ uri: Optional[str] = None """ Link to a blocked/allowed phone number """ id: Optional[str] = None """ Internal identifier of a blocked/allowed phone number """ phone_number: Optional[str] = None """ A blocked/allowed phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) format """ label: Optional[str] = None """ Custom name of a blocked/allowed phone number """ status: Optional[ListBlockedAllowedNumbersResponseRecordsItemStatus] = None """ Status of a phone number """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListBlockedAllowedNumbersResponseNavigationFirstPage(DataClassJsonMixin): """ Canonical URI for the first page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListBlockedAllowedNumbersResponseNavigationNextPage(DataClassJsonMixin): """ Canonical URI for the next page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListBlockedAllowedNumbersResponseNavigationPreviousPage(DataClassJsonMixin): """ Canonical URI for the previous page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListBlockedAllowedNumbersResponseNavigationLastPage(DataClassJsonMixin): """ Canonical URI for the last page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListBlockedAllowedNumbersResponseNavigation(DataClassJsonMixin): """ Information on navigation """ first_page: Optional[ListBlockedAllowedNumbersResponseNavigationFirstPage] = None """ Canonical URI for the first page of the list """ next_page: Optional[ListBlockedAllowedNumbersResponseNavigationNextPage] = None """ Canonical URI for the next page of the list """ previous_page: Optional[ListBlockedAllowedNumbersResponseNavigationPreviousPage] = None """ Canonical URI for the previous page of the list """ last_page: Optional[ListBlockedAllowedNumbersResponseNavigationLastPage] = None """ Canonical URI for the last page of the list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListBlockedAllowedNumbersResponsePaging(DataClassJsonMixin): """ Information on paging """ page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) """ per_page: Optional[int] = None """ Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty """ total_pages: Optional[int] = None """ The total number of pages in a dataset. May be omitted for some resources due to performance reasons """ total_elements: Optional[int] = None """ The total number of elements in a dataset. May be omitted for some resource due to performance reasons """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListBlockedAllowedNumbersResponse(DataClassJsonMixin): """ List of blocked or allowed phone numbers """ uri: Optional[str] = None """ Link to a list of blocked/allowed phone numbers resource """ records: Optional[List[ListBlockedAllowedNumbersResponseRecordsItem]] = None navigation: Optional[ListBlockedAllowedNumbersResponseNavigation] = None """ Information on navigation """ paging: Optional[ListBlockedAllowedNumbersResponsePaging] = None """ Information on paging """ class CreateBlockedAllowedNumberRequestStatus(Enum): """ Status of a phone number """ Blocked = 'Blocked' Allowed = 'Allowed' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateBlockedAllowedNumberRequest(DataClassJsonMixin): """ Updates either blocked or allowed phone number list with a new phone number. """ phone_number: Optional[str] = None """ A blocked/allowed phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) format """ label: Optional[str] = None """ Custom name of a blocked/allowed phone number """ status: Optional[CreateBlockedAllowedNumberRequestStatus] = 'Blocked' """ Status of a phone number """ class CreateBlockedAllowedNumberResponseStatus(Enum): """ Status of a phone number """ Blocked = 'Blocked' Allowed = 'Allowed' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateBlockedAllowedNumberResponse(DataClassJsonMixin): """ Information on a blocked/allowed phone number """ uri: Optional[str] = None """ Link to a blocked/allowed phone number """ id: Optional[str] = None """ Internal identifier of a blocked/allowed phone number """ phone_number: Optional[str] = None """ A blocked/allowed phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) format """ label: Optional[str] = None """ Custom name of a blocked/allowed phone number """ status: Optional[CreateBlockedAllowedNumberResponseStatus] = None """ Status of a phone number """ class ReadBlockedAllowedNumberResponseStatus(Enum): """ Status of a phone number """ Blocked = 'Blocked' Allowed = 'Allowed' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadBlockedAllowedNumberResponse(DataClassJsonMixin): """ Information on a blocked/allowed phone number """ uri: Optional[str] = None """ Link to a blocked/allowed phone number """ id: Optional[str] = None """ Internal identifier of a blocked/allowed phone number """ phone_number: Optional[str] = None """ A blocked/allowed phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) format """ label: Optional[str] = None """ Custom name of a blocked/allowed phone number """ status: Optional[ReadBlockedAllowedNumberResponseStatus] = None """ Status of a phone number """ class UpdateBlockedAllowedNumberRequestStatus(Enum): """ Status of a phone number """ Blocked = 'Blocked' Allowed = 'Allowed' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateBlockedAllowedNumberRequest(DataClassJsonMixin): """ Updates either blocked or allowed phone number list with a new phone number. """ phone_number: Optional[str] = None """ A blocked/allowed phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) format """ label: Optional[str] = None """ Custom name of a blocked/allowed phone number """ status: Optional[UpdateBlockedAllowedNumberRequestStatus] = 'Blocked' """ Status of a phone number """ class UpdateBlockedAllowedNumberResponseStatus(Enum): """ Status of a phone number """ Blocked = 'Blocked' Allowed = 'Allowed' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateBlockedAllowedNumberResponse(DataClassJsonMixin): """ Information on a blocked/allowed phone number """ uri: Optional[str] = None """ Link to a blocked/allowed phone number """ id: Optional[str] = None """ Internal identifier of a blocked/allowed phone number """ phone_number: Optional[str] = None """ A blocked/allowed phone number in [E.164](https://www.itu.int/rec/T-REC-E.164-201011-I) format """ label: Optional[str] = None """ Custom name of a blocked/allowed phone number """ status: Optional[UpdateBlockedAllowedNumberResponseStatus] = None """ Status of a phone number """ class ListForwardingNumbersResponseRecordsItemLabel(Enum): """ Forwarding/Call flip number title """ Business_Mobile_Phone = 'Business Mobile Phone' class ListForwardingNumbersResponseRecordsItemFeaturesItem(Enum): CallFlip = 'CallFlip' CallForwarding = 'CallForwarding' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListForwardingNumbersResponseRecordsItemDevice(DataClassJsonMixin): """ Forwarding device information """ id: Optional[str] = None """ Internal identifier of the other extension device """ class ListForwardingNumbersResponseRecordsItemType(Enum): """ Forwarding phone number type """ Home = 'Home' Mobile = 'Mobile' Work = 'Work' PhoneLine = 'PhoneLine' Outage = 'Outage' Other = 'Other' BusinessMobilePhone = 'BusinessMobilePhone' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListForwardingNumbersResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a forwarding/call flip phone number """ uri: Optional[str] = None """ Canonical URI of a forwarding/call flip phone number """ phone_number: Optional[str] = None """ Forwarding/Call flip phone number """ label: Optional[ListForwardingNumbersResponseRecordsItemLabel] = None """ Forwarding/Call flip number title """ features: Optional[List[ListForwardingNumbersResponseRecordsItemFeaturesItem]] = None """ Type of option this phone number is used for. Multiple values are accepted """ flip_number: Optional[str] = None """ Number assigned to the call flip phone number, corresponds to the shortcut dial number """ device: Optional[ListForwardingNumbersResponseRecordsItemDevice] = None """ Forwarding device information """ type: Optional[ListForwardingNumbersResponseRecordsItemType] = None """ Forwarding phone number type """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListForwardingNumbersResponseNavigationFirstPage(DataClassJsonMixin): """ Canonical URI for the first page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListForwardingNumbersResponseNavigationNextPage(DataClassJsonMixin): """ Canonical URI for the next page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListForwardingNumbersResponseNavigationPreviousPage(DataClassJsonMixin): """ Canonical URI for the previous page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListForwardingNumbersResponseNavigationLastPage(DataClassJsonMixin): """ Canonical URI for the last page of the list """ uri: Optional[str] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListForwardingNumbersResponseNavigation(DataClassJsonMixin): """ Information on navigation """ first_page: Optional[ListForwardingNumbersResponseNavigationFirstPage] = None """ Canonical URI for the first page of the list """ next_page: Optional[ListForwardingNumbersResponseNavigationNextPage] = None """ Canonical URI for the next page of the list """ previous_page: Optional[ListForwardingNumbersResponseNavigationPreviousPage] = None """ Canonical URI for the previous page of the list """ last_page: Optional[ListForwardingNumbersResponseNavigationLastPage] = None """ Canonical URI for the last page of the list """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListForwardingNumbersResponsePaging(DataClassJsonMixin): """ Information on paging """ page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) """ per_page: Optional[int] = None """ Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty """ total_pages: Optional[int] = None """ The total number of pages in a dataset. May be omitted for some resources due to performance reasons """ total_elements: Optional[int] = None """ The total number of elements in a dataset. May be omitted for some resource due to performance reasons """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListForwardingNumbersResponse(DataClassJsonMixin): uri: Optional[str] = None """ Link to the forwarding number list resource """ records: Optional[List[ListForwardingNumbersResponseRecordsItem]] = None """ List of forwarding phone numbers """ navigation: Optional[ListForwardingNumbersResponseNavigation] = None """ Information on navigation """ paging: Optional[ListForwardingNumbersResponsePaging] = None """ Information on paging """ class CreateForwardingNumberRequestType(Enum): """ Forwarding/Call flip phone type. If specified, 'label' attribute value is ignored. The default value is 'Other' Generated by Python OpenAPI Parser """ PhoneLine = 'PhoneLine' Home = 'Home' Mobile = 'Mobile' Work = 'Work' Other = 'Other' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateForwardingNumberRequestDevice(DataClassJsonMixin): """ Reference to the other extension device. Applicable for 'PhoneLine' type only. Cannot be specified together with 'phoneNumber' parameter. Generated by Python OpenAPI Parser """ id: Optional[str] = None """ Internal identifier of the other extension device """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateForwardingNumberRequest(DataClassJsonMixin): flip_number: Optional[int] = None """ Number assigned to the call flip phone number, corresponds to the shortcut dial number """ phone_number: Optional[str] = None """ Forwarding/Call flip phone number """ label: Optional[str] = None """ Forwarding/Call flip number title """ type: Optional[CreateForwardingNumberRequestType] = None """ Forwarding/Call flip phone type. If specified, 'label' attribute value is ignored. The default value is 'Other' """ device: Optional[CreateForwardingNumberRequestDevice] = None """ Reference to the other extension device. Applicable for 'PhoneLine' type only. Cannot be specified together with 'phoneNumber' parameter. """ class CreateForwardingNumberResponseLabel(Enum): """ Forwarding/Call flip number title """ Business_Mobile_Phone = 'Business Mobile Phone' class CreateForwardingNumberResponseFeaturesItem(Enum): CallFlip = 'CallFlip' CallForwarding = 'CallForwarding' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateForwardingNumberResponseDevice(DataClassJsonMixin): """ Forwarding device information """ id: Optional[str] = None """ Internal identifier of the other extension device """ class CreateForwardingNumberResponseType(Enum): """ Forwarding phone number type """ Home = 'Home' Mobile = 'Mobile' Work = 'Work' PhoneLine = 'PhoneLine' Outage = 'Outage' Other = 'Other' BusinessMobilePhone = 'BusinessMobilePhone' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateForwardingNumberResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a forwarding/call flip phone number """ uri: Optional[str] = None """ Canonical URI of a forwarding/call flip phone number """ phone_number: Optional[str] = None """ Forwarding/Call flip phone number """ label: Optional[CreateForwardingNumberResponseLabel] = None """ Forwarding/Call flip number title """ features: Optional[List[CreateForwardingNumberResponseFeaturesItem]] = None """ Type of option this phone number is used for. Multiple values are accepted """ flip_number: Optional[str] = None """ Number assigned to the call flip phone number, corresponds to the shortcut dial number """ device: Optional[CreateForwardingNumberResponseDevice] = None """ Forwarding device information """ type: Optional[CreateForwardingNumberResponseType] = None """ Forwarding phone number type """ class ReadForwardingNumberResponseLabel(Enum): """ Forwarding/Call flip number title """ Business_Mobile_Phone = 'Business Mobile Phone' class ReadForwardingNumberResponseFeaturesItem(Enum): CallFlip = 'CallFlip' CallForwarding = 'CallForwarding' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadForwardingNumberResponseDevice(DataClassJsonMixin): """ Forwarding device information """ id: Optional[str] = None """ Internal identifier of the other extension device """ class ReadForwardingNumberResponseType(Enum): """ Forwarding phone number type """ Home = 'Home' Mobile = 'Mobile' Work = 'Work' PhoneLine = 'PhoneLine' Outage = 'Outage' Other = 'Other' BusinessMobilePhone = 'BusinessMobilePhone' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadForwardingNumberResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a forwarding/call flip phone number """ uri: Optional[str] = None """ Canonical URI of a forwarding/call flip phone number """ phone_number: Optional[str] = None """ Forwarding/Call flip phone number """ label: Optional[ReadForwardingNumberResponseLabel] = None """ Forwarding/Call flip number title """ features: Optional[List[ReadForwardingNumberResponseFeaturesItem]] = None """ Type of option this phone number is used for. Multiple values are accepted """ flip_number: Optional[str] = None """ Number assigned to the call flip phone number, corresponds to the shortcut dial number """ device: Optional[ReadForwardingNumberResponseDevice] = None """ Forwarding device information """ type: Optional[ReadForwardingNumberResponseType] = None """ Forwarding phone number type """ class UpdateForwardingNumberRequestLabel(Enum): """ Forwarding/Call flip number title """ Business_Mobile_Phone = 'Business Mobile Phone' class UpdateForwardingNumberRequestType(Enum): """ Forwarding phone number type """ Home = 'Home' Mobile = 'Mobile' Work = 'Work' PhoneLine = 'PhoneLine' Outage = 'Outage' Other = 'Other' BusinessMobilePhone = 'BusinessMobilePhone' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateForwardingNumberRequest(DataClassJsonMixin): phone_number: Optional[str] = None """ Forwarding/Call flip phone number """ label: Optional[UpdateForwardingNumberRequestLabel] = None """ Forwarding/Call flip number title """ flip_number: Optional[str] = None """ Number assigned to the call flip phone number, corresponds to the shortcut dial number """ type: Optional[UpdateForwardingNumberRequestType] = None """ Forwarding phone number type """ class UpdateForwardingNumberResponseLabel(Enum): """ Forwarding/Call flip number title """ Business_Mobile_Phone = 'Business Mobile Phone' class UpdateForwardingNumberResponseFeaturesItem(Enum): CallFlip = 'CallFlip' CallForwarding = 'CallForwarding' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateForwardingNumberResponseDevice(DataClassJsonMixin): """ Forwarding device information """ id: Optional[str] = None """ Internal identifier of the other extension device """ class UpdateForwardingNumberResponseType(Enum): """ Forwarding phone number type """ Home = 'Home' Mobile = 'Mobile' Work = 'Work' PhoneLine = 'PhoneLine' Outage = 'Outage' Other = 'Other' BusinessMobilePhone = 'BusinessMobilePhone' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateForwardingNumberResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a forwarding/call flip phone number """ uri: Optional[str] = None """ Canonical URI of a forwarding/call flip phone number """ phone_number: Optional[str] = None """ Forwarding/Call flip phone number """ label: Optional[UpdateForwardingNumberResponseLabel] = None """ Forwarding/Call flip number title """ features: Optional[List[UpdateForwardingNumberResponseFeaturesItem]] = None """ Type of option this phone number is used for. Multiple values are accepted """ flip_number: Optional[str] = None """ Number assigned to the call flip phone number, corresponds to the shortcut dial number """ device: Optional[UpdateForwardingNumberResponseDevice] = None """ Forwarding device information """ type: Optional[UpdateForwardingNumberResponseType] = None """ Forwarding phone number type """ class ListAnsweringRulesView(Enum): Detailed = 'Detailed' Simple = 'Simple' class ListAnsweringRulesResponseRecordsItemType(Enum): """ Type of an answering rule """ BusinessHours = 'BusinessHours' AfterHours = 'AfterHours' Custom = 'Custom' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAnsweringRulesResponseRecordsItemSharedLines(DataClassJsonMixin): """ SharedLines call handling action settings """ timeout: Optional[int] = None """ Number of seconds to wait before forwarding unanswered calls. The value range is 10 - 80 """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAnsweringRulesResponseRecordsItem(DataClassJsonMixin): uri: Optional[str] = None """ Canonical URI to an answering rule resource Example: `https://platform.ringcentral.com/restapi/v1.0/account/240913004/extension/240972004/answering-rule/business-hours-rule` """ id: Optional[str] = None """ Internal identifier of an asnwering rule Example: `business-hours-rule` """ type: Optional[ListAnsweringRulesResponseRecordsItemType] = None """ Type of an answering rule """ name: Optional[str] = None """ Name of an answering rule specified by user """ enabled: Optional[bool] = None """ Specifies if an answering rule is active or inactive """ shared_lines: Optional[ListAnsweringRulesResponseRecordsItemSharedLines] = None """ SharedLines call handling action settings """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAnsweringRulesResponsePaging(DataClassJsonMixin): page: Optional[int] = None """ The current page number. 1-indexed, so the first page is 1 by default. May be omitted if result is empty (because non-existent page was specified or perPage=0 was requested) Example: `1` """ total_pages: Optional[int] = None """ The total number of pages in a dataset. Example: `1` """ per_page: Optional[int] = None """ Current page size, describes how many items are in each page. Default value is 100. Maximum value is 1000. If perPage value in the request is greater than 1000, the maximum value (1000) is applied Example: `100` """ total_elements: Optional[int] = None """ The total number of elements in a dataset. Example: `1` """ page_start: Optional[int] = None """ The zero-based number of the first element on the current page. Omitted if the page is omitted or result is empty Example: `0` """ page_end: Optional[int] = None """ The zero-based index of the last element on the current page. Omitted if the page is omitted or result is empty Example: `0` """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAnsweringRulesResponseNavigationFirstPage(DataClassJsonMixin): uri: Optional[str] = None """ Example: `https://platform.ringcentral.com/restapi/v1.0/account/240913004/extension/240972004/answering-rule?page=1&perPage=100` """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAnsweringRulesResponseNavigationNextPage(DataClassJsonMixin): uri: Optional[str] = None """ Example: `https://platform.ringcentral.com/restapi/v1.0/account/240913004/extension/240972004/answering-rule?page=1&perPage=100` """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAnsweringRulesResponseNavigationPreviousPage(DataClassJsonMixin): uri: Optional[str] = None """ Example: `https://platform.ringcentral.com/restapi/v1.0/account/240913004/extension/240972004/answering-rule?page=1&perPage=100` """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAnsweringRulesResponseNavigationLastPage(DataClassJsonMixin): uri: Optional[str] = None """ Example: `https://platform.ringcentral.com/restapi/v1.0/account/240913004/extension/240972004/answering-rule?page=1&perPage=100` """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAnsweringRulesResponseNavigation(DataClassJsonMixin): first_page: Optional[ListAnsweringRulesResponseNavigationFirstPage] = None next_page: Optional[ListAnsweringRulesResponseNavigationNextPage] = None previous_page: Optional[ListAnsweringRulesResponseNavigationPreviousPage] = None last_page: Optional[ListAnsweringRulesResponseNavigationLastPage] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListAnsweringRulesResponse(DataClassJsonMixin): uri: Optional[str] = None """ Canonical URI of an answering rule list resource Example: `https://platform.ringcentral.com/restapi/v1.0/account/240913004/extension/240972004/answering-rule?page=1&perPage=100` """ records: Optional[List[ListAnsweringRulesResponseRecordsItem]] = None """ List of answering rules """ paging: Optional[ListAnsweringRulesResponsePaging] = None navigation: Optional[ListAnsweringRulesResponseNavigation] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleRequestCallersItem(DataClassJsonMixin): caller_id: Optional[str] = None """ Phone number of a caller """ name: Optional[str] = None """ Contact name of a caller """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleRequestCalledNumbersItem(DataClassJsonMixin): phone_number: Optional[str] = None """ Called phone number """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleRequestScheduleWeeklyRangesMondayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleRequestScheduleWeeklyRangesTuesdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleRequestScheduleWeeklyRangesWednesdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleRequestScheduleWeeklyRangesThursdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleRequestScheduleWeeklyRangesFridayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleRequestScheduleWeeklyRangesSaturdayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleRequestScheduleWeeklyRangesSundayItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Time in format hh:mm """ to: Optional[str] = None """ Time in format hh:mm """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleRequestScheduleWeeklyRanges(DataClassJsonMixin): """ Weekly schedule """ monday: Optional[List[CreateAnsweringRuleRequestScheduleWeeklyRangesMondayItem]] = None """ Time intervals for a particular day """ tuesday: Optional[List[CreateAnsweringRuleRequestScheduleWeeklyRangesTuesdayItem]] = None """ Time intervals for a particular day """ wednesday: Optional[List[CreateAnsweringRuleRequestScheduleWeeklyRangesWednesdayItem]] = None """ Time intervals for a particular day """ thursday: Optional[List[CreateAnsweringRuleRequestScheduleWeeklyRangesThursdayItem]] = None """ Time intervals for a particular day """ friday: Optional[List[CreateAnsweringRuleRequestScheduleWeeklyRangesFridayItem]] = None """ Time intervals for a particular day """ saturday: Optional[List[CreateAnsweringRuleRequestScheduleWeeklyRangesSaturdayItem]] = None """ Time intervals for a particular day """ sunday: Optional[List[CreateAnsweringRuleRequestScheduleWeeklyRangesSundayItem]] = None """ Time intervals for a particular day """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleRequestScheduleRangesItem(DataClassJsonMixin): from_: Optional[str] = field(metadata=config(field_name='from'), default=None) """ Starting datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), for example *2018-10-29T14:00:00*, *2018-10-29T14:00:00Z*, *2018-10-29T14:00:00+0100* """ to: Optional[str] = None """ Ending datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), for example *2018-10-29T14:00:00*, *2018-10-29T14:00:00Z*, *2018-10-29T14:00:00+0100* """ class CreateAnsweringRuleRequestScheduleRef(Enum): """ The user's schedule specified for business hours or after hours; it can also be set/retrieved calling the corresponding method Generated by Python OpenAPI Parser """ BusinessHours = 'BusinessHours' AfterHours = 'AfterHours' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleRequestSchedule(DataClassJsonMixin): """ Schedule when an answering rule should be applied """ weekly_ranges: Optional[CreateAnsweringRuleRequestScheduleWeeklyRanges] = None """ Weekly schedule """ ranges: Optional[List[CreateAnsweringRuleRequestScheduleRangesItem]] = None """ Specific data ranges """ ref: Optional[CreateAnsweringRuleRequestScheduleRef] = None """ The user's schedule specified for business hours or after hours; it can also be set/retrieved calling the corresponding method """ class CreateAnsweringRuleRequestCallHandlingAction(Enum): """ Specifies how incoming calls are forwarded """ ForwardCalls = 'ForwardCalls' UnconditionalForwarding = 'UnconditionalForwarding' AgentQueue = 'AgentQueue' TransferToExtension = 'TransferToExtension' TakeMessagesOnly = 'TakeMessagesOnly' PlayAnnouncementOnly = 'PlayAnnouncementOnly' SharedLines = 'SharedLines' class CreateAnsweringRuleRequestForwardingRingingMode(Enum): """ Specifies the order in which forwarding numbers ring. 'Sequentially' means that forwarding numbers are ringing one at a time, in order of priority. 'Simultaneously' means that forwarding numbers are ring all at the same time Generated by Python OpenAPI Parser """ Sequentially = 'Sequentially' Simultaneously = 'Simultaneously' class CreateAnsweringRuleRequestForwardingRulesItemForwardingNumbersItemLabel(Enum): """ Forwarding/Call flip number title """ Business_Mobile_Phone = 'Business Mobile Phone' class CreateAnsweringRuleRequestForwardingRulesItemForwardingNumbersItemType(Enum): """ Type of a forwarding number """ Home = 'Home' Mobile = 'Mobile' Work = 'Work' PhoneLine = 'PhoneLine' Outage = 'Outage' Other = 'Other' BusinessMobilePhone = 'BusinessMobilePhone' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleRequestForwardingRulesItemForwardingNumbersItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a forwarding number """ uri: Optional[str] = None """ Canonical URI of a forwarding/call flip phone number """ phone_number: Optional[str] = None """ Forwarding/Call flip phone number """ label: Optional[CreateAnsweringRuleRequestForwardingRulesItemForwardingNumbersItemLabel] = None """ Forwarding/Call flip number title """ type: Optional[CreateAnsweringRuleRequestForwardingRulesItemForwardingNumbersItemType] = None """ Type of a forwarding number """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleRequestForwardingRulesItem(DataClassJsonMixin): index: Optional[int] = None """ Forwarding number (or group) ordinal """ ring_count: Optional[int] = None """ Number of rings for a forwarding number (or group) """ enabled: Optional[bool] = None """ Forwarding number status. Returned only if `showInactiveNumbers` is set to `true` """ forwarding_numbers: Optional[List[CreateAnsweringRuleRequestForwardingRulesItemForwardingNumbersItem]] = None """ Forwarding number (or group) data """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleRequestForwarding(DataClassJsonMixin): """ Forwarding parameters. Returned if 'ForwardCalls' is specified in 'callHandlingAction'. These settings determine the forwarding numbers to which the call will be forwarded Generated by Python OpenAPI Parser """ notify_my_soft_phones: Optional[bool] = None """ Specifies if the user's softphone(s) are notified before forwarding the incoming call to desk phones and forwarding numbers """ notify_admin_soft_phones: Optional[bool] = None """ Specifies if the administrator's softphone is notified before forwarding the incoming call to desk phones and forwarding numbers. The default value is 'False' """ soft_phones_ring_count: Optional[int] = None """ Number of rings before forwarding starts """ ringing_mode: Optional[CreateAnsweringRuleRequestForwardingRingingMode] = None """ Specifies the order in which forwarding numbers ring. 'Sequentially' means that forwarding numbers are ringing one at a time, in order of priority. 'Simultaneously' means that forwarding numbers are ring all at the same time """ rules: Optional[List[CreateAnsweringRuleRequestForwardingRulesItem]] = None """ Information on a call forwarding rule """ mobile_timeout: Optional[bool] = None """ Specifies if mobile timeout is activated for the rule """ class CreateAnsweringRuleRequestUnconditionalForwardingAction(Enum): """ Event that initiates forwarding to the specified phone number """ HoldTimeExpiration = 'HoldTimeExpiration' MaxCallers = 'MaxCallers' NoAnswer = 'NoAnswer' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleRequestUnconditionalForwarding(DataClassJsonMixin): """ Unconditional forwarding parameters. Returned if 'UnconditionalForwarding' is specified in 'callHandlingAction' Generated by Python OpenAPI Parser """ phone_number: Optional[str] = None """ Phone number to which the call is forwarded. In addition to common e.164 format, the following number patterns are supported: 11xxxxxxxxxxx, 444xxxxxxxxxxx, 616xxxxxxxxxxx; where xxxxxxxxxxx is a phone number in e.164 format (without '+' sign) """ action: Optional[CreateAnsweringRuleRequestUnconditionalForwardingAction] = None """ Event that initiates forwarding to the specified phone number """ class CreateAnsweringRuleRequestQueueTransferMode(Enum): """ Specifies how calls are transferred to group members """ Rotating = 'Rotating' Simultaneous = 'Simultaneous' FixedOrder = 'FixedOrder' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleRequestQueueTransferItemExtension(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an extension the call is transferred to """ name: Optional[str] = None """ Extension name """ extension_number: Optional[str] = None """ Extension number """ class CreateAnsweringRuleRequestQueueTransferItemAction(Enum): """ Event that initiates transferring to the specified extension """ HoldTimeExpiration = 'HoldTimeExpiration' MaxCallers = 'MaxCallers' NoAnswer = 'NoAnswer' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleRequestQueueTransferItem(DataClassJsonMixin): extension: Optional[CreateAnsweringRuleRequestQueueTransferItemExtension] = None action: Optional[CreateAnsweringRuleRequestQueueTransferItemAction] = None """ Event that initiates transferring to the specified extension """ class CreateAnsweringRuleRequestQueueNoAnswerAction(Enum): """ Specifies the type of action to be taken if: members are available but no one answers, or all members are busy/unavailable. This option is available for Business hours only. For simultaneous transfer mode only 'WaitPrimaryMembers' and 'WaitPrimaryAndOverflowMembers' are supported Generated by Python OpenAPI Parser """ WaitPrimaryMembers = 'WaitPrimaryMembers' WaitPrimaryAndOverflowMembers = 'WaitPrimaryAndOverflowMembers' Voicemail = 'Voicemail' TransferToExtension = 'TransferToExtension' UnconditionalForwarding = 'UnconditionalForwarding' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateAnsweringRuleRequestQueueFixedOrderAgentsItemExtension(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an extension """ uri: Optional[str] = None """ Canonical URI of an extension """ extension_number: Optional[str] = None """ Number of department extension """
/ringcentral_async_client-1.0.3-py3-none-any.whl/ringcentral_async_client/_code_gen/model/_9.py
0.755186
0.296861
_9.py
pypi
from ._7 import * class ReadGlipPostResponseMentionsItemType(Enum): """ Type of mentions """ Person = 'Person' Team = 'Team' File = 'File' Link = 'Link' Event = 'Event' Task = 'Task' Note = 'Note' Card = 'Card' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadGlipPostResponseMentionsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a user """ type: Optional[ReadGlipPostResponseMentionsItemType] = None """ Type of mentions """ name: Optional[str] = None """ Name of a user """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadGlipPostResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a post """ group_id: Optional[str] = None """ Internal identifier of a group a post belongs to """ type: Optional[ReadGlipPostResponseType] = None """ Type of a post """ text: Optional[str] = None """ For 'TextMessage' post type only. Text of a message """ creator_id: Optional[str] = None """ Internal identifier of a user - author of a post """ added_person_ids: Optional[List[str]] = None """ For 'PersonsAdded' post type only. Identifiers of persons added to a group """ creation_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Post creation datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format """ last_modified_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Post last modification datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format """ attachments: Optional[List[ReadGlipPostResponseAttachmentsItem]] = None """ List of posted attachments """ mentions: Optional[List[ReadGlipPostResponseMentionsItem]] = None activity: Optional[str] = None """ Label of activity type """ title: Optional[str] = None """ Title of a message. (Can be set for bot's messages only) """ icon_uri: Optional[str] = None """ Link to an image used as an icon for this message """ icon_emoji: Optional[str] = None """ Emoji used as an icon for this message """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class PatchGlipPostRequest(DataClassJsonMixin): text: Optional[str] = None """ Post text. """ class PatchGlipPostResponseType(Enum): """ Type of a post """ TextMessage = 'TextMessage' PersonJoined = 'PersonJoined' PersonsAdded = 'PersonsAdded' class PatchGlipPostResponseAttachmentsItemType(Enum): """ Type of an attachment """ Card = 'Card' Event = 'Event' Note = 'Note' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class PatchGlipPostResponseAttachmentsItemAuthor(DataClassJsonMixin): """ Information about the author """ name: Optional[str] = None """ Name of a message author """ uri: Optional[str] = None """ Link to an author's name """ icon_uri: Optional[str] = None """ Link to an image displayed to the left of an author's name; sized 82x82px """ class PatchGlipPostResponseAttachmentsItemFieldsItemStyle(Enum): """ Style of width span applied to a field """ Short = 'Short' Long = 'Long' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class PatchGlipPostResponseAttachmentsItemFieldsItem(DataClassJsonMixin): title: Optional[str] = None """ Title of an individual field """ value: Optional[str] = None """ Value of an individual field (supports Markdown) """ style: Optional[PatchGlipPostResponseAttachmentsItemFieldsItemStyle] = 'Short' """ Style of width span applied to a field """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class PatchGlipPostResponseAttachmentsItemFootnote(DataClassJsonMixin): """ Message Footer """ text: Optional[str] = None """ Text of a footer """ icon_uri: Optional[str] = None """ Link to an icon displayed to the left of a footer; sized 32x32px """ time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Message creation datetime in ISO 8601 format including timezone, for example *2016-03-10T18:07:52.534Z* """ class PatchGlipPostResponseAttachmentsItemRecurrence(Enum): """ Event recurrence settings. """ None_ = 'None' Day = 'Day' Weekday = 'Weekday' Week = 'Week' Month = 'Month' Year = 'Year' class PatchGlipPostResponseAttachmentsItemEndingOn(Enum): """ Iterations end datetime for periodic events """ None_ = 'None' Count = 'Count' Date = 'Date' class PatchGlipPostResponseAttachmentsItemColor(Enum): """ Color of Event title, including its presentation in Calendar; or the color of the side border of an interactive message of a Card Generated by Python OpenAPI Parser """ Black = 'Black' Red = 'Red' Orange = 'Orange' Yellow = 'Yellow' Green = 'Green' Blue = 'Blue' Purple = 'Purple' Magenta = 'Magenta' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class PatchGlipPostResponseAttachmentsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an attachment """ type: Optional[PatchGlipPostResponseAttachmentsItemType] = 'Card' """ Type of an attachment """ fallback: Optional[str] = None """ A string of default text that will be rendered in the case that the client does not support Interactive Messages """ intro: Optional[str] = None """ A pretext to the message """ author: Optional[PatchGlipPostResponseAttachmentsItemAuthor] = None """ Information about the author """ title: Optional[str] = None """ Message title """ text: Optional[str] = None """ A large string field (up to 1000 chars) to be displayed as the body of a message (Supports GlipDown) """ image_uri: Optional[str] = None """ Link to an image displayed at the bottom of a message """ thumbnail_uri: Optional[str] = None """ Link to an image preview displayed to the right of a message (82x82) """ fields: Optional[List[PatchGlipPostResponseAttachmentsItemFieldsItem]] = None """ Information on navigation """ footnote: Optional[PatchGlipPostResponseAttachmentsItemFootnote] = None """ Message Footer """ creator_id: Optional[str] = None """ Internal identifier of a person created an event """ start_time: Optional[str] = None """ Datetime of starting an event """ end_time: Optional[str] = None """ Datetime of ending an event """ all_day: Optional[bool] = False """ Indicates whether an event has some specific time slot or lasts for the whole day(s) """ recurrence: Optional[PatchGlipPostResponseAttachmentsItemRecurrence] = None """ Event recurrence settings. """ ending_condition: Optional[str] = None """ Condition of ending """ ending_after: Optional[int] = None """ Count of iterations. For periodic events only """ ending_on: Optional[PatchGlipPostResponseAttachmentsItemEndingOn] = 'None' """ Iterations end datetime for periodic events """ color: Optional[PatchGlipPostResponseAttachmentsItemColor] = 'Black' """ Color of Event title, including its presentation in Calendar; or the color of the side border of an interactive message of a Card """ location: Optional[str] = None """ Event location """ description: Optional[str] = None """ Event details """ class PatchGlipPostResponseMentionsItemType(Enum): """ Type of mentions """ Person = 'Person' Team = 'Team' File = 'File' Link = 'Link' Event = 'Event' Task = 'Task' Note = 'Note' Card = 'Card' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class PatchGlipPostResponseMentionsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a user """ type: Optional[PatchGlipPostResponseMentionsItemType] = None """ Type of mentions """ name: Optional[str] = None """ Name of a user """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class PatchGlipPostResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a post """ group_id: Optional[str] = None """ Internal identifier of a group a post belongs to """ type: Optional[PatchGlipPostResponseType] = None """ Type of a post """ text: Optional[str] = None """ For 'TextMessage' post type only. Text of a message """ creator_id: Optional[str] = None """ Internal identifier of a user - author of a post """ added_person_ids: Optional[List[str]] = None """ For 'PersonsAdded' post type only. Identifiers of persons added to a group """ creation_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Post creation datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format """ last_modified_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Post last modification datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format """ attachments: Optional[List[PatchGlipPostResponseAttachmentsItem]] = None """ List of posted attachments """ mentions: Optional[List[PatchGlipPostResponseMentionsItem]] = None activity: Optional[str] = None """ Label of activity type """ title: Optional[str] = None """ Title of a message. (Can be set for bot's messages only) """ icon_uri: Optional[str] = None """ Link to an image used as an icon for this message """ icon_emoji: Optional[str] = None """ Emoji used as an icon for this message """ class ReadGlipPostsResponseRecordsItemType(Enum): """ Type of a post """ TextMessage = 'TextMessage' PersonJoined = 'PersonJoined' PersonsAdded = 'PersonsAdded' class ReadGlipPostsResponseRecordsItemAttachmentsItemType(Enum): """ Type of an attachment """ Card = 'Card' Event = 'Event' Note = 'Note' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadGlipPostsResponseRecordsItemAttachmentsItemAuthor(DataClassJsonMixin): """ Information about the author """ name: Optional[str] = None """ Name of a message author """ uri: Optional[str] = None """ Link to an author's name """ icon_uri: Optional[str] = None """ Link to an image displayed to the left of an author's name; sized 82x82px """ class ReadGlipPostsResponseRecordsItemAttachmentsItemFieldsItemStyle(Enum): """ Style of width span applied to a field """ Short = 'Short' Long = 'Long' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadGlipPostsResponseRecordsItemAttachmentsItemFieldsItem(DataClassJsonMixin): title: Optional[str] = None """ Title of an individual field """ value: Optional[str] = None """ Value of an individual field (supports Markdown) """ style: Optional[ReadGlipPostsResponseRecordsItemAttachmentsItemFieldsItemStyle] = 'Short' """ Style of width span applied to a field """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadGlipPostsResponseRecordsItemAttachmentsItemFootnote(DataClassJsonMixin): """ Message Footer """ text: Optional[str] = None """ Text of a footer """ icon_uri: Optional[str] = None """ Link to an icon displayed to the left of a footer; sized 32x32px """ time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Message creation datetime in ISO 8601 format including timezone, for example *2016-03-10T18:07:52.534Z* """ class ReadGlipPostsResponseRecordsItemAttachmentsItemRecurrence(Enum): """ Event recurrence settings. """ None_ = 'None' Day = 'Day' Weekday = 'Weekday' Week = 'Week' Month = 'Month' Year = 'Year' class ReadGlipPostsResponseRecordsItemAttachmentsItemEndingOn(Enum): """ Iterations end datetime for periodic events """ None_ = 'None' Count = 'Count' Date = 'Date' class ReadGlipPostsResponseRecordsItemAttachmentsItemColor(Enum): """ Color of Event title, including its presentation in Calendar; or the color of the side border of an interactive message of a Card Generated by Python OpenAPI Parser """ Black = 'Black' Red = 'Red' Orange = 'Orange' Yellow = 'Yellow' Green = 'Green' Blue = 'Blue' Purple = 'Purple' Magenta = 'Magenta' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadGlipPostsResponseRecordsItemAttachmentsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an attachment """ type: Optional[ReadGlipPostsResponseRecordsItemAttachmentsItemType] = 'Card' """ Type of an attachment """ fallback: Optional[str] = None """ A string of default text that will be rendered in the case that the client does not support Interactive Messages """ intro: Optional[str] = None """ A pretext to the message """ author: Optional[ReadGlipPostsResponseRecordsItemAttachmentsItemAuthor] = None """ Information about the author """ title: Optional[str] = None """ Message title """ text: Optional[str] = None """ A large string field (up to 1000 chars) to be displayed as the body of a message (Supports GlipDown) """ image_uri: Optional[str] = None """ Link to an image displayed at the bottom of a message """ thumbnail_uri: Optional[str] = None """ Link to an image preview displayed to the right of a message (82x82) """ fields: Optional[List[ReadGlipPostsResponseRecordsItemAttachmentsItemFieldsItem]] = None """ Information on navigation """ footnote: Optional[ReadGlipPostsResponseRecordsItemAttachmentsItemFootnote] = None """ Message Footer """ creator_id: Optional[str] = None """ Internal identifier of a person created an event """ start_time: Optional[str] = None """ Datetime of starting an event """ end_time: Optional[str] = None """ Datetime of ending an event """ all_day: Optional[bool] = False """ Indicates whether an event has some specific time slot or lasts for the whole day(s) """ recurrence: Optional[ReadGlipPostsResponseRecordsItemAttachmentsItemRecurrence] = None """ Event recurrence settings. """ ending_condition: Optional[str] = None """ Condition of ending """ ending_after: Optional[int] = None """ Count of iterations. For periodic events only """ ending_on: Optional[ReadGlipPostsResponseRecordsItemAttachmentsItemEndingOn] = 'None' """ Iterations end datetime for periodic events """ color: Optional[ReadGlipPostsResponseRecordsItemAttachmentsItemColor] = 'Black' """ Color of Event title, including its presentation in Calendar; or the color of the side border of an interactive message of a Card """ location: Optional[str] = None """ Event location """ description: Optional[str] = None """ Event details """ class ReadGlipPostsResponseRecordsItemMentionsItemType(Enum): """ Type of mentions """ Person = 'Person' Team = 'Team' File = 'File' Link = 'Link' Event = 'Event' Task = 'Task' Note = 'Note' Card = 'Card' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadGlipPostsResponseRecordsItemMentionsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a user """ type: Optional[ReadGlipPostsResponseRecordsItemMentionsItemType] = None """ Type of mentions """ name: Optional[str] = None """ Name of a user """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadGlipPostsResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a post """ group_id: Optional[str] = None """ Internal identifier of a group a post belongs to """ type: Optional[ReadGlipPostsResponseRecordsItemType] = None """ Type of a post """ text: Optional[str] = None """ For 'TextMessage' post type only. Text of a message """ creator_id: Optional[str] = None """ Internal identifier of a user - author of a post """ added_person_ids: Optional[List[str]] = None """ For 'PersonsAdded' post type only. Identifiers of persons added to a group """ creation_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Post creation datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format """ last_modified_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Post last modification datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format """ attachments: Optional[List[ReadGlipPostsResponseRecordsItemAttachmentsItem]] = None """ List of posted attachments """ mentions: Optional[List[ReadGlipPostsResponseRecordsItemMentionsItem]] = None activity: Optional[str] = None """ Label of activity type """ title: Optional[str] = None """ Title of a message. (Can be set for bot's messages only) """ icon_uri: Optional[str] = None """ Link to an image used as an icon for this message """ icon_emoji: Optional[str] = None """ Emoji used as an icon for this message """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadGlipPostsResponseNavigation(DataClassJsonMixin): prev_page_token: Optional[str] = None """ Previous page token. To get previous page, user should pass one of returned token in next request and, in turn, required page will be returned with new tokens """ next_page_token: Optional[str] = None """ Next page token. To get next page, user should pass one of returned token in next request and, in turn, required page will be returned with new tokens """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadGlipPostsResponse(DataClassJsonMixin): """ Required Properties: - records Generated by Python OpenAPI Parser """ records: List[ReadGlipPostsResponseRecordsItem] """ List of posts """ navigation: Optional[ReadGlipPostsResponseNavigation] = None class CreateGlipPostRequestAttachmentsItemType(Enum): """ Type of an attachment """ Event = 'Event' File = 'File' Note = 'Note' Task = 'Task' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateGlipPostRequestAttachmentsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an attachment """ type: Optional[CreateGlipPostRequestAttachmentsItemType] = None """ Type of an attachment """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateGlipPostRequest(DataClassJsonMixin): """ Required Properties: - text Generated by Python OpenAPI Parser """ text: str """ Post text. """ attachments: Optional[List[CreateGlipPostRequestAttachmentsItem]] = None """ Identifier(s) of attachments. """ class CreateGlipPostResponseType(Enum): """ Type of a post """ TextMessage = 'TextMessage' PersonJoined = 'PersonJoined' PersonsAdded = 'PersonsAdded' class CreateGlipPostResponseAttachmentsItemType(Enum): """ Type of an attachment """ Person = 'Person' Team = 'Team' File = 'File' Link = 'Link' Event = 'Event' Task = 'Task' Note = 'Note' Card = 'Card' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateGlipPostResponseAttachmentsItemAuthor(DataClassJsonMixin): """ Information about the author """ name: Optional[str] = None """ Name of a message author """ uri: Optional[str] = None """ Link to an author's name """ icon_uri: Optional[str] = None """ Link to an image displayed to the left of an author's name; sized 82x82px """ class CreateGlipPostResponseAttachmentsItemFieldsItemStyle(Enum): """ Style of width span applied to a field """ Short = 'Short' Long = 'Long' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateGlipPostResponseAttachmentsItemFieldsItem(DataClassJsonMixin): title: Optional[str] = None """ Title of an individual field """ value: Optional[str] = None """ Value of an individual field (supports Markdown) """ style: Optional[CreateGlipPostResponseAttachmentsItemFieldsItemStyle] = 'Short' """ Style of width span applied to a field """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateGlipPostResponseAttachmentsItemFootnote(DataClassJsonMixin): """ Message Footer """ text: Optional[str] = None """ Text of a footer """ icon_uri: Optional[str] = None """ Link to an icon displayed to the left of a footer; sized 32x32px """ time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Message creation datetime in ISO 8601 format including timezone, for example *2016-03-10T18:07:52.534Z* """ class CreateGlipPostResponseAttachmentsItemRecurrence(Enum): """ Event recurrence settings. """ None_ = 'None' Day = 'Day' Weekday = 'Weekday' Week = 'Week' Month = 'Month' Year = 'Year' class CreateGlipPostResponseAttachmentsItemEndingOn(Enum): """ Iterations end datetime for periodic events """ None_ = 'None' Count = 'Count' Date = 'Date' class CreateGlipPostResponseAttachmentsItemColor(Enum): """ Color of Event title, including its presentation in Calendar; or the color of the side border of an interactive message of a Card Generated by Python OpenAPI Parser """ Black = 'Black' Red = 'Red' Orange = 'Orange' Yellow = 'Yellow' Green = 'Green' Blue = 'Blue' Purple = 'Purple' Magenta = 'Magenta' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateGlipPostResponseAttachmentsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an attachment """ type: Optional[CreateGlipPostResponseAttachmentsItemType] = 'Card' """ Type of an attachment """ fallback: Optional[str] = None """ A string of default text that will be rendered in the case that the client does not support Interactive Messages """ intro: Optional[str] = None """ A pretext to the message """ author: Optional[CreateGlipPostResponseAttachmentsItemAuthor] = None """ Information about the author """ title: Optional[str] = None """ Message title """ text: Optional[str] = None """ A large string field (up to 1000 chars) to be displayed as the body of a message (Supports GlipDown) """ image_uri: Optional[str] = None """ Link to an image displayed at the bottom of a message """ thumbnail_uri: Optional[str] = None """ Link to an image preview displayed to the right of a message (82x82) """ fields: Optional[List[CreateGlipPostResponseAttachmentsItemFieldsItem]] = None """ Information on navigation """ footnote: Optional[CreateGlipPostResponseAttachmentsItemFootnote] = None """ Message Footer """ creator_id: Optional[str] = None """ Internal identifier of a person created an event """ start_time: Optional[str] = None """ Datetime of starting an event """ end_time: Optional[str] = None """ Datetime of ending an event """ all_day: Optional[bool] = False """ Indicates whether an event has some specific time slot or lasts for the whole day(s) """ recurrence: Optional[CreateGlipPostResponseAttachmentsItemRecurrence] = None """ Event recurrence settings. """ ending_condition: Optional[str] = None """ Condition of ending """ ending_after: Optional[int] = None """ Count of iterations. For periodic events only """ ending_on: Optional[CreateGlipPostResponseAttachmentsItemEndingOn] = 'None' """ Iterations end datetime for periodic events """ color: Optional[CreateGlipPostResponseAttachmentsItemColor] = 'Black' """ Color of Event title, including its presentation in Calendar; or the color of the side border of an interactive message of a Card """ location: Optional[str] = None """ Event location """ description: Optional[str] = None """ Event details """ class CreateGlipPostResponseMentionsItemType(Enum): """ Type of mentions """ Person = 'Person' Team = 'Team' File = 'File' Link = 'Link' Event = 'Event' Task = 'Task' Note = 'Note' Card = 'Card' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateGlipPostResponseMentionsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a user """ type: Optional[CreateGlipPostResponseMentionsItemType] = None """ Type of mentions """ name: Optional[str] = None """ Name of a user """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateGlipPostResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a post """ group_id: Optional[str] = None """ Internal identifier of a group a post belongs to """ type: Optional[CreateGlipPostResponseType] = None """ Type of a post """ text: Optional[str] = None """ For 'TextMessage' post type only. Text of a message """ creator_id: Optional[str] = None """ Internal identifier of a user - author of a post """ added_person_ids: Optional[List[str]] = None """ For 'PersonsAdded' post type only. Identifiers of persons added to a group """ creation_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Post creation datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format """ last_modified_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Post last modification datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format """ attachments: Optional[List[CreateGlipPostResponseAttachmentsItem]] = None """ List of posted attachments """ mentions: Optional[List[CreateGlipPostResponseMentionsItem]] = None activity: Optional[str] = None """ Label of activity type """ title: Optional[str] = None """ Title of a message. (Can be set for bot's messages only) """ icon_uri: Optional[str] = None """ Link to an image used as an icon for this message """ icon_emoji: Optional[str] = None """ Emoji used as an icon for this message """ class ListGlipGroupPostsResponseRecordsItemType(Enum): """ Type of a post """ TextMessage = 'TextMessage' PersonJoined = 'PersonJoined' PersonsAdded = 'PersonsAdded' class ListGlipGroupPostsResponseRecordsItemAttachmentsItemType(Enum): """ Type of an attachment """ Card = 'Card' Event = 'Event' Note = 'Note' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListGlipGroupPostsResponseRecordsItemAttachmentsItemAuthor(DataClassJsonMixin): """ Information about the author """ name: Optional[str] = None """ Name of a message author """ uri: Optional[str] = None """ Link to an author's name """ icon_uri: Optional[str] = None """ Link to an image displayed to the left of an author's name; sized 82x82px """ class ListGlipGroupPostsResponseRecordsItemAttachmentsItemFieldsItemStyle(Enum): """ Style of width span applied to a field """ Short = 'Short' Long = 'Long' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListGlipGroupPostsResponseRecordsItemAttachmentsItemFieldsItem(DataClassJsonMixin): title: Optional[str] = None """ Title of an individual field """ value: Optional[str] = None """ Value of an individual field (supports Markdown) """ style: Optional[ListGlipGroupPostsResponseRecordsItemAttachmentsItemFieldsItemStyle] = 'Short' """ Style of width span applied to a field """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListGlipGroupPostsResponseRecordsItemAttachmentsItemFootnote(DataClassJsonMixin): """ Message Footer """ text: Optional[str] = None """ Text of a footer """ icon_uri: Optional[str] = None """ Link to an icon displayed to the left of a footer; sized 32x32px """ time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Message creation datetime in ISO 8601 format including timezone, for example *2016-03-10T18:07:52.534Z* """ class ListGlipGroupPostsResponseRecordsItemAttachmentsItemRecurrence(Enum): """ Event recurrence settings. """ None_ = 'None' Day = 'Day' Weekday = 'Weekday' Week = 'Week' Month = 'Month' Year = 'Year' class ListGlipGroupPostsResponseRecordsItemAttachmentsItemEndingOn(Enum): """ Iterations end datetime for periodic events """ None_ = 'None' Count = 'Count' Date = 'Date' class ListGlipGroupPostsResponseRecordsItemAttachmentsItemColor(Enum): """ Color of Event title, including its presentation in Calendar; or the color of the side border of an interactive message of a Card Generated by Python OpenAPI Parser """ Black = 'Black' Red = 'Red' Orange = 'Orange' Yellow = 'Yellow' Green = 'Green' Blue = 'Blue' Purple = 'Purple' Magenta = 'Magenta' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListGlipGroupPostsResponseRecordsItemAttachmentsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an attachment """ type: Optional[ListGlipGroupPostsResponseRecordsItemAttachmentsItemType] = 'Card' """ Type of an attachment """ fallback: Optional[str] = None """ A string of default text that will be rendered in the case that the client does not support Interactive Messages """ intro: Optional[str] = None """ A pretext to the message """ author: Optional[ListGlipGroupPostsResponseRecordsItemAttachmentsItemAuthor] = None """ Information about the author """ title: Optional[str] = None """ Message title """ text: Optional[str] = None """ A large string field (up to 1000 chars) to be displayed as the body of a message (Supports GlipDown) """ image_uri: Optional[str] = None """ Link to an image displayed at the bottom of a message """ thumbnail_uri: Optional[str] = None """ Link to an image preview displayed to the right of a message (82x82) """ fields: Optional[List[ListGlipGroupPostsResponseRecordsItemAttachmentsItemFieldsItem]] = None """ Information on navigation """ footnote: Optional[ListGlipGroupPostsResponseRecordsItemAttachmentsItemFootnote] = None """ Message Footer """ creator_id: Optional[str] = None """ Internal identifier of a person created an event """ start_time: Optional[str] = None """ Datetime of starting an event """ end_time: Optional[str] = None """ Datetime of ending an event """ all_day: Optional[bool] = False """ Indicates whether an event has some specific time slot or lasts for the whole day(s) """ recurrence: Optional[ListGlipGroupPostsResponseRecordsItemAttachmentsItemRecurrence] = None """ Event recurrence settings. """ ending_condition: Optional[str] = None """ Condition of ending """ ending_after: Optional[int] = None """ Count of iterations. For periodic events only """ ending_on: Optional[ListGlipGroupPostsResponseRecordsItemAttachmentsItemEndingOn] = 'None' """ Iterations end datetime for periodic events """ color: Optional[ListGlipGroupPostsResponseRecordsItemAttachmentsItemColor] = 'Black' """ Color of Event title, including its presentation in Calendar; or the color of the side border of an interactive message of a Card """ location: Optional[str] = None """ Event location """ description: Optional[str] = None """ Event details """ class ListGlipGroupPostsResponseRecordsItemMentionsItemType(Enum): """ Type of mentions """ Person = 'Person' Team = 'Team' File = 'File' Link = 'Link' Event = 'Event' Task = 'Task' Note = 'Note' Card = 'Card' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListGlipGroupPostsResponseRecordsItemMentionsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a user """ type: Optional[ListGlipGroupPostsResponseRecordsItemMentionsItemType] = None """ Type of mentions """ name: Optional[str] = None """ Name of a user """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListGlipGroupPostsResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a post """ group_id: Optional[str] = None """ Internal identifier of a group a post belongs to """ type: Optional[ListGlipGroupPostsResponseRecordsItemType] = None """ Type of a post """ text: Optional[str] = None """ For 'TextMessage' post type only. Text of a message """ creator_id: Optional[str] = None """ Internal identifier of a user - author of a post """ added_person_ids: Optional[List[str]] = None """ For 'PersonsAdded' post type only. Identifiers of persons added to a group """ creation_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Post creation datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format """ last_modified_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Post last modification datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format """ attachments: Optional[List[ListGlipGroupPostsResponseRecordsItemAttachmentsItem]] = None """ List of posted attachments """ mentions: Optional[List[ListGlipGroupPostsResponseRecordsItemMentionsItem]] = None activity: Optional[str] = None """ Label of activity type """ title: Optional[str] = None """ Title of a message. (Can be set for bot's messages only) """ icon_uri: Optional[str] = None """ Link to an image used as an icon for this message """ icon_emoji: Optional[str] = None """ Emoji used as an icon for this message """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListGlipGroupPostsResponseNavigation(DataClassJsonMixin): prev_page_token: Optional[str] = None """ Previous page token. To get previous page, user should pass one of returned token in next request and, in turn, required page will be returned with new tokens """ next_page_token: Optional[str] = None """ Next page token. To get next page, user should pass one of returned token in next request and, in turn, required page will be returned with new tokens """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListGlipGroupPostsResponse(DataClassJsonMixin): """ Required Properties: - records Generated by Python OpenAPI Parser """ records: List[ListGlipGroupPostsResponseRecordsItem] """ List of posts """ navigation: Optional[ListGlipGroupPostsResponseNavigation] = None class CreateGlipGroupPostRequestAttachmentsItemType(Enum): """ Type of attachment """ Card = 'Card' Event = 'Event' Note = 'Note' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateGlipGroupPostRequestAttachmentsItemAuthor(DataClassJsonMixin): """ Information about the author """ name: Optional[str] = None """ Name of a message author """ uri: Optional[str] = None """ Link to an author's name """ icon_uri: Optional[str] = None """ Link to an image displayed to the left of an author's name; sized 82x82px """ class CreateGlipGroupPostRequestAttachmentsItemFieldsItemStyle(Enum): """ Style of width span applied to a field """ Short = 'Short' Long = 'Long' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateGlipGroupPostRequestAttachmentsItemFieldsItem(DataClassJsonMixin): title: Optional[str] = None """ Title of an individual field """ value: Optional[str] = None """ Value of an individual field (supports Markdown) """ style: Optional[CreateGlipGroupPostRequestAttachmentsItemFieldsItemStyle] = 'Short' """ Style of width span applied to a field """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateGlipGroupPostRequestAttachmentsItemFootnote(DataClassJsonMixin): """ Message footer information """ text: Optional[str] = None """ Text of a footer """ icon_uri: Optional[str] = None """ Link to an icon displayed to the left of a footer; sized 32x32px """ time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Message creation datetime in ISO 8601 format including timezone, for example *2016-03-10T18:07:52.534Z* """ class CreateGlipGroupPostRequestAttachmentsItemRecurrence(Enum): """ Event recurrence settings. For non-periodic events the value is 'None'. Must be greater or equal to event duration: 1- Day/Weekday; 7 - Week; 28 - Month; 365 - Year Generated by Python OpenAPI Parser """ None_ = 'None' Day = 'Day' Weekday = 'Weekday' Week = 'Week' Month = 'Month' Year = 'Year' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateGlipGroupPostRequestAttachmentsItem(DataClassJsonMixin): type: Optional[CreateGlipGroupPostRequestAttachmentsItemType] = 'Card' """ Type of attachment """ title: Optional[str] = None """ Attachment title """ fallback: Optional[str] = None """ Default message returned in case the client does not support interactive messages """ color: Optional[str] = None """ Color of Event title, including its presentation in Calendar; or the color of the side border of an interactive message of a Card. The default color is 'Black' """ intro: Optional[str] = None """ Introductory text displayed directly above a message """ author: Optional[CreateGlipGroupPostRequestAttachmentsItemAuthor] = None """ Information about the author """ text: Optional[str] = None """ Text of attachment (up to 1000 chars), supports GlipDown """ image_uri: Optional[str] = None """ Link to an image displayed at the bottom of a message """ thumbnail_uri: Optional[str] = None """ Link to an image preview displayed to the right of a message (82x82) """ fields: Optional[List[CreateGlipGroupPostRequestAttachmentsItemFieldsItem]] = None """ Individual subsections within a message """ footnote: Optional[CreateGlipGroupPostRequestAttachmentsItemFootnote] = None """ Message footer information """ start_time: Optional[str] = None """ Datetime of starting an event """ end_time: Optional[str] = None """ Datetime of ending an event """ all_day: Optional[bool] = False """ Indicates whether an event has some specific time slot or lasts for the whole day(s) """ recurrence: Optional[CreateGlipGroupPostRequestAttachmentsItemRecurrence] = None """ Event recurrence settings. For non-periodic events the value is 'None'. Must be greater or equal to event duration: 1- Day/Weekday; 7 - Week; 28 - Month; 365 - Year """ ending_condition: Optional[str] = None """ Condition of ending an event """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateGlipGroupPostRequest(DataClassJsonMixin): activity: Optional[str] = None title: Optional[str] = None """ Title of a message. (Can be set for bot's messages only). """ text: Optional[str] = None """ Text of a post """ group_id: Optional[str] = None """ Internal identifier of a group """ attachments: Optional[List[CreateGlipGroupPostRequestAttachmentsItem]] = None """ List of attachments to be posted """ person_ids: Optional[List[str]] = None system: Optional[bool] = None class CreateGlipGroupPostResponseType(Enum): """ Type of a post """ TextMessage = 'TextMessage' PersonJoined = 'PersonJoined' PersonsAdded = 'PersonsAdded' class CreateGlipGroupPostResponseAttachmentsItemType(Enum): """ Type of an attachment """ Card = 'Card' Event = 'Event' Note = 'Note' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateGlipGroupPostResponseAttachmentsItemAuthor(DataClassJsonMixin): """ Information about the author """ name: Optional[str] = None """ Name of a message author """ uri: Optional[str] = None """ Link to an author's name """ icon_uri: Optional[str] = None """ Link to an image displayed to the left of an author's name; sized 82x82px """ class CreateGlipGroupPostResponseAttachmentsItemFieldsItemStyle(Enum): """ Style of width span applied to a field """ Short = 'Short' Long = 'Long' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateGlipGroupPostResponseAttachmentsItemFieldsItem(DataClassJsonMixin): title: Optional[str] = None """ Title of an individual field """ value: Optional[str] = None """ Value of an individual field (supports Markdown) """ style: Optional[CreateGlipGroupPostResponseAttachmentsItemFieldsItemStyle] = 'Short' """ Style of width span applied to a field """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateGlipGroupPostResponseAttachmentsItemFootnote(DataClassJsonMixin): """ Message Footer """ text: Optional[str] = None """ Text of a footer """ icon_uri: Optional[str] = None """ Link to an icon displayed to the left of a footer; sized 32x32px """ time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Message creation datetime in ISO 8601 format including timezone, for example *2016-03-10T18:07:52.534Z* """ class CreateGlipGroupPostResponseAttachmentsItemRecurrence(Enum): """ Event recurrence settings. """ None_ = 'None' Day = 'Day' Weekday = 'Weekday' Week = 'Week' Month = 'Month' Year = 'Year' class CreateGlipGroupPostResponseAttachmentsItemEndingOn(Enum): """ Iterations end datetime for periodic events """ None_ = 'None' Count = 'Count' Date = 'Date' class CreateGlipGroupPostResponseAttachmentsItemColor(Enum): """ Color of Event title, including its presentation in Calendar; or the color of the side border of an interactive message of a Card Generated by Python OpenAPI Parser """ Black = 'Black' Red = 'Red' Orange = 'Orange' Yellow = 'Yellow' Green = 'Green' Blue = 'Blue' Purple = 'Purple' Magenta = 'Magenta' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateGlipGroupPostResponseAttachmentsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an attachment """ type: Optional[CreateGlipGroupPostResponseAttachmentsItemType] = 'Card' """ Type of an attachment """ fallback: Optional[str] = None """ A string of default text that will be rendered in the case that the client does not support Interactive Messages """ intro: Optional[str] = None """ A pretext to the message """ author: Optional[CreateGlipGroupPostResponseAttachmentsItemAuthor] = None """ Information about the author """ title: Optional[str] = None """ Message title """ text: Optional[str] = None """ A large string field (up to 1000 chars) to be displayed as the body of a message (Supports GlipDown) """ image_uri: Optional[str] = None """ Link to an image displayed at the bottom of a message """ thumbnail_uri: Optional[str] = None """ Link to an image preview displayed to the right of a message (82x82) """ fields: Optional[List[CreateGlipGroupPostResponseAttachmentsItemFieldsItem]] = None """ Information on navigation """ footnote: Optional[CreateGlipGroupPostResponseAttachmentsItemFootnote] = None """ Message Footer """ creator_id: Optional[str] = None """ Internal identifier of a person created an event """ start_time: Optional[str] = None """ Datetime of starting an event """ end_time: Optional[str] = None """ Datetime of ending an event """ all_day: Optional[bool] = False """ Indicates whether an event has some specific time slot or lasts for the whole day(s) """ recurrence: Optional[CreateGlipGroupPostResponseAttachmentsItemRecurrence] = None """ Event recurrence settings. """ ending_condition: Optional[str] = None """ Condition of ending """ ending_after: Optional[int] = None """ Count of iterations. For periodic events only """ ending_on: Optional[CreateGlipGroupPostResponseAttachmentsItemEndingOn] = 'None' """ Iterations end datetime for periodic events """ color: Optional[CreateGlipGroupPostResponseAttachmentsItemColor] = 'Black' """ Color of Event title, including its presentation in Calendar; or the color of the side border of an interactive message of a Card """ location: Optional[str] = None """ Event location """ description: Optional[str] = None """ Event details """ class CreateGlipGroupPostResponseMentionsItemType(Enum): """ Type of mentions """ Person = 'Person' Team = 'Team' File = 'File' Link = 'Link' Event = 'Event' Task = 'Task' Note = 'Note' Card = 'Card' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateGlipGroupPostResponseMentionsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a user """ type: Optional[CreateGlipGroupPostResponseMentionsItemType] = None """ Type of mentions """ name: Optional[str] = None """ Name of a user """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateGlipGroupPostResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a post """ group_id: Optional[str] = None """ Internal identifier of a group a post belongs to """ type: Optional[CreateGlipGroupPostResponseType] = None """ Type of a post """ text: Optional[str] = None """ For 'TextMessage' post type only. Text of a message """ creator_id: Optional[str] = None """ Internal identifier of a user - author of a post """ added_person_ids: Optional[List[str]] = None """ For 'PersonsAdded' post type only. Identifiers of persons added to a group """ creation_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Post creation datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format """ last_modified_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Post last modification datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format """ attachments: Optional[List[CreateGlipGroupPostResponseAttachmentsItem]] = None """ List of posted attachments """ mentions: Optional[List[CreateGlipGroupPostResponseMentionsItem]] = None activity: Optional[str] = None """ Label of activity type """ title: Optional[str] = None """ Title of a message. (Can be set for bot's messages only) """ icon_uri: Optional[str] = None """ Link to an image used as an icon for this message """ icon_emoji: Optional[str] = None """ Emoji used as an icon for this message """ class CreateGlipCardRequestType(Enum): """ Type of attachment """ Card = 'Card' Event = 'Event' Note = 'Note' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateGlipCardRequestAuthor(DataClassJsonMixin): """ Information about the author """ name: Optional[str] = None """ Name of a message author """ uri: Optional[str] = None """ Link to an author's name """ icon_uri: Optional[str] = None """ Link to an image displayed to the left of an author's name; sized 82x82px """ class CreateGlipCardRequestFieldsItemStyle(Enum): """ Style of width span applied to a field """ Short = 'Short' Long = 'Long' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateGlipCardRequestFieldsItem(DataClassJsonMixin): title: Optional[str] = None """ Title of an individual field """ value: Optional[str] = None """ Value of an individual field (supports Markdown) """ style: Optional[CreateGlipCardRequestFieldsItemStyle] = 'Short' """ Style of width span applied to a field """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateGlipCardRequestFootnote(DataClassJsonMixin): """ Message footer information """ text: Optional[str] = None """ Text of a footer """ icon_uri: Optional[str] = None """ Link to an icon displayed to the left of a footer; sized 32x32px """ time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Message creation datetime in ISO 8601 format including timezone, for example *2016-03-10T18:07:52.534Z* """ class CreateGlipCardRequestRecurrence(Enum): """ Event recurrence settings. For non-periodic events the value is 'None'. Must be greater or equal to event duration: 1- Day/Weekday; 7 - Week; 28 - Month; 365 - Year Generated by Python OpenAPI Parser """ None_ = 'None' Day = 'Day' Weekday = 'Weekday' Week = 'Week' Month = 'Month' Year = 'Year' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateGlipCardRequest(DataClassJsonMixin): type: Optional[CreateGlipCardRequestType] = 'Card' """ Type of attachment """ title: Optional[str] = None """ Attachment title """ fallback: Optional[str] = None """ Default message returned in case the client does not support interactive messages """ color: Optional[str] = None """ Color of Event title, including its presentation in Calendar; or the color of the side border of an interactive message of a Card. The default color is 'Black' """ intro: Optional[str] = None """ Introductory text displayed directly above a message """ author: Optional[CreateGlipCardRequestAuthor] = None """ Information about the author """ text: Optional[str] = None """ Text of attachment (up to 1000 chars), supports GlipDown """ image_uri: Optional[str] = None """ Link to an image displayed at the bottom of a message """ thumbnail_uri: Optional[str] = None """ Link to an image preview displayed to the right of a message (82x82) """ fields: Optional[List[CreateGlipCardRequestFieldsItem]] = None """ Individual subsections within a message """ footnote: Optional[CreateGlipCardRequestFootnote] = None """ Message footer information """ start_time: Optional[str] = None """ Datetime of starting an event """ end_time: Optional[str] = None """ Datetime of ending an event """ all_day: Optional[bool] = False """ Indicates whether an event has some specific time slot or lasts for the whole day(s) """ recurrence: Optional[CreateGlipCardRequestRecurrence] = None """ Event recurrence settings. For non-periodic events the value is 'None'. Must be greater or equal to event duration: 1- Day/Weekday; 7 - Week; 28 - Month; 365 - Year """ ending_condition: Optional[str] = None """ Condition of ending an event """ class CreateGlipCardResponseType(Enum): """ Type of an attachment """ Card = 'Card' Event = 'Event' Note = 'Note' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateGlipCardResponseAuthor(DataClassJsonMixin): """ Information about the author """ name: Optional[str] = None """ Name of a message author """ uri: Optional[str] = None """ Link to an author's name """ icon_uri: Optional[str] = None """ Link to an image displayed to the left of an author's name; sized 82x82px """ class CreateGlipCardResponseFieldsItemStyle(Enum): """ Style of width span applied to a field """ Short = 'Short' Long = 'Long' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateGlipCardResponseFieldsItem(DataClassJsonMixin): title: Optional[str] = None """ Title of an individual field """ value: Optional[str] = None """ Value of an individual field (supports Markdown) """ style: Optional[CreateGlipCardResponseFieldsItemStyle] = 'Short' """ Style of width span applied to a field """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateGlipCardResponseFootnote(DataClassJsonMixin): """ Message Footer """ text: Optional[str] = None """ Text of a footer """ icon_uri: Optional[str] = None """ Link to an icon displayed to the left of a footer; sized 32x32px """ time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Message creation datetime in ISO 8601 format including timezone, for example *2016-03-10T18:07:52.534Z* """ class CreateGlipCardResponseRecurrence(Enum): """ Event recurrence settings. """ None_ = 'None' Day = 'Day' Weekday = 'Weekday' Week = 'Week' Month = 'Month' Year = 'Year' class CreateGlipCardResponseEndingOn(Enum): """ Iterations end datetime for periodic events """ None_ = 'None' Count = 'Count' Date = 'Date' class CreateGlipCardResponseColor(Enum): """ Color of Event title, including its presentation in Calendar; or the color of the side border of an interactive message of a Card Generated by Python OpenAPI Parser """ Black = 'Black' Red = 'Red' Orange = 'Orange' Yellow = 'Yellow' Green = 'Green' Blue = 'Blue' Purple = 'Purple' Magenta = 'Magenta' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateGlipCardResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an attachment """ type: Optional[CreateGlipCardResponseType] = 'Card' """ Type of an attachment """ fallback: Optional[str] = None """ A string of default text that will be rendered in the case that the client does not support Interactive Messages """ intro: Optional[str] = None """ A pretext to the message """ author: Optional[CreateGlipCardResponseAuthor] = None """ Information about the author """ title: Optional[str] = None """ Message title """ text: Optional[str] = None """ A large string field (up to 1000 chars) to be displayed as the body of a message (Supports GlipDown) """ image_uri: Optional[str] = None """ Link to an image displayed at the bottom of a message """ thumbnail_uri: Optional[str] = None """ Link to an image preview displayed to the right of a message (82x82) """ fields: Optional[List[CreateGlipCardResponseFieldsItem]] = None """ Information on navigation """ footnote: Optional[CreateGlipCardResponseFootnote] = None """ Message Footer """ creator_id: Optional[str] = None """ Internal identifier of a person created an event """ start_time: Optional[str] = None """ Datetime of starting an event """ end_time: Optional[str] = None """ Datetime of ending an event """ all_day: Optional[bool] = False """ Indicates whether an event has some specific time slot or lasts for the whole day(s) """ recurrence: Optional[CreateGlipCardResponseRecurrence] = None """ Event recurrence settings. """ ending_condition: Optional[str] = None """ Condition of ending """ ending_after: Optional[int] = None """ Count of iterations. For periodic events only """ ending_on: Optional[CreateGlipCardResponseEndingOn] = 'None' """ Iterations end datetime for periodic events """ color: Optional[CreateGlipCardResponseColor] = 'Black' """ Color of Event title, including its presentation in Calendar; or the color of the side border of an interactive message of a Card """ location: Optional[str] = None """ Event location """ description: Optional[str] = None """ Event details """ class ReadGlipCardResponseType(Enum): """ Type of an attachment """ Card = 'Card' Event = 'Event' Note = 'Note' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadGlipCardResponseAuthor(DataClassJsonMixin): """ Information about the author """ name: Optional[str] = None """ Name of a message author """ uri: Optional[str] = None """ Link to an author's name """ icon_uri: Optional[str] = None """ Link to an image displayed to the left of an author's name; sized 82x82px """ class ReadGlipCardResponseFieldsItemStyle(Enum): """ Style of width span applied to a field """ Short = 'Short' Long = 'Long' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadGlipCardResponseFieldsItem(DataClassJsonMixin): title: Optional[str] = None """ Title of an individual field """ value: Optional[str] = None """ Value of an individual field (supports Markdown) """ style: Optional[ReadGlipCardResponseFieldsItemStyle] = 'Short' """ Style of width span applied to a field """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadGlipCardResponseFootnote(DataClassJsonMixin): """ Message Footer """ text: Optional[str] = None """ Text of a footer """ icon_uri: Optional[str] = None """ Link to an icon displayed to the left of a footer; sized 32x32px """ time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Message creation datetime in ISO 8601 format including timezone, for example *2016-03-10T18:07:52.534Z* """ class ReadGlipCardResponseRecurrence(Enum): """ Event recurrence settings. """ None_ = 'None' Day = 'Day' Weekday = 'Weekday' Week = 'Week' Month = 'Month' Year = 'Year' class ReadGlipCardResponseEndingOn(Enum): """ Iterations end datetime for periodic events """ None_ = 'None' Count = 'Count' Date = 'Date' class ReadGlipCardResponseColor(Enum): """ Color of Event title, including its presentation in Calendar; or the color of the side border of an interactive message of a Card Generated by Python OpenAPI Parser """ Black = 'Black' Red = 'Red' Orange = 'Orange' Yellow = 'Yellow' Green = 'Green' Blue = 'Blue' Purple = 'Purple' Magenta = 'Magenta' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadGlipCardResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an attachment """ type: Optional[ReadGlipCardResponseType] = 'Card' """ Type of an attachment """ fallback: Optional[str] = None """ A string of default text that will be rendered in the case that the client does not support Interactive Messages """ intro: Optional[str] = None """ A pretext to the message """ author: Optional[ReadGlipCardResponseAuthor] = None """ Information about the author """ title: Optional[str] = None """ Message title """ text: Optional[str] = None """ A large string field (up to 1000 chars) to be displayed as the body of a message (Supports GlipDown) """ image_uri: Optional[str] = None """ Link to an image displayed at the bottom of a message """ thumbnail_uri: Optional[str] = None """ Link to an image preview displayed to the right of a message (82x82) """ fields: Optional[List[ReadGlipCardResponseFieldsItem]] = None """ Information on navigation """ footnote: Optional[ReadGlipCardResponseFootnote] = None """ Message Footer """ creator_id: Optional[str] = None """ Internal identifier of a person created an event """ start_time: Optional[str] = None """ Datetime of starting an event """ end_time: Optional[str] = None """ Datetime of ending an event """ all_day: Optional[bool] = False """ Indicates whether an event has some specific time slot or lasts for the whole day(s) """ recurrence: Optional[ReadGlipCardResponseRecurrence] = None """ Event recurrence settings. """ ending_condition: Optional[str] = None """ Condition of ending """ ending_after: Optional[int] = None """ Count of iterations. For periodic events only """ ending_on: Optional[ReadGlipCardResponseEndingOn] = 'None' """ Iterations end datetime for periodic events """ color: Optional[ReadGlipCardResponseColor] = 'Black' """ Color of Event title, including its presentation in Calendar; or the color of the side border of an interactive message of a Card """ location: Optional[str] = None """ Event location """ description: Optional[str] = None """ Event details """ class ReadGlipCardResponseType(Enum): """ Type of an attachment """ Card = 'Card' Event = 'Event' Note = 'Note' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadGlipCardResponseAuthor(DataClassJsonMixin): """ Information about the author """ name: Optional[str] = None """ Name of a message author """ uri: Optional[str] = None """ Link to an author's name """ icon_uri: Optional[str] = None """ Link to an image displayed to the left of an author's name; sized 82x82px """ class ReadGlipCardResponseFieldsItemStyle(Enum): """ Style of width span applied to a field """ Short = 'Short' Long = 'Long' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadGlipCardResponseFieldsItem(DataClassJsonMixin): title: Optional[str] = None """ Title of an individual field """ value: Optional[str] = None """ Value of an individual field (supports Markdown) """ style: Optional[ReadGlipCardResponseFieldsItemStyle] = 'Short' """ Style of width span applied to a field """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadGlipCardResponseFootnote(DataClassJsonMixin): """ Message Footer """ text: Optional[str] = None """ Text of a footer """ icon_uri: Optional[str] = None """ Link to an icon displayed to the left of a footer; sized 32x32px """ time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Message creation datetime in ISO 8601 format including timezone, for example *2016-03-10T18:07:52.534Z* """ class ReadGlipCardResponseRecurrence(Enum): """ Event recurrence settings. """ None_ = 'None' Day = 'Day' Weekday = 'Weekday' Week = 'Week' Month = 'Month' Year = 'Year' class ReadGlipCardResponseEndingOn(Enum): """ Iterations end datetime for periodic events """ None_ = 'None' Count = 'Count' Date = 'Date' class ReadGlipCardResponseColor(Enum): """ Color of Event title, including its presentation in Calendar; or the color of the side border of an interactive message of a Card Generated by Python OpenAPI Parser """ Black = 'Black' Red = 'Red' Orange = 'Orange' Yellow = 'Yellow' Green = 'Green' Blue = 'Blue' Purple = 'Purple' Magenta = 'Magenta' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadGlipCardResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an attachment """ type: Optional[ReadGlipCardResponseType] = 'Card' """ Type of an attachment """ fallback: Optional[str] = None """ A string of default text that will be rendered in the case that the client does not support Interactive Messages """ intro: Optional[str] = None """ A pretext to the message """ author: Optional[ReadGlipCardResponseAuthor] = None """ Information about the author """ title: Optional[str] = None """ Message title """ text: Optional[str] = None """ A large string field (up to 1000 chars) to be displayed as the body of a message (Supports GlipDown) """ image_uri: Optional[str] = None """ Link to an image displayed at the bottom of a message """ thumbnail_uri: Optional[str] = None """ Link to an image preview displayed to the right of a message (82x82) """ fields: Optional[List[ReadGlipCardResponseFieldsItem]] = None """ Information on navigation """ footnote: Optional[ReadGlipCardResponseFootnote] = None """ Message Footer """ creator_id: Optional[str] = None """ Internal identifier of a person created an event """ start_time: Optional[str] = None """ Datetime of starting an event """ end_time: Optional[str] = None """ Datetime of ending an event """ all_day: Optional[bool] = False """ Indicates whether an event has some specific time slot or lasts for the whole day(s) """ recurrence: Optional[ReadGlipCardResponseRecurrence] = None """ Event recurrence settings. """ ending_condition: Optional[str] = None """ Condition of ending """ ending_after: Optional[int] = None """ Count of iterations. For periodic events only """ ending_on: Optional[ReadGlipCardResponseEndingOn] = 'None' """ Iterations end datetime for periodic events """ color: Optional[ReadGlipCardResponseColor] = 'Black' """ Color of Event title, including its presentation in Calendar; or the color of the side border of an interactive message of a Card """ location: Optional[str] = None """ Event location """ description: Optional[str] = None """ Event details """ class ReadGlipEventsResponseRecordsItemRecurrence(Enum): """ Event recurrence settings """ None_ = 'None' Day = 'Day' Weekday = 'Weekday' Week = 'Week' Month = 'Month' Year = 'Year' class ReadGlipEventsResponseRecordsItemEndingOn(Enum): """ Iterations end datetime for periodic events """ None_ = 'None' Count = 'Count' Date = 'Date' class ReadGlipEventsResponseRecordsItemColor(Enum): """ Color of Event title (including its presentation in Calendar) """ Black = 'Black' Red = 'Red' Orange = 'Orange' Yellow = 'Yellow' Green = 'Green' Blue = 'Blue' Purple = 'Purple' Magenta = 'Magenta' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadGlipEventsResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an event """ creator_id: Optional[str] = None """ Internal identifier of a person created an event """ title: Optional[str] = None """ Event title """ start_time: Optional[str] = None """ Datetime of starting an event """ end_time: Optional[str] = None """ Datetime of ending an event """ all_day: Optional[bool] = False """ Indicates whether an event has some specific time slot or lasts for the whole day(s) """ recurrence: Optional[ReadGlipEventsResponseRecordsItemRecurrence] = None """ Event recurrence settings """ ending_condition: Optional[str] = None """ Condition of ending """ ending_after: Optional[int] = None """ Count of iterations. For periodic events only """ ending_on: Optional[ReadGlipEventsResponseRecordsItemEndingOn] = 'None' """ Iterations end datetime for periodic events """ color: Optional[ReadGlipEventsResponseRecordsItemColor] = 'Black' """ Color of Event title (including its presentation in Calendar) """ location: Optional[str] = None """ Event location """ description: Optional[str] = None """ Event details """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadGlipEventsResponseNavigation(DataClassJsonMixin): prev_page_token: Optional[str] = None """ Previous page token. To get previous page, user should pass one of returned token in next request and, in turn, required page will be returned with new tokens """ next_page_token: Optional[str] = None """ Next page token. To get next page, user should pass one of returned token in next request and, in turn, required page will be returned with new tokens """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadGlipEventsResponse(DataClassJsonMixin): records: Optional[List[ReadGlipEventsResponseRecordsItem]] = None """ List of events created by the current user """ navigation: Optional[ReadGlipEventsResponseNavigation] = None class ReadGlipEventsResponseRecordsItemRecurrence(Enum): """ Event recurrence settings """ None_ = 'None' Day = 'Day' Weekday = 'Weekday' Week = 'Week' Month = 'Month' Year = 'Year' class ReadGlipEventsResponseRecordsItemEndingOn(Enum): """ Iterations end datetime for periodic events """ None_ = 'None' Count = 'Count' Date = 'Date' class ReadGlipEventsResponseRecordsItemColor(Enum): """ Color of Event title (including its presentation in Calendar) """ Black = 'Black' Red = 'Red' Orange = 'Orange' Yellow = 'Yellow' Green = 'Green' Blue = 'Blue' Purple = 'Purple' Magenta = 'Magenta' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadGlipEventsResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an event """ creator_id: Optional[str] = None """ Internal identifier of a person created an event """ title: Optional[str] = None """ Event title """ start_time: Optional[str] = None """ Datetime of starting an event """ end_time: Optional[str] = None """ Datetime of ending an event """ all_day: Optional[bool] = False """ Indicates whether an event has some specific time slot or lasts for the whole day(s) """ recurrence: Optional[ReadGlipEventsResponseRecordsItemRecurrence] = None """ Event recurrence settings """ ending_condition: Optional[str] = None """ Condition of ending """ ending_after: Optional[int] = None """ Count of iterations. For periodic events only """ ending_on: Optional[ReadGlipEventsResponseRecordsItemEndingOn] = 'None' """ Iterations end datetime for periodic events """ color: Optional[ReadGlipEventsResponseRecordsItemColor] = 'Black' """ Color of Event title (including its presentation in Calendar) """ location: Optional[str] = None """ Event location """ description: Optional[str] = None """ Event details """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadGlipEventsResponseNavigation(DataClassJsonMixin): prev_page_token: Optional[str] = None """ Previous page token. To get previous page, user should pass one of returned token in next request and, in turn, required page will be returned with new tokens """ next_page_token: Optional[str] = None """ Next page token. To get next page, user should pass one of returned token in next request and, in turn, required page will be returned with new tokens """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadGlipEventsResponse(DataClassJsonMixin): records: Optional[List[ReadGlipEventsResponseRecordsItem]] = None """ List of events created by the current user """ navigation: Optional[ReadGlipEventsResponseNavigation] = None class CreateEventRequestRecurrence(Enum): """ Event recurrence settings. For non-periodic events the value is 'None'. Must be greater or equal to event duration: 1- Day/Weekday; 7 - Week; 28 - Month; 365 - Year Generated by Python OpenAPI Parser """ None_ = 'None' Day = 'Day' Weekday = 'Weekday' Week = 'Week' Month = 'Month' Year = 'Year' class CreateEventRequestEndingOn(Enum): """ Iterations end datetime for periodic events. """ None_ = 'None' Count = 'Count' Date = 'Date' class CreateEventRequestColor(Enum): """ Color of Event title (including its presentation in Calendar) """ Black = 'Black' Red = 'Red' Orange = 'Orange' Yellow = 'Yellow' Green = 'Green' Blue = 'Blue' Purple = 'Purple' Magenta = 'Magenta' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateEventRequest(DataClassJsonMixin): """ Required Properties: - title - start_time - end_time Generated by Python OpenAPI Parser """ title: str """ Event title """ start_time: str """ Datetime of starting an event """ end_time: str """ Datetime of ending an event """ id: Optional[str] = None """ Internal identifier of an event """ creator_id: Optional[str] = None """ Internal identifier of a person created an event """ all_day: Optional[bool] = False """ Indicates whether event has some specific time slot or lasts for whole day(s) """ recurrence: Optional[CreateEventRequestRecurrence] = None """ Event recurrence settings. For non-periodic events the value is 'None'. Must be greater or equal to event duration: 1- Day/Weekday; 7 - Week; 28 - Month; 365 - Year """ ending_condition: Optional[str] = None """ Condition of ending """ ending_after: Optional[int] = None """ Count of iterations. For periodic events only. Value range is 1 - 10. Must be specified if 'endingCondition' is 'Count' """ ending_on: Optional[CreateEventRequestEndingOn] = 'None' """ Iterations end datetime for periodic events. """ color: Optional[CreateEventRequestColor] = 'Black' """ Color of Event title (including its presentation in Calendar) """ location: Optional[str] = None """ Event location """ description: Optional[str] = None """ Event details """ class CreateEventResponseRecurrence(Enum): """ Event recurrence settings """ None_ = 'None' Day = 'Day' Weekday = 'Weekday' Week = 'Week' Month = 'Month' Year = 'Year' class CreateEventResponseEndingOn(Enum): """ Iterations end datetime for periodic events """ None_ = 'None' Count = 'Count' Date = 'Date' class CreateEventResponseColor(Enum): """ Color of Event title (including its presentation in Calendar) """ Black = 'Black' Red = 'Red' Orange = 'Orange' Yellow = 'Yellow' Green = 'Green' Blue = 'Blue' Purple = 'Purple' Magenta = 'Magenta' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateEventResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an event """ creator_id: Optional[str] = None """ Internal identifier of a person created an event """ title: Optional[str] = None """ Event title """ start_time: Optional[str] = None """ Datetime of starting an event """ end_time: Optional[str] = None """ Datetime of ending an event """ all_day: Optional[bool] = False """ Indicates whether an event has some specific time slot or lasts for the whole day(s) """ recurrence: Optional[CreateEventResponseRecurrence] = None """ Event recurrence settings """ ending_condition: Optional[str] = None """ Condition of ending """ ending_after: Optional[int] = None """ Count of iterations. For periodic events only """ ending_on: Optional[CreateEventResponseEndingOn] = 'None' """ Iterations end datetime for periodic events """ color: Optional[CreateEventResponseColor] = 'Black' """ Color of Event title (including its presentation in Calendar) """ location: Optional[str] = None """ Event location """ description: Optional[str] = None """ Event details """ class ReadEventResponseRecurrence(Enum): """ Event recurrence settings """ None_ = 'None' Day = 'Day' Weekday = 'Weekday' Week = 'Week' Month = 'Month' Year = 'Year' class ReadEventResponseEndingOn(Enum): """ Iterations end datetime for periodic events """ None_ = 'None' Count = 'Count' Date = 'Date' class ReadEventResponseColor(Enum): """ Color of Event title (including its presentation in Calendar) """ Black = 'Black' Red = 'Red' Orange = 'Orange' Yellow = 'Yellow' Green = 'Green' Blue = 'Blue' Purple = 'Purple' Magenta = 'Magenta' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadEventResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an event """ creator_id: Optional[str] = None """ Internal identifier of a person created an event """ title: Optional[str] = None """ Event title """ start_time: Optional[str] = None """ Datetime of starting an event """ end_time: Optional[str] = None """ Datetime of ending an event """ all_day: Optional[bool] = False """ Indicates whether an event has some specific time slot or lasts for the whole day(s) """ recurrence: Optional[ReadEventResponseRecurrence] = None """ Event recurrence settings """ ending_condition: Optional[str] = None """ Condition of ending """ ending_after: Optional[int] = None """ Count of iterations. For periodic events only """ ending_on: Optional[ReadEventResponseEndingOn] = 'None' """ Iterations end datetime for periodic events """ color: Optional[ReadEventResponseColor] = 'Black' """ Color of Event title (including its presentation in Calendar) """ location: Optional[str] = None """ Event location """ description: Optional[str] = None """ Event details """ class UpdateEventResponseRecurrence(Enum): """ Event recurrence settings """ None_ = 'None' Day = 'Day' Weekday = 'Weekday' Week = 'Week' Month = 'Month' Year = 'Year' class UpdateEventResponseEndingOn(Enum): """ Iterations end datetime for periodic events """ None_ = 'None' Count = 'Count' Date = 'Date' class UpdateEventResponseColor(Enum): """ Color of Event title (including its presentation in Calendar) """ Black = 'Black' Red = 'Red' Orange = 'Orange' Yellow = 'Yellow' Green = 'Green' Blue = 'Blue' Purple = 'Purple' Magenta = 'Magenta' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class UpdateEventResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an event """ creator_id: Optional[str] = None """ Internal identifier of a person created an event """ title: Optional[str] = None """ Event title """ start_time: Optional[str] = None """ Datetime of starting an event """ end_time: Optional[str] = None """ Datetime of ending an event """ all_day: Optional[bool] = False """ Indicates whether an event has some specific time slot or lasts for the whole day(s) """ recurrence: Optional[UpdateEventResponseRecurrence] = None """ Event recurrence settings """ ending_condition: Optional[str] = None """ Condition of ending """ ending_after: Optional[int] = None """ Count of iterations. For periodic events only """ ending_on: Optional[UpdateEventResponseEndingOn] = 'None' """ Iterations end datetime for periodic events """ color: Optional[UpdateEventResponseColor] = 'Black' """ Color of Event title (including its presentation in Calendar) """ location: Optional[str] = None """ Event location """ description: Optional[str] = None """ Event details """ class ListGroupEventsResponseRecurrence(Enum): """ Event recurrence settings """ None_ = 'None' Day = 'Day' Weekday = 'Weekday' Week = 'Week' Month = 'Month' Year = 'Year' class ListGroupEventsResponseEndingOn(Enum): """ Iterations end datetime for periodic events """ None_ = 'None' Count = 'Count' Date = 'Date' class ListGroupEventsResponseColor(Enum): """ Color of Event title (including its presentation in Calendar) """ Black = 'Black' Red = 'Red' Orange = 'Orange' Yellow = 'Yellow' Green = 'Green' Blue = 'Blue' Purple = 'Purple' Magenta = 'Magenta' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListGroupEventsResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an event """ creator_id: Optional[str] = None """ Internal identifier of a person created an event """ title: Optional[str] = None """ Event title """ start_time: Optional[str] = None """ Datetime of starting an event """ end_time: Optional[str] = None """ Datetime of ending an event """ all_day: Optional[bool] = False """ Indicates whether an event has some specific time slot or lasts for the whole day(s) """ recurrence: Optional[ListGroupEventsResponseRecurrence] = None """ Event recurrence settings """ ending_condition: Optional[str] = None """ Condition of ending """ ending_after: Optional[int] = None """ Count of iterations. For periodic events only """ ending_on: Optional[ListGroupEventsResponseEndingOn] = 'None' """ Iterations end datetime for periodic events """ color: Optional[ListGroupEventsResponseColor] = 'Black' """ Color of Event title (including its presentation in Calendar) """ location: Optional[str] = None """ Event location """ description: Optional[str] = None """ Event details """ class CreateEventbyGroupIdResponseRecurrence(Enum): """ Event recurrence settings """ None_ = 'None' Day = 'Day' Weekday = 'Weekday' Week = 'Week' Month = 'Month' Year = 'Year' class CreateEventbyGroupIdResponseEndingOn(Enum): """ Iterations end datetime for periodic events """ None_ = 'None' Count = 'Count' Date = 'Date' class CreateEventbyGroupIdResponseColor(Enum): """ Color of Event title (including its presentation in Calendar) """ Black = 'Black' Red = 'Red' Orange = 'Orange' Yellow = 'Yellow' Green = 'Green' Blue = 'Blue' Purple = 'Purple' Magenta = 'Magenta' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateEventbyGroupIdResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an event """ creator_id: Optional[str] = None """ Internal identifier of a person created an event """ title: Optional[str] = None """ Event title """ start_time: Optional[str] = None """ Datetime of starting an event """ end_time: Optional[str] = None """ Datetime of ending an event """ all_day: Optional[bool] = False """ Indicates whether an event has some specific time slot or lasts for the whole day(s) """ recurrence: Optional[CreateEventbyGroupIdResponseRecurrence] = None """ Event recurrence settings """ ending_condition: Optional[str] = None """ Condition of ending """ ending_after: Optional[int] = None """ Count of iterations. For periodic events only """ ending_on: Optional[CreateEventbyGroupIdResponseEndingOn] = 'None' """ Iterations end datetime for periodic events """ color: Optional[CreateEventbyGroupIdResponseColor] = 'Black' """ Color of Event title (including its presentation in Calendar) """ location: Optional[str] = None """ Event location """ description: Optional[str] = None """ Event details """ class ListChatNotesStatus(Enum): Active = 'Active' Draft = 'Draft' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListChatNotesResponseRecordsItemCreator(DataClassJsonMixin): """ Note creator information """ id: Optional[str] = None """ Internal identifier of a user who created a note/task """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListChatNotesResponseRecordsItemLastModifiedBy(DataClassJsonMixin): """ Note last modification information """ id: Optional[str] = None """ Internal identifier of the user who last updated the note """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListChatNotesResponseRecordsItemLockedBy(DataClassJsonMixin): """ Returned for the note being edited (locked) at the current moment. Information on the user editing the note Generated by Python OpenAPI Parser """ id: Optional[str] = None """ Internal identifier of the user editing the note """ class ListChatNotesResponseRecordsItemStatus(Enum): """ Note publishing status. Any note is created in 'Draft' status. After it is posted it becomes 'Active' Generated by Python OpenAPI Parser """ Active = 'Active' Draft = 'Draft' class ListChatNotesResponseRecordsItemType(Enum): Note = 'Note' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListChatNotesResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a note """ title: Optional[str] = None """ Title of a note """ chat_ids: Optional[List[str]] = None """ Internal identifiers of the chat(s) where the note is posted or shared. """ preview: Optional[str] = None """ Preview of a note (first 150 characters of a body) """ creator: Optional[ListChatNotesResponseRecordsItemCreator] = None """ Note creator information """ last_modified_by: Optional[ListChatNotesResponseRecordsItemLastModifiedBy] = None """ Note last modification information """ locked_by: Optional[ListChatNotesResponseRecordsItemLockedBy] = None """ Returned for the note being edited (locked) at the current moment. Information on the user editing the note """ status: Optional[ListChatNotesResponseRecordsItemStatus] = None """ Note publishing status. Any note is created in 'Draft' status. After it is posted it becomes 'Active' """ creation_time: Optional[str] = None """ Creation time """ last_modified_time: Optional[str] = None """ Datetime of the note last update """ type: Optional[ListChatNotesResponseRecordsItemType] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListChatNotesResponseNavigation(DataClassJsonMixin): prev_page_token: Optional[str] = None """ Previous page token. To get previous page, user should pass one of returned token in next request and, in turn, required page will be returned with new tokens """ next_page_token: Optional[str] = None """ Next page token. To get next page, user should pass one of returned token in next request and, in turn, required page will be returned with new tokens """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListChatNotesResponse(DataClassJsonMixin): records: Optional[List[ListChatNotesResponseRecordsItem]] = None navigation: Optional[ListChatNotesResponseNavigation] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateChatNoteRequest(DataClassJsonMixin): """ Required Properties: - title Generated by Python OpenAPI Parser """ title: str """ Title of a note. Max allowed legth is 250 characters """ body: Optional[str] = None """ Contents of a note; HTML-markuped text. Max allowed length is 1048576 characters (1 Mb). """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateChatNoteResponseCreator(DataClassJsonMixin): """ Note creator information """ id: Optional[str] = None """ Internal identifier of a user who created a note/task """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateChatNoteResponseLastModifiedBy(DataClassJsonMixin): """ Note last modification information """ id: Optional[str] = None """ Internal identifier of the user who last updated the note """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateChatNoteResponseLockedBy(DataClassJsonMixin): """ Returned for the note being edited (locked) at the current moment. Information on the user editing the note Generated by Python OpenAPI Parser """ id: Optional[str] = None """ Internal identifier of the user editing the note """ class CreateChatNoteResponseStatus(Enum): """ Note publishing status. Any note is created in 'Draft' status. After it is posted it becomes 'Active' Generated by Python OpenAPI Parser """ Active = 'Active' Draft = 'Draft' class CreateChatNoteResponseType(Enum): Note = 'Note' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateChatNoteResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a note """ title: Optional[str] = None """ Title of a note """ chat_ids: Optional[List[str]] = None """ Internal identifiers of the chat(s) where the note is posted or shared. """ preview: Optional[str] = None """ Preview of a note (first 150 characters of a body) """ creator: Optional[CreateChatNoteResponseCreator] = None """ Note creator information """ last_modified_by: Optional[CreateChatNoteResponseLastModifiedBy] = None """ Note last modification information """ locked_by: Optional[CreateChatNoteResponseLockedBy] = None """ Returned for the note being edited (locked) at the current moment. Information on the user editing the note """ status: Optional[CreateChatNoteResponseStatus] = None """ Note publishing status. Any note is created in 'Draft' status. After it is posted it becomes 'Active' """ creation_time: Optional[str] = None """ Creation time """ last_modified_time: Optional[str] = None """ Datetime of the note last update """ type: Optional[CreateChatNoteResponseType] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserNoteResponseCreator(DataClassJsonMixin): """ Note creator information """ id: Optional[str] = None """ Internal identifier of a user who created a note/task """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserNoteResponseLastModifiedBy(DataClassJsonMixin): """ Note last modification information """ id: Optional[str] = None """ Internal identifier of the user who last updated the note """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserNoteResponseLockedBy(DataClassJsonMixin): """ Returned for the note being edited (locked) at the current moment. Information on the user editing the note Generated by Python OpenAPI Parser """ id: Optional[str] = None """ Internal identifier of the user editing the note """ class ReadUserNoteResponseStatus(Enum): """ Note publishing status. Any note is created in 'Draft' status. After it is posted it becomes 'Active' Generated by Python OpenAPI Parser """ Active = 'Active' Draft = 'Draft' class ReadUserNoteResponseType(Enum): Note = 'Note' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadUserNoteResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a note """ title: Optional[str] = None """ Title of a note """ chat_ids: Optional[List[str]] = None """ Internal identifiers of the chat(s) where the note is posted or shared. """ preview: Optional[str] = None """ Preview of a note (first 150 characters of a body) """ body: Optional[str] = None """ Text of a note """ creator: Optional[ReadUserNoteResponseCreator] = None """ Note creator information """ last_modified_by: Optional[ReadUserNoteResponseLastModifiedBy] = None """ Note last modification information """ locked_by: Optional[ReadUserNoteResponseLockedBy] = None """ Returned for the note being edited (locked) at the current moment. Information on the user editing the note """ status: Optional[ReadUserNoteResponseStatus] = None """ Note publishing status. Any note is created in 'Draft' status. After it is posted it becomes 'Active' """ creation_time: Optional[str] = None """ Creation time """ last_modified_time: Optional[str] = None """ Datetime of the note last update """ type: Optional[ReadUserNoteResponseType] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class PatchNoteResponseCreator(DataClassJsonMixin): """ Note creator information """ id: Optional[str] = None """ Internal identifier of a user who created a note/task """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class PatchNoteResponseLastModifiedBy(DataClassJsonMixin): """ Note last modification information """ id: Optional[str] = None """ Internal identifier of the user who last updated the note """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class PatchNoteResponseLockedBy(DataClassJsonMixin): """ Returned for the note being edited (locked) at the current moment. Information on the user editing the note Generated by Python OpenAPI Parser """ id: Optional[str] = None """ Internal identifier of the user editing the note """ class PatchNoteResponseStatus(Enum): """ Note publishing status. Any note is created in 'Draft' status. After it is posted it becomes 'Active' Generated by Python OpenAPI Parser """ Active = 'Active' Draft = 'Draft' class PatchNoteResponseType(Enum): Note = 'Note' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class PatchNoteResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a note """ title: Optional[str] = None """ Title of a note """ chat_ids: Optional[List[str]] = None """ Internal identifiers of the chat(s) where the note is posted or shared. """ preview: Optional[str] = None """ Preview of a note (first 150 characters of a body) """ creator: Optional[PatchNoteResponseCreator] = None """ Note creator information """ last_modified_by: Optional[PatchNoteResponseLastModifiedBy] = None """ Note last modification information """ locked_by: Optional[PatchNoteResponseLockedBy] = None """ Returned for the note being edited (locked) at the current moment. Information on the user editing the note """ status: Optional[PatchNoteResponseStatus] = None """ Note publishing status. Any note is created in 'Draft' status. After it is posted it becomes 'Active' """ creation_time: Optional[str] = None """ Creation time """ last_modified_time: Optional[str] = None """ Datetime of the note last update """ type: Optional[PatchNoteResponseType] = None class ListChatTasksStatusItem(Enum): Pending = 'Pending' InProgress = 'InProgress' Completed = 'Completed' class ListChatTasksAssignmentStatus(Enum): Unassigned = 'Unassigned' Assigned = 'Assigned' class ListChatTasksAssigneeStatus(Enum): Pending = 'Pending' Completed = 'Completed' class ListChatTasksResponseRecordsItemType(Enum): """ Type of a task """ Task = 'Task' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListChatTasksResponseRecordsItemCreator(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a user who created a note/task """ class ListChatTasksResponseRecordsItemStatus(Enum): """ Status of task execution """ Pending = 'Pending' InProgress = 'InProgress' Completed = 'Completed' class ListChatTasksResponseRecordsItemAssigneesItemStatus(Enum): """ Status of the task execution by assignee """ Pending = 'Pending' Completed = 'Completed' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListChatTasksResponseRecordsItemAssigneesItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an assignee """ status: Optional[ListChatTasksResponseRecordsItemAssigneesItemStatus] = None """ Status of the task execution by assignee """ class ListChatTasksResponseRecordsItemCompletenessCondition(Enum): """ Specifies how to determine task completeness """ Simple = 'Simple' AllAssignees = 'AllAssignees' Percentage = 'Percentage' class ListChatTasksResponseRecordsItemColor(Enum): """ Font color of a post with the current task """ Black = 'Black' Red = 'Red' Orange = 'Orange' Yellow = 'Yellow' Green = 'Green' Blue = 'Blue' Purple = 'Purple' Magenta = 'Magenta' class ListChatTasksResponseRecordsItemRecurrenceSchedule(Enum): """ Task recurrence settings. For non-periodic tasks the value is 'None' """ None_ = 'None' Daily = 'Daily' Weekdays = 'Weekdays' Weekly = 'Weekly' Monthly = 'Monthly' Yearly = 'Yearly' class ListChatTasksResponseRecordsItemRecurrenceEndingCondition(Enum): """ Task ending condition """ None_ = 'None' Count = 'Count' Date = 'Date' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListChatTasksResponseRecordsItemRecurrence(DataClassJsonMixin): schedule: Optional[ListChatTasksResponseRecordsItemRecurrenceSchedule] = None """ Task recurrence settings. For non-periodic tasks the value is 'None' """ ending_condition: Optional[ListChatTasksResponseRecordsItemRecurrenceEndingCondition] = None """ Task ending condition """ ending_after: Optional[int] = None """ Count of iterations of periodic tasks """ ending_on: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ End date of periodic task """ class ListChatTasksResponseRecordsItemAttachmentsItemType(Enum): """ Attachment type (currently only `File` value is supported). """ File = 'File' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListChatTasksResponseRecordsItemAttachmentsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a file """ type: Optional[ListChatTasksResponseRecordsItemAttachmentsItemType] = None """ Attachment type (currently only `File` value is supported). """ name: Optional[str] = None """ Name of the attached file (including extension name). """ content_uri: Optional[str] = None """ Link to an attachment content """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListChatTasksResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a task """ creation_time: Optional[str] = None """ Datetime of the task creation in UTC time zone. """ last_modified_time: Optional[str] = None """ Datetime of the last modification of the task in UTC time zone. """ type: Optional[ListChatTasksResponseRecordsItemType] = None """ Type of a task """ creator: Optional[ListChatTasksResponseRecordsItemCreator] = None chat_ids: Optional[List[str]] = None """ Chat IDs where the task is posted or shared. """ status: Optional[ListChatTasksResponseRecordsItemStatus] = None """ Status of task execution """ subject: Optional[str] = None """ Name/subject of a task """ assignees: Optional[List[ListChatTasksResponseRecordsItemAssigneesItem]] = None completeness_condition: Optional[ListChatTasksResponseRecordsItemCompletenessCondition] = None """ Specifies how to determine task completeness """ completeness_percentage: Optional[int] = None """ Current completeness percentage of the task with the specified percentage completeness condition """ start_date: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Task start date """ due_date: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Task due date/time """ color: Optional[ListChatTasksResponseRecordsItemColor] = None """ Font color of a post with the current task """ section: Optional[str] = None """ Task section to group/search by """ description: Optional[str] = None """ Task details """ recurrence: Optional[ListChatTasksResponseRecordsItemRecurrence] = None attachments: Optional[List[ListChatTasksResponseRecordsItemAttachmentsItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListChatTasksResponse(DataClassJsonMixin): records: Optional[List[ListChatTasksResponseRecordsItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateTaskRequestAssigneesItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an assignee """ class CreateTaskRequestCompletenessCondition(Enum): Simple = 'Simple' AllAssignees = 'AllAssignees' Percentage = 'Percentage' class CreateTaskRequestColor(Enum): Black = 'Black' Red = 'Red' Orange = 'Orange' Yellow = 'Yellow' Green = 'Green' Blue = 'Blue' Purple = 'Purple' Magenta = 'Magenta' class CreateTaskRequestRecurrenceSchedule(Enum): """ Task recurrence settings. For non-periodic tasks the value is 'None' """ None_ = 'None' Daily = 'Daily' Weekdays = 'Weekdays' Weekly = 'Weekly' Monthly = 'Monthly' Yearly = 'Yearly' class CreateTaskRequestRecurrenceEndingCondition(Enum): """ Task ending condition """ None_ = 'None' Count = 'Count' Date = 'Date' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateTaskRequestRecurrence(DataClassJsonMixin): schedule: Optional[CreateTaskRequestRecurrenceSchedule] = None """ Task recurrence settings. For non-periodic tasks the value is 'None' """ ending_condition: Optional[CreateTaskRequestRecurrenceEndingCondition] = None """ Task ending condition """ ending_after: Optional[int] = None """ Count of iterations of periodic tasks """ ending_on: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ End date of periodic task """ class CreateTaskRequestAttachmentsItemType(Enum): """ Type of an attachment """ Event = 'Event' File = 'File' Note = 'Note' Task = 'Task' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateTaskRequestAttachmentsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an attachment """ type: Optional[CreateTaskRequestAttachmentsItemType] = None """ Type of an attachment """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateTaskRequest(DataClassJsonMixin): """ Required Properties: - subject - assignees Generated by Python OpenAPI Parser """ subject: str """ Task name/subject. Max allowed length is 250 characters. """ assignees: List[CreateTaskRequestAssigneesItem] completeness_condition: Optional[CreateTaskRequestCompletenessCondition] = 'Simple' start_date: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Task start date in UTC time zone. """ due_date: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Task due date/time in UTC time zone. """ color: Optional[CreateTaskRequestColor] = 'Black' section: Optional[str] = None """ Task section to group / search by. Max allowed legth is 100 characters. """ description: Optional[str] = None """ Task details. Max allowed legth is 102400 characters (100kB). """ recurrence: Optional[CreateTaskRequestRecurrence] = None attachments: Optional[List[CreateTaskRequestAttachmentsItem]] = None class CreateTaskResponseType(Enum): """ Type of a task """ Task = 'Task' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateTaskResponseCreator(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a user who created a note/task """ class CreateTaskResponseStatus(Enum): """ Status of task execution """ Pending = 'Pending' InProgress = 'InProgress' Completed = 'Completed' class CreateTaskResponseAssigneesItemStatus(Enum): """ Status of the task execution by assignee """ Pending = 'Pending' Completed = 'Completed' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateTaskResponseAssigneesItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an assignee """ status: Optional[CreateTaskResponseAssigneesItemStatus] = None """ Status of the task execution by assignee """ class CreateTaskResponseCompletenessCondition(Enum): """ Specifies how to determine task completeness """ Simple = 'Simple' AllAssignees = 'AllAssignees' Percentage = 'Percentage' class CreateTaskResponseColor(Enum): """ Font color of a post with the current task """ Black = 'Black' Red = 'Red' Orange = 'Orange' Yellow = 'Yellow' Green = 'Green' Blue = 'Blue' Purple = 'Purple' Magenta = 'Magenta' class CreateTaskResponseRecurrenceSchedule(Enum): """ Task recurrence settings. For non-periodic tasks the value is 'None' """ None_ = 'None' Daily = 'Daily' Weekdays = 'Weekdays' Weekly = 'Weekly' Monthly = 'Monthly' Yearly = 'Yearly' class CreateTaskResponseRecurrenceEndingCondition(Enum): """ Task ending condition """ None_ = 'None' Count = 'Count' Date = 'Date' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateTaskResponseRecurrence(DataClassJsonMixin): schedule: Optional[CreateTaskResponseRecurrenceSchedule] = None """ Task recurrence settings. For non-periodic tasks the value is 'None' """ ending_condition: Optional[CreateTaskResponseRecurrenceEndingCondition] = None """ Task ending condition """ ending_after: Optional[int] = None """ Count of iterations of periodic tasks """ ending_on: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ End date of periodic task """ class CreateTaskResponseAttachmentsItemType(Enum): """ Attachment type (currently only `File` value is supported). """ File = 'File' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateTaskResponseAttachmentsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a file """ type: Optional[CreateTaskResponseAttachmentsItemType] = None """ Attachment type (currently only `File` value is supported). """ name: Optional[str] = None """ Name of the attached file (including extension name). """ content_uri: Optional[str] = None """ Link to an attachment content """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateTaskResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a task """ creation_time: Optional[str] = None """ Datetime of the task creation in UTC time zone. """ last_modified_time: Optional[str] = None """ Datetime of the last modification of the task in UTC time zone. """ type: Optional[CreateTaskResponseType] = None """ Type of a task """ creator: Optional[CreateTaskResponseCreator] = None chat_ids: Optional[List[str]] = None """ Chat IDs where the task is posted or shared. """ status: Optional[CreateTaskResponseStatus] = None """ Status of task execution """ subject: Optional[str] = None """ Name/subject of a task """ assignees: Optional[List[CreateTaskResponseAssigneesItem]] = None completeness_condition: Optional[CreateTaskResponseCompletenessCondition] = None """ Specifies how to determine task completeness """ completeness_percentage: Optional[int] = None """ Current completeness percentage of the task with the specified percentage completeness condition """ start_date: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Task start date """ due_date: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Task due date/time """ color: Optional[CreateTaskResponseColor] = None """ Font color of a post with the current task """ section: Optional[str] = None """ Task section to group/search by """ description: Optional[str] = None """ Task details """ recurrence: Optional[CreateTaskResponseRecurrence] = None attachments: Optional[List[CreateTaskResponseAttachmentsItem]] = None class ReadTaskResponseType(Enum): """ Type of a task """ Task = 'Task' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadTaskResponseCreator(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a user who created a note/task """ class ReadTaskResponseStatus(Enum): """ Status of task execution """ Pending = 'Pending' InProgress = 'InProgress' Completed = 'Completed' class ReadTaskResponseAssigneesItemStatus(Enum): """ Status of the task execution by assignee """ Pending = 'Pending' Completed = 'Completed' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadTaskResponseAssigneesItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an assignee """ status: Optional[ReadTaskResponseAssigneesItemStatus] = None """ Status of the task execution by assignee """ class ReadTaskResponseCompletenessCondition(Enum): """ Specifies how to determine task completeness """ Simple = 'Simple' AllAssignees = 'AllAssignees' Percentage = 'Percentage' class ReadTaskResponseColor(Enum): """ Font color of a post with the current task """ Black = 'Black' Red = 'Red' Orange = 'Orange' Yellow = 'Yellow' Green = 'Green' Blue = 'Blue' Purple = 'Purple' Magenta = 'Magenta' class ReadTaskResponseRecurrenceSchedule(Enum): """ Task recurrence settings. For non-periodic tasks the value is 'None' """ None_ = 'None' Daily = 'Daily' Weekdays = 'Weekdays' Weekly = 'Weekly' Monthly = 'Monthly' Yearly = 'Yearly' class ReadTaskResponseRecurrenceEndingCondition(Enum): """ Task ending condition """ None_ = 'None' Count = 'Count' Date = 'Date' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadTaskResponseRecurrence(DataClassJsonMixin): schedule: Optional[ReadTaskResponseRecurrenceSchedule] = None """ Task recurrence settings. For non-periodic tasks the value is 'None' """ ending_condition: Optional[ReadTaskResponseRecurrenceEndingCondition] = None """ Task ending condition """ ending_after: Optional[int] = None """ Count of iterations of periodic tasks """ ending_on: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ End date of periodic task """ class ReadTaskResponseAttachmentsItemType(Enum): """ Attachment type (currently only `File` value is supported). """ File = 'File' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadTaskResponseAttachmentsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a file """ type: Optional[ReadTaskResponseAttachmentsItemType] = None """ Attachment type (currently only `File` value is supported). """ name: Optional[str] = None """ Name of the attached file (including extension name). """ content_uri: Optional[str] = None """ Link to an attachment content """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadTaskResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a task """ creation_time: Optional[str] = None """ Datetime of the task creation in UTC time zone. """ last_modified_time: Optional[str] = None """ Datetime of the last modification of the task in UTC time zone. """ type: Optional[ReadTaskResponseType] = None """ Type of a task """ creator: Optional[ReadTaskResponseCreator] = None chat_ids: Optional[List[str]] = None """ Chat IDs where the task is posted or shared. """ status: Optional[ReadTaskResponseStatus] = None """ Status of task execution """ subject: Optional[str] = None """ Name/subject of a task """ assignees: Optional[List[ReadTaskResponseAssigneesItem]] = None completeness_condition: Optional[ReadTaskResponseCompletenessCondition] = None """ Specifies how to determine task completeness """ completeness_percentage: Optional[int] = None """ Current completeness percentage of the task with the specified percentage completeness condition """ start_date: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Task start date """ due_date: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Task due date/time """ color: Optional[ReadTaskResponseColor] = None """ Font color of a post with the current task """ section: Optional[str] = None """ Task section to group/search by """ description: Optional[str] = None """ Task details """ recurrence: Optional[ReadTaskResponseRecurrence] = None attachments: Optional[List[ReadTaskResponseAttachmentsItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class PatchTaskRequestAssigneesItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an assignee """ class PatchTaskRequestCompletenessCondition(Enum): Simple = 'Simple' AllAssignees = 'AllAssignees' Percentage = 'Percentage' class PatchTaskRequestColor(Enum): Black = 'Black' Red = 'Red' Orange = 'Orange' Yellow = 'Yellow' Green = 'Green' Blue = 'Blue' Purple = 'Purple' Magenta = 'Magenta' class PatchTaskRequestRecurrenceSchedule(Enum): """ Task recurrence settings. For non-periodic tasks the value is 'None' """ None_ = 'None' Daily = 'Daily' Weekdays = 'Weekdays' Weekly = 'Weekly' Monthly = 'Monthly' Yearly = 'Yearly' class PatchTaskRequestRecurrenceEndingCondition(Enum): """ Task ending condition """ None_ = 'None' Count = 'Count' Date = 'Date' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class PatchTaskRequestRecurrence(DataClassJsonMixin): schedule: Optional[PatchTaskRequestRecurrenceSchedule] = None """ Task recurrence settings. For non-periodic tasks the value is 'None' """ ending_condition: Optional[PatchTaskRequestRecurrenceEndingCondition] = None """ Task ending condition """ ending_after: Optional[int] = None """ Count of iterations of periodic tasks """ ending_on: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ End date of periodic task """ class PatchTaskRequestAttachmentsItemType(Enum): """ Type of an attachment """ Event = 'Event' File = 'File' Note = 'Note' Task = 'Task' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class PatchTaskRequestAttachmentsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an attachment """ type: Optional[PatchTaskRequestAttachmentsItemType] = None """ Type of an attachment """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class PatchTaskRequest(DataClassJsonMixin): subject: Optional[str] = None """ Task name/subject. Max allowed length is 250 characters. """ assignees: Optional[List[PatchTaskRequestAssigneesItem]] = None completeness_condition: Optional[PatchTaskRequestCompletenessCondition] = None start_date: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Task start date in UTC time zone """ due_date: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Task due date/time in UTC time zone """ color: Optional[PatchTaskRequestColor] = None section: Optional[str] = None """ Task section to group/search by. Max allowed legth is 100 characters """ description: Optional[str] = None """ Task details. Max allowed legth is 102400 characters (100kB) """ recurrence: Optional[PatchTaskRequestRecurrence] = None attachments: Optional[List[PatchTaskRequestAttachmentsItem]] = None class PatchTaskResponseRecordsItemType(Enum): """ Type of a task """ Task = 'Task' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class PatchTaskResponseRecordsItemCreator(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a user who created a note/task """ class PatchTaskResponseRecordsItemStatus(Enum): """ Status of task execution """ Pending = 'Pending' InProgress = 'InProgress' Completed = 'Completed' class PatchTaskResponseRecordsItemAssigneesItemStatus(Enum): """ Status of the task execution by assignee """ Pending = 'Pending' Completed = 'Completed' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class PatchTaskResponseRecordsItemAssigneesItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an assignee """ status: Optional[PatchTaskResponseRecordsItemAssigneesItemStatus] = None """ Status of the task execution by assignee """ class PatchTaskResponseRecordsItemCompletenessCondition(Enum): """ Specifies how to determine task completeness """ Simple = 'Simple' AllAssignees = 'AllAssignees' Percentage = 'Percentage' class PatchTaskResponseRecordsItemColor(Enum): """ Font color of a post with the current task """ Black = 'Black' Red = 'Red' Orange = 'Orange' Yellow = 'Yellow' Green = 'Green' Blue = 'Blue' Purple = 'Purple' Magenta = 'Magenta' class PatchTaskResponseRecordsItemRecurrenceSchedule(Enum): """ Task recurrence settings. For non-periodic tasks the value is 'None' """ None_ = 'None' Daily = 'Daily' Weekdays = 'Weekdays' Weekly = 'Weekly' Monthly = 'Monthly' Yearly = 'Yearly' class PatchTaskResponseRecordsItemRecurrenceEndingCondition(Enum): """ Task ending condition """ None_ = 'None' Count = 'Count' Date = 'Date' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class PatchTaskResponseRecordsItemRecurrence(DataClassJsonMixin): schedule: Optional[PatchTaskResponseRecordsItemRecurrenceSchedule] = None """ Task recurrence settings. For non-periodic tasks the value is 'None' """ ending_condition: Optional[PatchTaskResponseRecordsItemRecurrenceEndingCondition] = None """ Task ending condition """ ending_after: Optional[int] = None """ Count of iterations of periodic tasks """ ending_on: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ End date of periodic task """ class PatchTaskResponseRecordsItemAttachmentsItemType(Enum): """ Attachment type (currently only `File` value is supported). """ File = 'File' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class PatchTaskResponseRecordsItemAttachmentsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a file """ type: Optional[PatchTaskResponseRecordsItemAttachmentsItemType] = None """ Attachment type (currently only `File` value is supported). """ name: Optional[str] = None """ Name of the attached file (including extension name). """ content_uri: Optional[str] = None """ Link to an attachment content """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class PatchTaskResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a task """ creation_time: Optional[str] = None """ Datetime of the task creation in UTC time zone. """ last_modified_time: Optional[str] = None """ Datetime of the last modification of the task in UTC time zone. """ type: Optional[PatchTaskResponseRecordsItemType] = None """ Type of a task """ creator: Optional[PatchTaskResponseRecordsItemCreator] = None chat_ids: Optional[List[str]] = None """ Chat IDs where the task is posted or shared. """ status: Optional[PatchTaskResponseRecordsItemStatus] = None """ Status of task execution """ subject: Optional[str] = None """ Name/subject of a task """ assignees: Optional[List[PatchTaskResponseRecordsItemAssigneesItem]] = None completeness_condition: Optional[PatchTaskResponseRecordsItemCompletenessCondition] = None """ Specifies how to determine task completeness """ completeness_percentage: Optional[int] = None """ Current completeness percentage of the task with the specified percentage completeness condition """ start_date: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Task start date """ due_date: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Task due date/time """ color: Optional[PatchTaskResponseRecordsItemColor] = None """ Font color of a post with the current task """ section: Optional[str] = None """ Task section to group/search by """ description: Optional[str] = None """ Task details """ recurrence: Optional[PatchTaskResponseRecordsItemRecurrence] = None attachments: Optional[List[PatchTaskResponseRecordsItemAttachmentsItem]] = None @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class PatchTaskResponse(DataClassJsonMixin): records: Optional[List[PatchTaskResponseRecordsItem]] = None class CompleteTaskRequestStatus(Enum): """ Completeness status. 'Mandatory' if `completenessCondition` is set to `Simple`, otherwise 'Optional' Generated by Python OpenAPI Parser """ Incomplete = 'Incomplete' Complete = 'Complete' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CompleteTaskRequestAssigneesItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an assignee """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CompleteTaskRequest(DataClassJsonMixin): status: Optional[CompleteTaskRequestStatus] = None """ Completeness status. 'Mandatory' if `completenessCondition` is set to `Simple`, otherwise 'Optional' """ assignees: Optional[List[CompleteTaskRequestAssigneesItem]] = None completeness_percentage: Optional[int] = None """ Current completeness percentage of a task with the 'Percentage' completeness condition. 'Mandatory' if `completenessCondition` is set to `Percentage`, otherwise 'Optional' """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadGlipPersonResponse(DataClassJsonMixin): """ Required Properties: - id Generated by Python OpenAPI Parser """ id: str """ Internal identifier of a user """ first_name: Optional[str] = None """ First name of a user """ last_name: Optional[str] = None """ Last name of a user """ email: Optional[str] = None """ Email of a user """ avatar: Optional[str] = None """ Photo of a user """ company_id: Optional[str] = None """ Internal identifier of a company """ creation_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Time of creation in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format """ last_modified_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Time of the last modification in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadGlipCompanyResponse(DataClassJsonMixin): """ Required Properties: - id - creation_time - last_modified_time Generated by Python OpenAPI Parser """ id: str """ Internal identifier of an RC account/Glip company, or tilde (~) to indicate a company the current user belongs to """ creation_time: str """ Datetime of creation in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format """ last_modified_time: str """ Datetime of last modification in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format """ name: Optional[str] = None """ Name of a company """ domain: Optional[str] = None """ Domain name of a company """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadGlipCompanyResponse(DataClassJsonMixin): """ Required Properties: - id - creation_time - last_modified_time Generated by Python OpenAPI Parser """ id: str """ Internal identifier of an RC account/Glip company, or tilde (~) to indicate a company the current user belongs to """ creation_time: str """ Datetime of creation in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format """ last_modified_time: str """ Datetime of last modification in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format """ name: Optional[str] = None """ Name of a company """ domain: Optional[str] = None """ Domain name of a company """ class ListGlipGroupWebhooksResponseRecordsItemStatus(Enum): """ Current status of a webhook """ Active = 'Active' Suspended = 'Suspended' Deleted = 'Deleted' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListGlipGroupWebhooksResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a webhook """ creator_id: Optional[str] = None """ Internal identifier of the user who created a webhook """ group_ids: Optional[List[str]] = None """ Internal identifiers of groups where a webhook has been created """ creation_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Webhook creation time in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format """ last_modified_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Webhook last update time in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format """ uri: Optional[str] = None """ Public link to send a webhook payload """ status: Optional[ListGlipGroupWebhooksResponseRecordsItemStatus] = None """ Current status of a webhook """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListGlipGroupWebhooksResponse(DataClassJsonMixin): records: Optional[List[ListGlipGroupWebhooksResponseRecordsItem]] = None class CreateGlipGroupWebhookResponseStatus(Enum): """ Current status of a webhook """ Active = 'Active' Suspended = 'Suspended' Deleted = 'Deleted' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateGlipGroupWebhookResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a webhook """ creator_id: Optional[str] = None """ Internal identifier of the user who created a webhook """ group_ids: Optional[List[str]] = None """ Internal identifiers of groups where a webhook has been created """ creation_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Webhook creation time in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format """ last_modified_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Webhook last update time in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format """ uri: Optional[str] = None """ Public link to send a webhook payload """ status: Optional[CreateGlipGroupWebhookResponseStatus] = None """ Current status of a webhook """ class ListGlipWebhooksResponseRecordsItemStatus(Enum): """ Current status of a webhook """ Active = 'Active' Suspended = 'Suspended' Deleted = 'Deleted' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListGlipWebhooksResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a webhook """ creator_id: Optional[str] = None """ Internal identifier of the user who created a webhook """ group_ids: Optional[List[str]] = None """ Internal identifiers of groups where a webhook has been created """ creation_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Webhook creation time in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format """ last_modified_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Webhook last update time in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format """ uri: Optional[str] = None """ Public link to send a webhook payload """ status: Optional[ListGlipWebhooksResponseRecordsItemStatus] = None """ Current status of a webhook """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListGlipWebhooksResponse(DataClassJsonMixin): records: Optional[List[ListGlipWebhooksResponseRecordsItem]] = None class ListGlipWebhooksResponseRecordsItemStatus(Enum): """ Current status of a webhook """ Active = 'Active' Suspended = 'Suspended' Deleted = 'Deleted' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListGlipWebhooksResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a webhook """ creator_id: Optional[str] = None """ Internal identifier of the user who created a webhook """ group_ids: Optional[List[str]] = None """ Internal identifiers of groups where a webhook has been created """ creation_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Webhook creation time in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format """ last_modified_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Webhook last update time in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format """ uri: Optional[str] = None """ Public link to send a webhook payload """ status: Optional[ListGlipWebhooksResponseRecordsItemStatus] = None """ Current status of a webhook """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListGlipWebhooksResponse(DataClassJsonMixin): records: Optional[List[ListGlipWebhooksResponseRecordsItem]] = None class ReadGlipWebhookResponseRecordsItemStatus(Enum): """ Current status of a webhook """ Active = 'Active' Suspended = 'Suspended' Deleted = 'Deleted' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadGlipWebhookResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a webhook """ creator_id: Optional[str] = None """ Internal identifier of the user who created a webhook """ group_ids: Optional[List[str]] = None """ Internal identifiers of groups where a webhook has been created """ creation_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Webhook creation time in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format """ last_modified_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Webhook last update time in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format """ uri: Optional[str] = None """ Public link to send a webhook payload """ status: Optional[ReadGlipWebhookResponseRecordsItemStatus] = None """ Current status of a webhook """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadGlipWebhookResponse(DataClassJsonMixin): records: Optional[List[ReadGlipWebhookResponseRecordsItem]] = None class ReadGlipPreferencesResponseChatsLeftRailMode(Enum): SeparateAllChatTypes = 'SeparateAllChatTypes' SeparateConversationsAndTeams = 'SeparateConversationsAndTeams' CombineAllChatTypes = 'CombineAllChatTypes' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadGlipPreferencesResponseChats(DataClassJsonMixin): max_count: Optional[int] = 10 left_rail_mode: Optional[ReadGlipPreferencesResponseChatsLeftRailMode] = 'CombineAllChatTypes' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadGlipPreferencesResponse(DataClassJsonMixin): chats: Optional[ReadGlipPreferencesResponseChats] = None class ListGlipGroupsType(Enum): Group = 'Group' Team = 'Team' PrivateChat = 'PrivateChat' PersonalChat = 'PersonalChat' class ListGlipGroupsResponseRecordsItemType(Enum): """ Type of a group. 'PrivateChat' is a group of 2 members. 'Group' is a chat of 2 and more participants, the membership cannot be changed after group creation. 'Team' is a chat of 1 and more participants, the membership can be modified in future. 'PersonalChat' is a private chat thread of a user Generated by Python OpenAPI Parser """ PrivateChat = 'PrivateChat' Group = 'Group' Team = 'Team' PersonalChat = 'PersonalChat' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListGlipGroupsResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a group """ type: Optional[ListGlipGroupsResponseRecordsItemType] = None """ Type of a group. 'PrivateChat' is a group of 2 members. 'Group' is a chat of 2 and more participants, the membership cannot be changed after group creation. 'Team' is a chat of 1 and more participants, the membership can be modified in future. 'PersonalChat' is a private chat thread of a user """ is_public: Optional[bool] = None """ For 'Team' group type only. Team access level """ name: Optional[str] = None """ For 'Team' group type only. Team name """ description: Optional[str] = None """ For 'Team' group type only. Team description """ members: Optional[List[str]] = None """ “List of glip members” """ creation_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Group creation datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format """ last_modified_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Group last change datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListGlipGroupsResponseNavigation(DataClassJsonMixin): prev_page_token: Optional[str] = None """ Previous page token. To get previous page, user should pass one of returned token in next request and, in turn, required page will be returned with new tokens """ next_page_token: Optional[str] = None """ Next page token. To get next page, user should pass one of returned token in next request and, in turn, required page will be returned with new tokens """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListGlipGroupsResponse(DataClassJsonMixin): """ Required Properties: - records Generated by Python OpenAPI Parser """ records: List[ListGlipGroupsResponseRecordsItem] """ List of groups/teams/private chats """ navigation: Optional[ListGlipGroupsResponseNavigation] = None class CreateGlipGroupRequestType(Enum): """ Type of a group to be created. 'PrivateChat' is a group of 2 members. 'Team' is a chat of 1 and more participants, the membership can be modified in future. 'PersonalChat' is a private chat thread of a user Generated by Python OpenAPI Parser """ PrivateChat = 'PrivateChat' Team = 'Team' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateGlipGroupRequestMembersItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a user """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateGlipGroupRequest(DataClassJsonMixin): """ Required Properties: - type Generated by Python OpenAPI Parser """ type: CreateGlipGroupRequestType """ Type of a group to be created. 'PrivateChat' is a group of 2 members. 'Team' is a chat of 1 and more participants, the membership can be modified in future. 'PersonalChat' is a private chat thread of a user """ is_public: Optional[bool] = None """ For 'Team' group type only. Team access level """ name: Optional[str] = None """ For 'Team' group type only. Team name """ description: Optional[str] = None """ For 'Team' group type only. Team description """ members: Optional[List[CreateGlipGroupRequestMembersItem]] = None """ “List of glip members. For 'PrivateChat' group type 2 members only are supported” """ class CreateGlipGroupResponseType(Enum): """ Type of a group. 'PrivateChat' is a group of 2 members. 'Group' is a chat of 2 and more participants, the membership cannot be changed after group creation. 'Team' is a chat of 1 and more participants, the membership can be modified in future. 'PersonalChat' is a private chat thread of a user Generated by Python OpenAPI Parser """ PrivateChat = 'PrivateChat' Group = 'Group' Team = 'Team' PersonalChat = 'PersonalChat' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class CreateGlipGroupResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a group """ type: Optional[CreateGlipGroupResponseType] = None """ Type of a group. 'PrivateChat' is a group of 2 members. 'Group' is a chat of 2 and more participants, the membership cannot be changed after group creation. 'Team' is a chat of 1 and more participants, the membership can be modified in future. 'PersonalChat' is a private chat thread of a user """ is_public: Optional[bool] = None """ For 'Team' group type only. Team access level """ name: Optional[str] = None """ For 'Team' group type only. Team name """ description: Optional[str] = None """ For 'Team' group type only. Team description """ members: Optional[List[str]] = None """ “List of glip members” """ creation_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Group creation datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format """ last_modified_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Group last change datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format """ class ReadGlipGroupResponseType(Enum): """ Type of a group. 'PrivateChat' is a group of 2 members. 'Group' is a chat of 2 and more participants, the membership cannot be changed after group creation. 'Team' is a chat of 1 and more participants, the membership can be modified in future. 'PersonalChat' is a private chat thread of a user Generated by Python OpenAPI Parser """ PrivateChat = 'PrivateChat' Group = 'Group' Team = 'Team' PersonalChat = 'PersonalChat' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadGlipGroupResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a group """ type: Optional[ReadGlipGroupResponseType] = None """ Type of a group. 'PrivateChat' is a group of 2 members. 'Group' is a chat of 2 and more participants, the membership cannot be changed after group creation. 'Team' is a chat of 1 and more participants, the membership can be modified in future. 'PersonalChat' is a private chat thread of a user """ is_public: Optional[bool] = None """ For 'Team' group type only. Team access level """ name: Optional[str] = None """ For 'Team' group type only. Team name """ description: Optional[str] = None """ For 'Team' group type only. Team description """ members: Optional[List[str]] = None """ “List of glip members” """ creation_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Group creation datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format """ last_modified_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Group last change datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format """ class ReadGlipGroupResponseType(Enum): """ Type of a group. 'PrivateChat' is a group of 2 members. 'Group' is a chat of 2 and more participants, the membership cannot be changed after group creation. 'Team' is a chat of 1 and more participants, the membership can be modified in future. 'PersonalChat' is a private chat thread of a user Generated by Python OpenAPI Parser """ PrivateChat = 'PrivateChat' Group = 'Group' Team = 'Team' PersonalChat = 'PersonalChat' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ReadGlipGroupResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a group """ type: Optional[ReadGlipGroupResponseType] = None """ Type of a group. 'PrivateChat' is a group of 2 members. 'Group' is a chat of 2 and more participants, the membership cannot be changed after group creation. 'Team' is a chat of 1 and more participants, the membership can be modified in future. 'PersonalChat' is a private chat thread of a user """ is_public: Optional[bool] = None """ For 'Team' group type only. Team access level """ name: Optional[str] = None """ For 'Team' group type only. Team name """ description: Optional[str] = None """ For 'Team' group type only. Team description """ members: Optional[List[str]] = None """ “List of glip members” """ creation_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Group creation datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format """ last_modified_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Group last change datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AssignGlipGroupMembersRequest(DataClassJsonMixin): added_person_ids: Optional[List[str]] = None """ List of users to be added to a team """ added_person_emails: Optional[List[str]] = None """ List of user email addresses to be added to a team (i.e. as guests) """ removed_person_ids: Optional[List[str]] = None """ List of users to be removed from a team """ class AssignGlipGroupMembersResponseType(Enum): """ Type of a group. 'PrivateChat' is a group of 2 members. 'Group' is a chat of 2 and more participants, the membership cannot be changed after group creation. 'Team' is a chat of 1 and more participants, the membership can be modified in future. 'PersonalChat' is a private chat thread of a user Generated by Python OpenAPI Parser """ PrivateChat = 'PrivateChat' Group = 'Group' Team = 'Team' PersonalChat = 'PersonalChat' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class AssignGlipGroupMembersResponse(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a group """ type: Optional[AssignGlipGroupMembersResponseType] = None """ Type of a group. 'PrivateChat' is a group of 2 members. 'Group' is a chat of 2 and more participants, the membership cannot be changed after group creation. 'Team' is a chat of 1 and more participants, the membership can be modified in future. 'PersonalChat' is a private chat thread of a user """ is_public: Optional[bool] = None """ For 'Team' group type only. Team access level """ name: Optional[str] = None """ For 'Team' group type only. Team name """ description: Optional[str] = None """ For 'Team' group type only. Team description """ members: Optional[List[str]] = None """ “List of glip members” """ creation_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Group creation datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format """ last_modified_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Group last change datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format """ class ListGlipPostsResponseRecordsItemType(Enum): """ Type of a post """ TextMessage = 'TextMessage' PersonJoined = 'PersonJoined' PersonsAdded = 'PersonsAdded' class ListGlipPostsResponseRecordsItemAttachmentsItemType(Enum): """ Type of an attachment """ Card = 'Card' Event = 'Event' Note = 'Note' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListGlipPostsResponseRecordsItemAttachmentsItemAuthor(DataClassJsonMixin): """ Information about the author """ name: Optional[str] = None """ Name of a message author """ uri: Optional[str] = None """ Link to an author's name """ icon_uri: Optional[str] = None """ Link to an image displayed to the left of an author's name; sized 82x82px """ class ListGlipPostsResponseRecordsItemAttachmentsItemFieldsItemStyle(Enum): """ Style of width span applied to a field """ Short = 'Short' Long = 'Long' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListGlipPostsResponseRecordsItemAttachmentsItemFieldsItem(DataClassJsonMixin): title: Optional[str] = None """ Title of an individual field """ value: Optional[str] = None """ Value of an individual field (supports Markdown) """ style: Optional[ListGlipPostsResponseRecordsItemAttachmentsItemFieldsItemStyle] = 'Short' """ Style of width span applied to a field """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListGlipPostsResponseRecordsItemAttachmentsItemFootnote(DataClassJsonMixin): """ Message Footer """ text: Optional[str] = None """ Text of a footer """ icon_uri: Optional[str] = None """ Link to an icon displayed to the left of a footer; sized 32x32px """ time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Message creation datetime in ISO 8601 format including timezone, for example *2016-03-10T18:07:52.534Z* """ class ListGlipPostsResponseRecordsItemAttachmentsItemRecurrence(Enum): """ Event recurrence settings. """ None_ = 'None' Day = 'Day' Weekday = 'Weekday' Week = 'Week' Month = 'Month' Year = 'Year' class ListGlipPostsResponseRecordsItemAttachmentsItemEndingOn(Enum): """ Iterations end datetime for periodic events """ None_ = 'None' Count = 'Count' Date = 'Date' class ListGlipPostsResponseRecordsItemAttachmentsItemColor(Enum): """ Color of Event title, including its presentation in Calendar; or the color of the side border of an interactive message of a Card Generated by Python OpenAPI Parser """ Black = 'Black' Red = 'Red' Orange = 'Orange' Yellow = 'Yellow' Green = 'Green' Blue = 'Blue' Purple = 'Purple' Magenta = 'Magenta' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListGlipPostsResponseRecordsItemAttachmentsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of an attachment """ type: Optional[ListGlipPostsResponseRecordsItemAttachmentsItemType] = 'Card' """ Type of an attachment """ fallback: Optional[str] = None """ A string of default text that will be rendered in the case that the client does not support Interactive Messages """ intro: Optional[str] = None """ A pretext to the message """ author: Optional[ListGlipPostsResponseRecordsItemAttachmentsItemAuthor] = None """ Information about the author """ title: Optional[str] = None """ Message title """ text: Optional[str] = None """ A large string field (up to 1000 chars) to be displayed as the body of a message (Supports GlipDown) """ image_uri: Optional[str] = None """ Link to an image displayed at the bottom of a message """ thumbnail_uri: Optional[str] = None """ Link to an image preview displayed to the right of a message (82x82) """ fields: Optional[List[ListGlipPostsResponseRecordsItemAttachmentsItemFieldsItem]] = None """ Information on navigation """ footnote: Optional[ListGlipPostsResponseRecordsItemAttachmentsItemFootnote] = None """ Message Footer """ creator_id: Optional[str] = None """ Internal identifier of a person created an event """ start_time: Optional[str] = None """ Datetime of starting an event """ end_time: Optional[str] = None """ Datetime of ending an event """ all_day: Optional[bool] = False """ Indicates whether an event has some specific time slot or lasts for the whole day(s) """ recurrence: Optional[ListGlipPostsResponseRecordsItemAttachmentsItemRecurrence] = None """ Event recurrence settings. """ ending_condition: Optional[str] = None """ Condition of ending """ ending_after: Optional[int] = None """ Count of iterations. For periodic events only """ ending_on: Optional[ListGlipPostsResponseRecordsItemAttachmentsItemEndingOn] = 'None' """ Iterations end datetime for periodic events """ color: Optional[ListGlipPostsResponseRecordsItemAttachmentsItemColor] = 'Black' """ Color of Event title, including its presentation in Calendar; or the color of the side border of an interactive message of a Card """ location: Optional[str] = None """ Event location """ description: Optional[str] = None """ Event details """ class ListGlipPostsResponseRecordsItemMentionsItemType(Enum): """ Type of mentions """ Person = 'Person' Team = 'Team' File = 'File' Link = 'Link' Event = 'Event' Task = 'Task' Note = 'Note' Card = 'Card' @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListGlipPostsResponseRecordsItemMentionsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a user """ type: Optional[ListGlipPostsResponseRecordsItemMentionsItemType] = None """ Type of mentions """ name: Optional[str] = None """ Name of a user """ @dataclass_json(letter_case=LetterCase.CAMEL) @dataclass class ListGlipPostsResponseRecordsItem(DataClassJsonMixin): id: Optional[str] = None """ Internal identifier of a post """ group_id: Optional[str] = None """ Internal identifier of a group a post belongs to """ type: Optional[ListGlipPostsResponseRecordsItemType] = None """ Type of a post """ text: Optional[str] = None """ For 'TextMessage' post type only. Text of a message """ creator_id: Optional[str] = None """ Internal identifier of a user - author of a post """ added_person_ids: Optional[List[str]] = None """ For 'PersonsAdded' post type only. Identifiers of persons added to a group """ creation_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Post creation datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format """ last_modified_time: Optional[datetime] = field(metadata=config(encoder=datetime.isoformat, decoder=datetime_decoder(datetime)), default=None) """ Post last modification datetime in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format """ attachments: Optional[List[ListGlipPostsResponseRecordsItemAttachmentsItem]] = None """ List of posted attachments """ mentions: Optional[List[ListGlipPostsResponseRecordsItemMentionsItem]] = None activity: Optional[str] = None """ Label of activity type """ title: Optional[str] = None """ Title of a message. (Can be set for bot's messages only) """ icon_uri: Optional[str] = None """ Link to an image used as an icon for this message """ icon_emoji: Optional[str] = None """ Emoji used as an icon for this message """
/ringcentral_async_client-1.0.3-py3-none-any.whl/ringcentral_async_client/_code_gen/model/_8.py
0.760651
0.300177
_8.py
pypi
# [RingCentral chatbot framework for Python](https://github.com/ringcentral/ringcentral-chatbot-python) <!-- omit in toc --> [![Build Status](https://travis-ci.org/ringcentral/ringcentral-chatbot-python.svg?branch=test)](https://travis-ci.org/ringcentral/ringcentral-chatbot-python) Welcome to the RingCentral Chatbot Framework for Python. This framework dramatically simplifies the process of building a bot to work with Glip, RingCentral's group chat system. It is intended to do most of the heavy lifting for developers, allowing them to focus primarily on the logic and user experience of their bot. ## Features - **Token Management** - handles the server logic associated with bot authentication, and auth token persistence - **Event Subscribtion** - automatically subscribes to bot events, and renews those subscriptions when they expire - **Easy Customization** - modify bot behaviors by editing `bot.py` - **Data Persistence** - built-in suport for filedb and AWS dynamodb, with fully customizable DB layer - **Turn-key hosting** - built-in suport for AWS lambda to host your bot ## Getting Started Let's get a local chatbot server up and running so that you can understand how the framework functions. Our first chatbot will be a simple parrot bot that will repeat things back to you. Before we get started, let's get your development environment setup with everything you need. ### Install Prerequisites This framework requires Python3.6+ and Pip3. First we install [virtualenv](https://virtualenv.pypa.io/en/latest/) which will create an isolated environment in which to install and run all the python libraries needed by this framework. Using virtualenv will ensure that the libraries installed for this project do not conflict or disrupt the other python projects you are working on. ```bash # init project bin/init source venv/bin/activate ``` Next, we need to run [ngrok](https://ngrok.com/), a tool for routing web requests to a localhost. This is what will allow your local bot in development to receive webhooks from RingCentral. ngrok is a node app and is installed and start as follows: ```bash ./bin/proxy ``` After ngrok has started, it will display the URL when the ngrok proxy is operating. It will say something like: ```Forwarding https://xxxxx.ngrok.io -> localhost:9898``` Make note of this URL, as you will need it in the next step. ### Create Your Bot App You will need to create your Bot App in RingCentral. Clicking the link, "Create Bot App" below will do this for you. Remember to select `messagging bot` bot and for `All RingCentral customers`, When you click it, you will to enter in the `OAuth Redirect URI ` for the bot. This will be the ngrok URL above, plus `/bot-oauth`. For example: https://xxxxxx.ngrok.io/bot-oauth [Create Bot App](https://developer.ringcentral.com/new-app?name=Sample+Bot+App&desc=A+sample+app+created+in+conjunction+with+the+python+bot+framework&public=true&type=ServerBot&carriers=7710,7310,3420&permissions=ReadAccounts,EditExtensions,SubscriptionWebhook,Glip&redirectUri=) When you are finished creating your Bot Application, make note of the Client ID and Client Secret. We will use those values in the next step. ### Edit .env A sample .env file can be found in `.env.sample`. Create a copy of this file: ```bash cp .sample.env .env ``` Then look for the following variables, and set them accordingly: - `RINGCENTRAL_BOT_SERVER` - `RINGCENTRAL_BOT_CLIENT_ID` - `RINGCENTRAL_BOT_CLIENT_SECRET` ### Install Bot Behaviors This bot framework loads all bot behaviors from a file called `config.py`. Let's copy the parrot bot config to get started. ```bash cp sample-bots/parrot.py ./bot.py ``` ### Start the Server ```bash # rcs is cli server module from ringcentral_chatbot_server rcs bot.py ``` ### Add Bot to Glip When the server is up and running, you can add the bot to your sandbox Glip account. Navigate the dashboard for the app you created above. Select "Bot" from the left-hand sidebar menu. Save a preferred name for your bot, then click the "Add to Glip" button. ### Send a Test Message After the bot is added, we can message with it. Login to our [sandbox Glip](https://glip.devtest.ringcentral.com). Then start a chat with the bot using the name you chose in the previous step. You should now be in private chat session with the bot. It should greet you with a message similar to: > Hello, I am a chatbot. Please reply "ParrotBot" if you want to talk to me. Type `@ParrotBot Polly want a cracker?` and let's see what happens. ## Quick start: Init a bot project with one line script Now you know how it works, you may try to init a bot project in one line script: ```bash # make sure you have python3.6+ and pip3 installed # use wget wget -qO- https://raw.githubusercontent.com/ringcentral/ringcentral-chatbot-factory-py/master/bin/init.sh | bash # or with curl curl -o- https://raw.githubusercontent.com/ringcentral/ringcentral-chatbot-factory-py/master/bin/init.sh | bash ``` A video to show the process: [https://youtu.be/x5sTrj5xSN8](https://youtu.be/x5sTrj5xSN8) ## Example bot apps The following bots were created using this framework, and should serves as guides as you develop your own original bot. - [date-time-chatbot](https://github.com/zxdong262/ringcentral-date-time-chatbot): simple Glip chatbot that can tell time/date. - [assistant-bot](https://github.com/zxdong262/ringcentral-assistant-bot): simple assistant Glip bot to show user/company information, this bot will show you how to access user data. - [poll-bot](https://github.com/zxdong262/ringcentral-poll-bot): Glip poll bot, this bot will show you how to create/use custom database wrapper. - [translate-bot](https://github.com/zxdong262/ringcentral-translate-bot): translate bot for glip. - [welcome-bot](https://github.com/zxdong262/ringcentral-welcome-bot-py): Glip chatbot to welcome new team member. - [at-all-bot](https://github.com/zxdong262/ringcentral-at-all-bot): Add AT all function to glip with this bot. ## Advanced Topics ### Adaptive cards support Check [sample-bots/parrot-adaptive-card.py](sample-bots/parrot-adaptive-card.py) as an example, - Use `bot.sendAdaptiveCard` to send AdaptiveCard - Use `bot.updateAdaptiveCard` to update AdaptiveCard ### Interactive message Since we support `adaptive cards`, we also support interactive messages when using adaptive cards actions, so bot can get interactive messages directly from user actions, you need goto app setting page in `developer.ringcentral.com`, enable `Interactive Messages`, and set `https://xxxxx.ngrok.io/interactive` as `Outbound Webhook URL` Check [sample-bots/interactive.py](sample-bots/interactive.py) as an example, define your own `onInteractiveMessage` function to handle interative messages. ### Hidden commands - Post message `@Bot __rename__ newName` to rename bot to `newName` - Post message `@Bot __setAvatar__` and image attachment to set bot profile image. ### Use CLI tool to create a bot app The [ringcentral-chatbot-factory-py](https://github.com/ringcentral/ringcentral-chatbot-factory-py) was created to help speed up the process of creating additional Glip bots. To use it, install it, then run the `rcf` command as shown below: ```bash pip3 install ringcentral_chatbot_factory rcf my-ringcentral-chat-bot ``` Then just answer the prompts. Then follow the directions in `my-ringcentral-chat-bot/README.md` to get up and running. ![ ](https://github.com/ringcentral/ringcentral-chatbot-factory-py/raw/master/screenshots/cli.png) - [Deploy to AWS Lambda](docs/deploy-to-aws-lambda.md) - [Use or write extensions](docs/extensions.md) - [Direct Use](docs/use.md) ## Unit Test ```bash bin/test ``` ## Todos Visit [https://github.com/zxdong262/ringcentral-chatbot-python/issues](https://github.com/zxdong262/ringcentral-chatbot-python/issues) ## Credits The core bot framework logic is implanted from [ringcentral-ai-bot](https://github.com/ringcentral-tutorials/ringcentral-ai-bot) written by [@tylerlong](https://github.com/tylerlong) ## License MIT
/ringcentral_bot_framework-0.7.2.tar.gz/ringcentral_bot_framework-0.7.2/README.md
0.62395
0.933249
README.md
pypi
# ringcentral-python RingCentral Python Client library Only Python 3.x is supported. ## Getting help and support If you are having difficulty using this SDK, or working with the RingCentral API, please visit our [developer community forums](https://community.ringcentral.com/spaces/144/) for help and to get quick answers to your questions. If you wish to contact the RingCentral Developer Support team directly, please [submit a help ticket](https://developers.ringcentral.com/support/create-case) from our developer website. ## Installation ``` pip install ringcentral_client ``` ## Documentation https://developer.ringcentral.com/api-docs/latest/index.html ## Usage ### For sandbox ```python from ringcentral_client import RestClient, SANDBOX_SERVER rc = RestClient(clientId, clientSecret, SANDBOX_SERVER) ``` `SANDBOX_SERVER` is a string constant for `https://platform.devtest.ringcentral.com`. ### For production ```python from ringcentral_client import RestClient, PRODUCTION_SERVER rc = RestClient(clientId, clientSecret, PRODUCTION_SERVER) ``` `PRODUCTION_SERVER` is a string constant for `https://platform.ringcentral.com`. ### Authorization ```python r = rc.authorize(username, extension, password) print 'authorized' r = rc.refresh() print 'refreshed' r = rc.revoke() print 'revoked' ``` ### Authorization Refresh If you want the SDK to refresh authroization automatically, you can `rc.auto_refresh = True`. If you do so, authorization is refreshed 2 minutes before it expires. **Don't forget** to call `rc.revoke()` when you are done. Otherwise your app won't quit because there is a background timer running. ### HTTP Requets ```python # GET r = rc.get('/restapi/v1.0/account/~/extension/~') print r.text # POST r = rc.post('/restapi/v1.0/account/~/extension/~/sms', { 'to': [{'phoneNumber': receiver}], 'from': {'phoneNumber': username}, 'text': 'Hello world'}) print r.text # PUT r = rc.get('/restapi/v1.0/account/~/extension/~/message-store', { 'direction': 'Outbound' }) message_id = r.json()['records'][0]['id'] r = rc.put('/restapi/v1.0/account/~/extension/~/message-store/{message_id}'.format(message_id = message_id), { 'readStatus': 'Read' }) print r.text # DELETE r = rc.post('/restapi/v1.0/account/~/extension/~/sms', { 'to': [{ 'phoneNumber': receiver }], 'from': { 'phoneNumber': username }, 'text': 'Hello world'}) message_id = r.json()['id'] r = rc.delete('/restapi/v1.0/account/~/extension/~/message-store/{message_id}'.format(message_id = message_id), { 'purge': False }) print r.status_code ``` ### Send fax ```python with open(os.path.join(os.path.dirname(__file__), 'test.png'), 'rb') as image_file: files = [ ('json', ('request.json', json.dumps({ 'to': [{ 'phoneNumber': receiver }] }), 'application/json')), ('attachment', ('test.txt', 'Hello world', 'text/plain')), ('attachment', ('test.png', image_file, 'image/png')), ] r = rc.post('/restapi/v1.0/account/~/extension/~/fax', files = files) print r.status_code ``` ### Send MMS ```python params = { 'to': [{'phoneNumber': receiver}], 'from': {'phoneNumber': username}, 'text': 'Hello world' } with open(os.path.join(os.path.dirname(__file__), 'test.png'), 'rb') as image_file: files = [ ('json', ('request.json', json.dumps(params), 'application/json')), ('attachment', ('test.png', image_file, 'image/png')), ] r = rc.post('/restapi/v1.0/account/~/extension/~/sms', params, files = files) print r.status_code ``` ### Sample code for binary downloading and uploading ```python # Upload with open(os.path.join(os.path.dirname(__file__), 'test.png'), 'rb') as image_file: files = {'image': ('test.png', image_file, 'image/png')} r = rc.post('/restapi/v1.0/account/~/extension/~/profile-image', files = files) # Download r = rc.get('/restapi/v1.0/account/~/extension/~/profile-image') # r.content is the downloaded binary ``` ## Authorization Code Flow (3-legged authorization flow) Please read the official documentation if you don't already know what is [Authorization Code Flow](http://ringcentral-api-docs.readthedocs.io/en/latest/oauth/#authorization-code-flow). ### Step 1: build the authorize uri ```python uri = rc.authorize_uri('http://example.com/callback', 'state') ``` ### Step 2: redirect user to `uri` User will be prompted to login RingCentral and authorize your app. If everything goes well, user will be redirect to `http://example.com/callback?code=<auth_code>`. ### Step 3: extract auth_code `http://example.com/callback?code=<auth_code>` Extract `auth_code` from redirected url. ### Step 4: authorize ```python rc.authorize(auth_code = auth_code, redirect_uri = 'http://example.com/callback') ``` ## More sample code Please refer to the [test cases](https://github.com/tylerlong/ringcentral-python/tree/master/test). ## Add access token to URL For example, for voicemail MP3, you will get a content URL like the following in extension/message-store response: ``` https://media.ringcentral.com/restapi/v1.0/account/1111/extension/2222/message-store/3333/content/4444 ``` You can add access token to the URL: ``` https://media.ringcentral.com/restapi/v1.0/account/1111/extension/2222/message-store/3333/content/4444?access_token=<theAccessToken> ``` This is mostly for embedding into sites like Glip temporarily or for sending to VoiceBase, etc. ## License MIT
/ringcentral_client-0.7.0.tar.gz/ringcentral_client-0.7.0/README.md
0.405096
0.720909
README.md
pypi
# ringcentral-python [![Build status](https://api.travis-ci.org/tylerlong/ringcentral-python.svg?branch=master)](https://travis-ci.org/tylerlong/ringcentral-python) [![Coverage Status](https://coveralls.io/repos/github/tylerlong/ringcentral-python/badge.svg?branch=master)](https://coveralls.io/github/tylerlong/ringcentral-python?branch=master) RingCentral Python Client library Both Python 2.x and Python 3.x are supported. ## Installation ``` pip install ringcentral_client ``` ## Documentation https://developer.ringcentral.com/api-docs/latest/index.html ## Usage ### For sandbox ```python from ringcentral_client import RestClient, SANDBOX_SERVER rc = RestClient(clientId, clientSecret, SANDBOX_SERVER) ``` `SANDBOX_SERVER` is a string constant for `https://platform.devtest.ringcentral.com`. ### For production ```python from ringcentral_client import RestClient, PRODUCTION_SERVER rc = RestClient(clientId, clientSecret, PRODUCTION_SERVER) ``` `PRODUCTION_SERVER` is a string constant for `https://platform.ringcentral.com`. ### Authorization ```python r = rc.authorize(username, extension, password) print 'authorized' r = rc.refresh() print 'refreshed' r = rc.revoke() print 'revoked' ``` ### Authorization Refresh If you want the SDK to refresh authroization automatically, you can `rc.auto_refresh = True`. If you do so, authorization is refreshed 2 minutes before it expires. **Don't forget** to call `rc.revoke()` when you are done. Otherwise your app won't quit because there is a background timer running. ### HTTP Requets ```python # GET r = rc.get('/restapi/v1.0/account/~/extension/~') print r.text # POST r = rc.post('/restapi/v1.0/account/~/extension/~/sms', { 'to': [{'phoneNumber': receiver}], 'from': {'phoneNumber': username}, 'text': 'Hello world'}) print r.text # PUT r = rc.get('/restapi/v1.0/account/~/extension/~/message-store', { 'direction': 'Outbound' }) message_id = r.json()['records'][0]['id'] r = rc.put('/restapi/v1.0/account/~/extension/~/message-store/{message_id}'.format(message_id = message_id), { 'readStatus': 'Read' }) print r.text # DELETE r = rc.post('/restapi/v1.0/account/~/extension/~/sms', { 'to': [{ 'phoneNumber': receiver }], 'from': { 'phoneNumber': username }, 'text': 'Hello world'}) message_id = r.json()['id'] r = rc.delete('/restapi/v1.0/account/~/extension/~/message-store/{message_id}'.format(message_id = message_id), { 'purge': False }) print r.status_code ``` ### PubNub subscription ```python from ringcentral_client import PubNub def message_callback(message): print message # subscribe events = ['/restapi/v1.0/account/~/extension/~/message-store'] subscription = PubNub(rc, events, message_callback) subscription.subscribe() # refresh # Please note that subscription auto refreshes itself # so most likely you don't need to refresh it manually subscription.refresh() # revoke # Once you no longer need this subscription, don't forget to revoke it subscription.revoke() ``` ### Send fax ```python with open(os.path.join(os.path.dirname(__file__), 'test.png'), 'rb') as image_file: files = [ ('json', ('request.json', json.dumps({ 'to': [{ 'phoneNumber': receiver }] }), 'application/json')), ('attachment', ('test.txt', 'Hello world', 'text/plain')), ('attachment', ('test.png', image_file, 'image/png')), ] r = rc.post('/restapi/v1.0/account/~/extension/~/fax', files = files) print r.status_code ``` ### Send MMS ```python params = { 'to': [{'phoneNumber': receiver}], 'from': {'phoneNumber': username}, 'text': 'Hello world' } with open(os.path.join(os.path.dirname(__file__), 'test.png'), 'rb') as image_file: files = [ ('json', ('request.json', json.dumps(params), 'application/json')), ('attachment', ('test.png', image_file, 'image/png')), ] r = rc.post('/restapi/v1.0/account/~/extension/~/sms', params, files = files) print r.status_code ``` ### Sample code for binary downloading and uploading ```python # Upload with open(os.path.join(os.path.dirname(__file__), 'test.png'), 'rb') as image_file: files = {'image': ('test.png', image_file, 'image/png')} r = rc.post('/restapi/v1.0/account/~/extension/~/profile-image', files = files) # Download r = rc.get('/restapi/v1.0/account/~/extension/~/profile-image') # r.content is the downloaded binary ``` ## Authorization Code Flow (3-legged authorization flow) Please read the official documentation if you don't already know what is [Authorization Code Flow](http://ringcentral-api-docs.readthedocs.io/en/latest/oauth/#authorization-code-flow). ### Step 1: build the authorize uri ```python uri = rc.authorize_uri('http://example.com/callback', 'state') ``` ### Step 2: redirect user to `uri` User will be prompted to login RingCentral and authorize your app. If everything goes well, user will be redirect to `http://example.com/callback?code=<auth_code>`. ### Step 3: extract auth_code `http://example.com/callback?code=<auth_code>` Extract `auth_code` from redirected url. ### Step 4: authorize ```python rc.authorize(auth_code = auth_code, redirect_uri = 'http://example.com/callback') ``` ## More sample code Please refer to the [test cases](https://github.com/tylerlong/ringcentral-python/tree/master/test). ## Add access token to URL For example, for voicemail MP3, you will get a content URL like the following in extension/message-store response: ``` https://media.ringcentral.com/restapi/v1.0/account/1111/extension/2222/message-store/3333/content/4444 ``` You can add access token to the URL: ``` https://media.ringcentral.com/restapi/v1.0/account/1111/extension/2222/message-store/3333/content/4444?access_token=<theAccessToken> ``` This is mostly for embedding into sites like Glip temporarily or for sending to VoiceBase, etc. ## License MIT
/ringcentral_client-0.6.0.tar.gz/ringcentral_client-0.6.0/README.md
0.414069
0.71566
README.md
pypi
from typing import Dict, Union, Type, Optional, Any, TYPE_CHECKING from _ringding.messages import (ErrorResponse, Message, RESPONSE_TYPES) if TYPE_CHECKING: from _ringding.server import RdServer class _ApiEntry: """Proxy object for API entrypoint.""" pass class BaseClient: """ The Client base. All clients must derive from this class. It provides the interface and base functionality of one client. The server will call the functions of this client when receiving messages. """ def __init__(self, entry_point: Union[object, Type[object]], handshake_data: Dict[str, Any]): """ :param entry_point: The root object that defines the first level of the API. If you provide an initialized object, all clients will share the same instance. The data this instance holds will be shared among all clients. If you provide a type (an uninitialized class), the object will be instantiated by each client. So each client will have its own instance of that object. :param handshake_data: The data that was provided by the client during the handshake. """ api_entry = _ApiEntry() initialized_entrypoint = entry_point if type(entry_point) == type: initialized_entrypoint = entry_point() api_entry.__dict__ = { initialized_entrypoint.__class__.__name__: initialized_entrypoint} self._api_entry = api_entry self._client_data: Dict = {} self._server: Optional['RdServer'] = None self._handshake_data = handshake_data def get_server(self) -> 'RdServer': """Return the RdServer that spawned this client.""" return self._server def notify(self, message: RESPONSE_TYPES): """ Send a message to the client. :param message: The message to send """ try: self._server.notify(self._client_data, message) except Exception as error: self._server.notify(self._client_data, ErrorResponse(message.id, str(error))) def on_message(self, message: Message): """ Override to react on a specific message that was sent to this client. :param message: The message """ pass def connect_client(self, server: 'RdServer', client_data: Dict): """ Initialize the client. This method is called by the server to provide the server object and specific client data (e.g. the IP) :param server: The WebsocketServer :param client_data: A dictionary with client data. """ self._client_data = client_data self._server = server def get_handshake_data(self) -> Dict[str, Any]: """ Retrieve the data transmitted during handshake by the client. :return: The handshake data """ return self._handshake_data
/ringding-0.3.2.tar.gz/ringding-0.3.2/src/_ringding/client/base.py
0.929832
0.238317
base.py
pypi
# RingsPy [![Python 3](https://img.shields.io/static/v1?label=Python&logo=Python&color=3776AB&message=3)](https://www.python.org/) [![PyPI version](https://badge.fury.io/py/ringspy.svg)](https://badge.fury.io/py/ringspy) [![Anaconda-Server Badge](https://anaconda.org/conda-forge/ringspy/badges/version.svg)](https://anaconda.org/conda-forge/ringspy) [![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.html) [![Tests](https://github.com/kingyin3613/ringspy/actions/workflows/tests.yml/badge.svg)](https://github.com/kingyin3613/ringspy/actions/workflows/tests.yml) [![codecov](https://codecov.io/gh/kingyin3613/ringspy/branch/main/graph/badge.svg?token=4AZN3HGGET)](https://codecov.io/gh/kingyin3613/ringspy) [![status](https://joss.theoj.org/papers/3dd05ca1103829e7620731845b0d2472/status.svg)](https://joss.theoj.org/papers/3dd05ca1103829e7620731845b0d2472) RingsPy is a Voronoi diagrams-based geometric generation tool that generates 3D meshes and models of prismatic cellular solids with radial growth rules. ## Dependencies and Installation RingsPy depends on mainstream Python libraries ``numpy`` and ``scipy``, and optionally depends on library ``hexalattice``, if the regular hexagonal lattice (e.g. honeycomb) is wanted; also ``vtk``, if the 3D STL files are also wanted. ### 1. pip install To install RingsPy, one may use `pip`: ```bash pip install ringspy ``` or use: ```bash pip install git+https://github.com/kingyin3613/ringspy.git ``` to get updates beyond the latest release. ### 2. conda install If you are on Linux or Mac, you can also use `conda-forge` channel: ```bash conda install -c conda-forge ringspy ``` ### 3. Installation Check There are some unit tests in [tests](https://github.com/kingyin3613/ringspy/tree/main/tests/). One can use ``pytest`` to check whether the installation is successful by running this command: ```bash pytest . ``` ## Getting Started (Current version: v0.4.2) Once all required components are installed and one is ready to begin, a path forward should be established for generating the mesh. The basic steps for running/viewing a cellular mesh are listed as the following: 1. Edit geometry and algorithm parameters 2. Generate mesh using Mesh Generation Tools 3. Visualize 2D view using Matplotlib or 3D model in `ParaView` 4. (Optional) Export 3D STL model for 3D editing and/or printing 5. (Optional) Export input file for numerical simulations with software `Abaqus` ### 1. Geometry and Parameters The first step to generate a cellular geometry is selecting geometry and appropriate parameters. ### 1.1. Geometry A template file, for example, `test_wood_cube.py` located in the [tests](https://github.com/kingyin3613/ringspy/tree/main/tests/) directory acts as both the parameter input file, and main executable for the generation of a cubic wood specimen. *Note: The Mesh Generation Tool by now only accepts many of pre-defined boundary geometries (for v0.4.x, the following 3 shapes are supported: triangle, square, hexagon), importing of CAD and/or other 3D model files will be implemented in subsequent versions.* *Note: for greatest compatibility create the geometry using all millimeters.* ### 1.2. Parameters By opening a input file, e.g., `tests/test_wood_cube.py` in any text editor, a file format similar to what is shown below will be displayed: ``` geoName = 'wood_cube' path = 'meshes' radial_growth_rule = 'binary' iter_max = 500 # increase this number to achieve a more regular geometry print_interval = 500 # interval for printing prgress info # Radial cell growth parameters # length unit: mm r_min = 0 # inner radius of generation domain r_max = 4 # outer radius of generation domain nrings = 4 # number of rings width_heart = 0.3*(r_max-r_min)/nrings # ring width for the innermost ring width_sparse = 0.7*(r_max-r_min)/nrings # ring width for rings with sparse cells width_dense = 0.3*(r_max-r_min)/nrings # ring width for rings with dense cells generation_center = (0,0) # coordinates of generation domain center cellsize_sparse = 0.02 cellsize_dense = 0.01 cellwallthickness_sparse = 0.010 cellwallthickness_dense = 0.006 # clipping box parameters boundaryFlag = 'on' box_shape = 'square' box_center = (0,0) # coordinates of clipping box center box_size = 4.0 # side length # longitudinal direction parameters nsegments = 2 # increase this number to achieve a smoother transition in longitudinal direction if theta is large theta_min = 0 # unit: radian theta_max = 0.05 # unit: radian z_min = 0 z_max = box_size # segment_length = (z_max - z_min) / nsegments long_connector_ratio = 0.02 # longitudinal joint length = ratio * segment_length # material parameters skeleton_density = 1.5e-9 # unit: tonne/mm3 # generation parameters merge_operation = 'on' merge_tol = 0.01 precrackFlag = 'off' precrack_widths = 0.1 stlFlag = 'on' inpFlag = 'on' inpType = 'Abaqus' ``` - `geoName` is the geometry name, `path` is the folder where the mesh files will be generated. - `radial_growth_rule` is the radial growth rule for cell placement. When a file name with extension`.npy` is specified, a saved cell data file will be loaded (for v0.4.x, choose one of these rules: `binary`, `binary_lloyd`, `regular_hexagonal`, or a file name with extension `.npy`). - `iter_max` is the max number of iteration for randomly placing non-overlapping cell particles in the 2D toroidal cell placement region. Noticing that, larger `iter_max` leads to more centroidal Voronoi cells, for more reference, see [Wiki - Centroidal Voronoi Tessellation](https://en.wikipedia.org/wiki/Centroidal_Voronoi_tessellation/). - `print_interval` is the print interval when every n cell particles are placed in the placement region. - `r_min` and `r_max` are the upper and lower bounds of radii of toroidal cell placement regions (generation rings), `nrings` is the total number of rings. - `width_heart`, `width_sparse`, and `width_dense`, are ring widths for innermost ring, rings with sparse cells, and rings with dense cells, respectively, which all together determine the morphology of the cellular structure. - `generation_center` is the location of the placement region. - `cellsize_sparse`,`cellsize_dense`, `cellwallthickness_sparse`, and `cellwallthickness_dense` are parameters for the sparse and dense cells. - `boundaryFlag` flag can be turned on/off for generating neat boundaries consisting of grains. - `box_shape` is the shape of cutting box (for v0.4.x, choose one of following shapes: `triangle`, `square`, or `hexagon`). - `box_center`, and `box_size` are for describing the cutting box. - `nsegments` is the number of segments consisting the prismatic cells during the z- (longitudinal) extrusion, with `segment_length = (z_max - z_min) / nsegments`. - `theta_min` and `theta_max` determine the twisting angles (unit: radian) of the 2D mesh around the `generation_center`, during the spiral z-extrusion. - `z_min` and `z_max` determine the boundaries of prismatic cells in z- (longitudinal) direction. - `long_connector_ratio` is the length of longitudinal joints, with `longitudinal joint length = ratio * segment_length`. - `skeleton_density` is the density of the skeleton (substance) material, e.g. density of wood cell walls in the wood microstructure. - `merge_operation` flag can be turned on/off for the merging operation, when flag is on, cell ridges that are shorter than the threshold `merge_tol` in the 2D mesh will be deleted, and their vertices will be merged respectively, the mesh will be reconstructed. This is designed for eliminating small cell ridges/walls which fall out of the resolution range of the 3D printing and for avoiding having elements with too small stable time increments in numerical simulations. - `precrackFlag` flag is for inserting a pre-crack, for the notched specimens (for v0.4.x, only a single line pre-crack with the length of `precrack_widths` is supported). - `stlFlag` flag can be turned on/off for generating 3D STL files. - `inpFlag` flag can be turned on/off for generating input files for numerical simulations. - `inpType` indicates the software(s) that the mesh generation should generate input files for. ![growth_rule_binary](<./contents/growth_rule_binary.png>) ### 2.1. Run Mesh Generation Open a Command Prompt or Terminal window and set the current directory to [tests](https://github.com/kingyin3613/ringspy/tree/main/tests/) or any other directory, then run the command: ``` python test_wood_cube.py ``` Functions in `MeshGenTools` library will be called to create the initial mesh, wood cell particles following certain cell size distribution will be placed, then `Scipy.voronoi` function will be called to form the initial 2D Voronoi tessellation, additional code reforms the tesselation and generates the desired files. A successful generation will end with the line "Files generated ..." in the Terminal window. A new folder should have been created in the `.\meshes` directory with the same name as the `geoName` in `test_wood_cube.py`. ${\color{red}\textbf{(New feature in version v0.4.x)}}$ The Lloyd's relaxation (a.k.a. Lloyd's algorithm) has been integrated with the mesh generation, one may use this approach by changing the following line in the input file: ``` radial_growth_rule = binary_lloyd ``` This allows a rapid radial generation of more regular centroidal Voronoi cells from the `generation_center` (see the difference between `wood_binary` and `wood_binary_lloyd` in the preview of 2D cross-sections in section 2.2). For more detail of the algorithm, see [Wiki - Lloyd's algorithm](https://en.wikipedia.org/wiki/Lloyd's_algorithm)). ![lloyd](<./contents/lloyd.gif>) ### 2.2. Check Mesh and 3D Model Files The following files should be generated in the `.\meshes\geoName` directory with a successful run: - Log file - Log file for model generation: `wood_cube-report.log` - Mesh files - Non-Uniform Rational B-Splines (NURBS) beam file: `wood_cubeIGA.txt` - connector data file: `wood_cube-mesh.txt` - Grain-ridge data file: `wood_cube-vertex.mesh` - Ridge data file: `wood_cube-ridge.mesh` - Visualization files - Cross-sectional image file for initial 2D configuration: `wood_cube.png` - Paraview vtk file for initial vertex configuration: `wood_cube_vertices.vtu` - Paraview vtk file for initial grain solid configuration: `wood_cube_beams.vtu` - Paraview vtk file of initial cell ridge configuration: `wood_cube_conns.vtu` - Paraview vtk file of initial connector (volume) configuration: `wood_cube_conns_vol.vtu` - (Optional) 3D model files - STL file of initial cellular solid configuration: `wood_cube.stl` - (Optional) Abaqus input files - INP file of simulation input of initial cellular solid configuration in `Abaqus`: `wood_cube.inp` ![Model2DPreview](<./contents/Model2DPreview.png>) ### 3. Visualization A scientific visualization application `ParaView` can directly visualize the generated vtk files; It can also visualize generated 3D model STL files if the STL flag is on. `Paraview` is a free software, it can be downloaded from its official website: [https://www.paraview.org/download/](https://www.paraview.org/download/), latest version is recommeded. ### 3.1. Visualize Components of the 3D Model in ParaView 1. Open ParaView 2. Recommeded to temporarily turn off ray tracing - Uncheck "Enable Ray Tracing" (bottom left) 3. Open File Sets in `.\meshes\geoName` - File > Open... 4. Select the visualization files containing: `_vertices.vtu`, `_beams.vtu`, `_conns.vtu` 5. Apply to visualize - Press Apply (left side, center) 6. Turn on color plotting - Left click `_conns.vtu`, then select coloring (mid/lower left) > Connector_width 7. Scale and position the image as desired 8. Turn back on Ray Tracing 9. Adjust Ray Tracing lighting and settings as desired 10. Export Image - File > Save Screenshot - Enter a file name > OK - Leave new window as-is or increase resolution > OK ### 3.2. Visualize Volumes of the 3D Model in ParaView 1. Open Paraview 2. Recommeded to temporarily turn off ray tracing - Uncheck "Enable Ray Tracing" (bottom left) 3. Open File Sets in `.\meshes\geoName` - File > Open... 4. Select the newly created visualization files containing: `_conns_vol.vtu` 5. Apply to visualize - Press Apply (left side, center) 6. Turn on color plotting - Left click `_conns_vol.vtu`, then select coloring (mid/lower left) > Connector_width 7. Scale and position the image as desired 8. Turn back on Ray Tracing 9. Adjust Ray Tracing lighting and settings as desired 10. Export Image - File > Save Screenshot - Enter a file name > OK - Leave new window as-is or increase resolution > OK ![ModelVisualization](<./contents/ModelVisualization.png>) ### 4. (Optional) Numerical Simulation The mesh generation tool can also prepare the input files for the numerical simulations of the cellular solid in other softwares. By now (version 0.4.0), the input file format, `.inp`, that is used in a finite element method (FEM) software `Abaqus` is supported, if the INP flag is on. `Abaqus` is a commerical software suite for integrated computer-aided engineering (CAE) and finite element analysis, own by `Dassault Systèmes`. One may refer to its [Wiki](https://en.wikipedia.org/wiki/Abaqus) for more about `Abaqus`, and to [Introduction](https://bertoldi.seas.harvard.edu/files/bertoldi/files/abaqusinputfilemanualv1.pdf?m=1444417191) for the introduction of Abaqus input files. All steps for the model setup can be accomplished through manually coding the Abaqus input file in a text editor. The method used in the example procedure shown below requires access to the Abaqus GUI. ### 4.1 Create New Model 1. Open Abaqus CAE 2. Create a new model - File > New Model Database > With Standard/Explicit Model ### 4.2 Import Meshed Part 1. Import the meshed part - File > Import > Part - Select the newly created file which ends in `.inp` (note: you may need to change the File Filter to see this file) - Click OK 2. Rename part - Under the model tree (left) expand `Parts` - Right click on the part > Rename... - Enter a new name less than 14 characters, no special symbols, and easily recognizable (i.e. "WoodCube") *Note: if FEM parts will be added to the model, this RingsPy generated part must come first alphabetically. Also recommended not to include numbers in the name.* ![ModelNumericalSimulation](<./contents/ModelNumericalSimulation.png>) ## Contributing Contributions are always welcome! If you wish to contribute code/algorithms to this project, or to propose a collaboration study, please send an email to haoyin2022 [at] u.northwestern.edu . ## License ![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg) Distributed under the GPL v3 license. Copyright 2023 Hao Yin.
/ringspy-0.4.2.tar.gz/ringspy-0.4.2/README.md
0.652241
0.992837
README.md
pypi
![ringtail logo final](https://user-images.githubusercontent.com/41704502/170797800-53a9d94a-932e-4936-9bea-e2d292b0c62b.png) # Ringtail Package for creating SQLite database from virtual screening results, performing filtering, and exporting results. Compatible with [AutoDock-GPU](https://github.com/ccsb-scripps/AutoDock-GPU) and [AutoDock-Vina](https://github.com/ccsb-scripps/AutoDock-Vina). [![AD compat](https://img.shields.io/badge/AutoDock_Compatibility-ADGPU|Vina-brightgreen)](https://shields.io/) [![License: L-GPL v2.1](https://img.shields.io/badge/License-LGPLv2.1-blue.svg)](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html) [![made-with-python](https://img.shields.io/badge/Made%20with-Python-1f425f.svg)](https://www.python.org/) Ringtail reads collections of Docking Log File (DLG) or PDBQT results from virtual screenings performed with [AutoDock-GPU](https://github.com/ccsb-scripps/AutoDock-GPU) and [AutoDock-Vina](https://github.com/ccsb-scripps/AutoDock-Vina), respectively, and deposits them into a SQLite database. It then allows for the filtering of results with numerous pre-defined filtering options, generation of a simple result scatterplot, export of molecule SDFs, and export of CSVs of result data. Result file parsing is parallelized across the user's CPU. Ringtail is developed by the [Forli lab](https://forlilab.org/) at the [Center for Computational Structural Biology (CCSB)](https://ccsb.scripps.edu) at [Scripps Research](https://www.scripps.edu/). ## README Outline - [Installation](https://github.com/forlilab/Ringtail#installation) - [Definitions](https://github.com/forlilab/Ringtail#definitions) - [Getting Started Tutorial](https://github.com/forlilab/Ringtail#getting-started) - [Scripts](https://github.com/forlilab/Ringtail#scripts) - [rt_process_vs.py Documentation](https://github.com/forlilab/Ringtail#rt_process_vspy-documentation) - [rt_compare.py Documentation](https://github.com/forlilab/Ringtail#rt_comparepy-documentation) - [Python tutorials](https://github.com/forlilab/Ringtail#brief-python-tutorials) ## Installation It is recommended that you create a new Conda environment for installing Ringtail. Ringtail requires the following non-standard dependencies: - RDKit - SciPy - Matplotlib - Pandas - [Meeko](https://github.com/forlilab/Meeko) (from the Forli Lab) - [Multiprocess](https://pypi.org/project/multiprocess/) (MacOS only) Installation from source code is outlined below: ``` $ conda create -n ringtail $ conda activate ringtail ``` After this, navigate to the desired directory for installing Ringtail and do the following: ``` $ git clone git@github.com:forlilab/Ringtail.git $ cd Ringtail $ pip install . ``` This will automatically fetch the required modules and install them into the current conda environment. If you wish to make the code for Ringtail editable without having to re-run `pip install .`, instead use ``` $ pip install --editable . ``` #### Test installation If you would like to test your installation of Ringtail, a set of automated tests are included with the source code. To begin, you must install pytest in the Ringtail conda environment: ``` $ pip install -U pytest ``` Next, navigate to the `test` subdirectory within the cloned Ringtail directory and run pytest by simply calling ``` $ pytest ``` The compounds used for the testing dataset were taken from the [NCI Diversity Set V](https://wiki.nci.nih.gov/display/NCIDTPdata/Compound+Sets). The receptor used was [PDB: 4J8M](https://www.rcsb.org/structure/4J8M). ## Definitions - __DLG__: Docking Log File, output from AutoDock-GPU. - __PDBQT__: Modified PDB format, used for receptors (input to AutoDock-GPU and Vina) and output ligand poses from AutoDock-Vina. - __Cluster__: Each DLG contains a number of independent runs, usually 20-50. These independent poses are then clustered by RMSD, giving groups of similar poses called clusters. - __Pose__: The predicted ligand shape and position for single run of a single ligand in a single receptor. - __Binding score/ binding energy__: The predicited binding energy from AutoDock. - __Bookmark__: The set of ligands or ligand poses from a virtual screening passing a given set of filters. Stored within a virtual screening database as a view. - __Ringtail__: > Drat, I'm not a cat! Even though this eye-catching omnivore sports a few vaguely feline characteristics such as pointy ears, a sleek body, and a fluffy tail, the ringtail is really a member of the raccoon family. https://animals.sandiegozoo.org/animals/ringtail ## Getting Started Ringtail offers a wealth of database creation and filtering options. They are detailed at length below. This section will provide a quick overview of the basic usage of Ringtail from the command line. We will you the provided test data to create a database with default storage options and perform basic filtering of it. Let us begin in the Ringtail directory. First, we must navigate to the test data directory: ``` $ cd test/test_data/ ``` Now, let us create a database containing the results from only group 1: ``` $ rt_process_vs.py write --file_path group1 ``` By default, the database we have created is called `output.db`. Let us now make a second database named `all_groups.db` containing all three groups: ``` $ rt_process_vs.py write --file_path . --recursive --output_db all_groups.db ``` The `--recursive` option tells Ringtail to scan the directories specified with `--file_path` for subdirectories containing output files (in this case, DLGs). This allowed all three group directories to be added to the database with a single --file_path option. Now that we have created the databases, we can filter them to pull out compounds of interest. Let us start with a basic binding energy cutoff of -6 kcal/mol: ``` $ rt_process_vs.py read --input_db all_groups.db --eworst -6 ``` This produces an output log `output_log.txt` with the names of ligands passing the filter, as well as their binding energies. Let's now do another round of filtering, this time with an energy percentile filter of 5 percent (top 5% of coumpounds by binding energy). Each round of filtering is also stored in the database as a SQLite view, which we refer to as a "bookmark". We will also save this round of filtering with the bookmark name "ep5". ``` $ rt_process_vs.py read --input_db all_groups.db --energy_percentile 5 --log ep5_log.txt --bookmark_name ep5 ``` Now, let us further refine the set of molecules we just filtered. We will use an interaction filter for van der Waals interactions with V279 on the receptor: ``` $ rt_process_vs.py read --input_db all_groups.db --filter_bookmark ep5 --van_der_waals A:VAL:279: --log ep5_vdwV279_log.txt --bookmark_name ep5_vdwV279 ``` We are now ready to export these molecules for visual inspection in your favorite molecular graphics program. We will create a new directory `ep5_vdwV279_sdfs` and store the exported molecule files there. ``` $ mkdir ep5_vdwV279_sdfs $ rt_process_vs.py read --input_db all_groups.db --bookmark_name ep5_vdwV279 --export_sdf_path ep5_vdwV279_sdfs ``` Now we have our filtered molecules as SDF files ready for visual inspection! # Extended documentation ## Scripts The Ringtail package includes two command line oriented scripts: `rt_process_vs.py` and `rt_compare.py`. Both may be run with options specified in the command line and/or using options specified in a JSON-formatted file given with `--config`. Command line options override any conflicting options in the config file. [rt_process_vs.py](https://github.com/forlilab/Ringtail#rt_process_vspy-documentation) serves as the primary script for the package and is used to both write docking files to a SQLite database and to perform filtering and export tasks on the database. It is designed to handle docking output files associated with a single virtual screening in a single database. [rt_compare.py](https://github.com/forlilab/Ringtail#rt_comparepy-documentation) is used to combine information across multiple virtual screenings (in separate databases) to allow or exclude the selection of ligands passing filters across multiple targets/models. This can be useful for filtering out promiscuous ligands, a technique commonly used in exerimental high-throughput screening. It may also be used if selection of ligands binding multiple protein structures/conformations/homologs are desired. ## rt_process_vs.py Documentation ### Usage examples #### Access help message for rt_process_vs.py ``` rt_process_vs.py --help ``` #### Access help message for rt_process_vs.py write mode ``` rt_process_vs.py write --help ``` #### Access help message for rt_process_vs.py read mode ``` rt_process_vs.py read --help ``` #### Create database named example.db from all input options ``` rt_process_vs.py write --file lig1.dlg lig2.dlg --file_path path1/ path2 --file_list filelist1.txt filelist2.txt --output_db example.db ``` Example file list ``` lig3.dlg lig4.dlg.gz rec1.pdbqt ``` #### Write and filter using a config file ``` rt_process_vs.py -c config_w.json write rt_process_vs.py -c config_r.json read ``` config_w.json: ``` { "file_path": "path1/", "output_db": "example.db" } ``` config_r.json: ``` { "energy_percentile": "0.1" } ``` #### Export results from a previous filtering as a CSV ``` rt_process_vs.py write --file_path Files/ rt_process_vs.py read --input_db output.db --energy_percentile 0.1 --bookmark_name filter1 rt_process_vs.py read --input_db output.db --export_bookmark_csv filter1 ``` #### Create scatterplot highlighting ligands passing filters ``` rt_process_vs.py write --file_path Files/ rt_process_vs.py read --input_db output.db --energy_percentile 0.1 --bookmark_name filter1 rt_process_vs.py read --input_db output.db --bookmark_name filter1 --plot ``` `all_ligands_scatter.png` ![all_ligands_scatter](https://user-images.githubusercontent.com/41704502/171295726-7315f929-edfa-49a0-b984-dacadf1a4327.png) ### Usage Details The script for writing a database and filtering is `rt_process_vs.py`. __This is intended to be used for a set of DLGs/Vina PDBQTs pertaining to a single target and binding site. This may include multiple ligand libraries as long as the target and binding site is the same. Be cautious when adding results from multiple screening runs, since some target information is checked and some is not.__ One receptor PDBQT may also be saved to the database. The rt_process_vs.py script has two modes: `write` and `read`. The desired mode must be specified in the command line before any other options are given (except `-c [CONFIG]` which is given first). The `write` mode is used to create a database for a virtual screening from ADGPU DLGs or Vina PDBQTs. After this initial run, a database is created and may be read directly by rt_process_vs.py in `read` mode for subsequent filtering and export operations. #### Write Mode Upon calling rt_process_vs.py in `write` mode for the first time, the user must specify where the program can find files to write to the newly-created database. This is done using the `--file`, `--file_path`, and/or `--file_list` options. Any combination of these options can be used, and multiple arguments for each are accepted. Compressed `.gz` files are also accepted. When searching for result files in the directory specified with `--file_path`, rt_process_vs.py will search for files with the pattern `*.dlg*` by default. This may be changed with the `--pattern` option. Note also that, by default, Ringtail will only search the directory provided in `--file_path` and not subdirectories. Subdirectory searching is enabled with the `--recursive` flag. If you are trying to read Vina PDBQTs, specify this with `--mode vina`. This will automatically change the file search pattern to `*.pdbqt*`. If the receptor PDBQT file is present in a directory being searched, it **must** be specified with `--receptor_file`. To add new files to an existing database, the `--append_results` flag can be used in conjuction with `--input_db` and `--file`, `--file_path`, and/or `--file_list` options. If one is concerned about adding duplicate results, the `--duplicate_handling` option can be used to specify how duplicate entries should be handled. However, this option makes database writing significantly slower. To overwrite an existing database, use the `--overwrite` flag. One receptor PDBQT, corresponding to that in the DLGs, may be saved to the database using the `--save_receptor` flag. This will store the receptor file itself in a binary format in the database. The user must specify the path to the receptor file with the `--receptor_file` option. Ringtail will also throw an exception if this flag is given but no receptor is found, if the name of the receptor in any DLG does not match the receptor file, or if this flag is used with a database that already has a receptor. `--save_receptor` can be used to add a receptor to an existing database given with `--input_db`. `--save_receptor` may not be used with the `--append_results` option. By default, the newly-created database will be named `output.db`. This name may be changed with the `--output_db` option. By default (for DLGs), Ringtail will store the best-scored (lowest energy) binding pose from the first 3 pose clusters in the DLG. For Vina, Ringtail will store the 3 best poses. The number of clusters/poses stored may be changed with the `--max_poses` option. The `--store_all_poses` flag may also be used to override `--max_poses` and store every pose from every file. ADGPU is capable of performing interaction analysis at runtime, with these results being stored in the database if present. If interaction analysis is not present in the input file (including Vina PDBQTs), it may be added by Ringtail with the `--add_interactions` option. **This adds a signifcant increase to the total database write time.** Distance cutoffs for the interactions are specified with the `--interaction_cutoffs` option. Adding interactions requires that the receptor PDBQT be provided as an input by the user with the `--receptor_file` option. The `--interaction_tolerance` option also allows the user to give more leeway for poses to pass given interaction filters. With this option, the interactions from poses within *c* angstrom RMSD of a cluster's top pose will be appended to the interactions for that top pose. The theory behind this is that this gives some sense of the "fuzziness" of a given binding pose, allowing the user to filter for interactions that may not be present for the top pose specifically, but could be easily accessible to it. When used as a flag, the `interaction_tolerance` default is 0.8 angstroms. The user may also specify their own cutoff. This option is intended for use with DLGs from AD-GPU, which clusters output poses based on RMSD. #### Read mode In `read` mode, an existing database is used to filter or export results. When filtering, a text log file will be created containing the results passing the given filter(s). The default log name is `output_log.txt` and by default will include the ligand name and binding energy of every pose passing filtering criteria. The log name may be changed with the `--log` option and the information written to the log can be specified with `--outfields`. The full list of available output fields may be seen by using the `--help` option with `read` mode (see example above). By default, only the information for the top-scoring binding pose will be written to the log. If desired, each individual passing pose can be written by using the `--output_all_poses` flag. The passing results may also be ordered in the log file using the `--order_results` option. No filtering is performed if no filters are given. If both `--eworst` and `--energy_percentile` are used together, the `--eworst` cutoff alone is used. The same is true of `--leworst` and `--le_percentile`. When filtering, the passing results are saved as a view in the database. This view is named `passing_results` by default. The user can specify a name for the view using the `--bookmark_name` option. Data for poses in a view may be accessed later using the `--new_data_from_bookmark` option. When `max_miss` > 0 is used, a view is created for each combination of interaction filters and is named `<bookmark_name>_<n>` where n is the index of the filter combination in the log file (indexing from 0). Filtering may take from seconds to minutes, depending on the size of the database, roughly scaling as O(n) for n database Results rows (i.e. stored poses). One may also filter over a previous bookmark specified with the `--filter_bookmark` option. If using this option, the bookmarks specified by `--filter_bookmark` and `--bookmark_name` must be different. In our experience, it is faster to export the bookmark of interest as its own database with the `--export_bookmark_db` flag and perform additional sub-selection and export tasks from there. ##### Other available outputs The primary outputs from `rt_process_vs.py` are the database itself (`write` mode) and the filtering log file (`read` mode). There are several other output options as well, intended to allow the user to further explore the data from a virtual screening. The `--plot` flag generates a scatterplot of ligand efficiency vs binding energy for the top-scoring pose from each ligand. Ligands passing the given filters or in the bookmark given with `--bookmark_name` will be highlighted in red. The plot also includes histograms of the ligand efficiencies and binding energies. The plot is saved as `[filters_file].png` if a `--filters_file` is used, otherwise it is saved as `out.png`. Using the `--export_sdf_path` option allows the user to specify a directory to save SDF files for ligands passing the given filters or in the bookmark given with `--bookmark_name`. The SDF will contain poses passing the filter/in the bookmark ordered by increasing binding energy. Each ligand is written to its own SDF. This option enables the visualization of docking results, and includes any flexible/covalent ligands from the docking. The binding energies, ligand efficiencies, and interactions are also written as properties within the SDF file, with the order corresponding to the order of the pose order. If the user wishes to explore the data in CSV format, Ringtail provides two options for exporting CSVs. The first is `--export_bookmark_csv`, which takes a string for the name of a table or result bookmark in the database and returns the CSV of the data in that table. The file will be saved as `<table_name>.csv`. The second option is `--export_query_csv`. This takes a string of a properly-formatted SQL query to run on the database, returning the results of that query as `query.csv`. This option allows the user full, unobstructed access to all data in the database. As noted above, a bookmark may also be exported as a separate SQLite dabase with the `--export_bookmark_db` flag. ### Interaction filter formatting and options **Interaction filtering requires interactions to be present in database.** The `--vdw`, `--hb`, and `--react_res` interaction filters must be specified in the order `CHAIN:RES:NUM:ATOM_NAME`. Any combination of that information may be used, as long as 3 colons are present and the information ordering between the colons is correct. All desired interactions of a given type (e.g. `--vdw`) may be specified with a single option tag (`--vdw=B:THR:276:,B:HIS:226:`) or separate tags (`--vdw=B:THR:276: --vdw=B:HIS:226:`). The `--max_miss` option allows the user to separately filter each combination of the given interaction filters excluding up to `max_miss` interactions. This gives ![equation](https://latex.codecogs.com/svg.image?\sum_{m=0}^{m}\frac{n!}{(n-m)!*m!}) combinations for *n* interaction filters and *m* max_miss. Results for each combination of interaction filters will be written separately in the log file. This option cannot be used with `--plot` or `--export_poses_path`. ### Exploring the database in the Command Line View the data contained within the database using a terminal, we recommend using the [VisiData tool](https://www.visidata.org/). In addition to command line visualization, this tool has a number of other feature, including ploting. Upon opening the database with `vd`, the terminal should look like this: ![Screenshot from 2022-05-18 14-57-22](https://user-images.githubusercontent.com/41704502/169162632-3a71d338-faa1-4109-8f04-40a96ee6d24e.png) In this example (made with DLGs), the database contains ~3 poses for 9999 discrete ligands. Each of the rows here is a separate table or view within the database. From this screen, you can easily perform the sanity checks outline below. One should note that the number of column displayed on the first screen is 1 greater than the actual number of columns in a table (the number is correct for views). To more fully explore a given table, one may use the arrow keys or mouse to navigate to it, then press `Enter/Return` to access that table/view. The user may then scroll horizontally with the arrow keys, or press `q` to return up a level. Using `vd` is particularly helpful to examine possible interactions of interest, stored within the `Interaction_indices` table. To exit, return to the screen shown in the image above by pressing `q`, then press `q` to exit. ### Data integrity sanity checks There are a few quick checks the user can make to ensure that the data has been properly written from the input files to the database. Discrepancies may indicate an error occurred while writing the database or the input file format did not match that which Ringtail expected. - The number of rows in the `Ligands` table should match the number of input ligand files - The number of rows in the `Results` and `Interaction_bitvectors` tables should match - Number of columns in the `Interactions_bitvectors` table should match the number of rows in the `Interaction_indices` table + 1 (+2 if using `vd`) - The number of rows in the `Results` table should be ~`max_poses`\* `number of files` and should be less than or equal to that number. For DLGs not every ligand may have up to `max_poses`, which is why the number of rows is typically smaller than `max_poses`\* `number of DLGs`. - No ligand should have more than `max_poses` rows in the `Results` table. - If storing all poses, the number of rows in the Results table should match the `number of ligands` * `number of output poses`. ### Potential pitfalls Any PDBQT files specified through any of the input options in ADGPU mode will be read by `rt_process_vs.py` as receptor files, even if the files actually represent ligands. Therefore, ligand PDBQT files should not be present in any directories given with `--file_path`. When writing from Vina PDBQTs, ensure there are no other PDBQTs (input or receptor) in directories specified with `--file_path` UNLESS the receptor PDBQT is specified with the `--receptor_file` option. Occassionally, errors may occur during database reading/writing that corrupt the database. This may result in the database becoming locked. If this occurs it is recommended to delete the existing database and re-write it from scratch. ### rt_process_vs.py supported arguments | Argument || Description | Default value | Requires interactions | |:------------------------|:-----|:-------------------------------------------------|:----------------|----:| |--config | -c| Configuration JSON file to specify new default options. Overridded by command line | no default |<tr><td colspan="5"></td></tr> |--input_db | -i| Database file to use instead of creating new database | no default || |--bookmark_name |-s| Name for bookmark view in database | passing_results || |--mode |-m| specify AutoDock program used to generate results. Available options are "dlg" and "vina". Vina mode will automatically change --pattern to \*.pdbqt | dlg || |--verbose |-v| Flag indicating that passing results should be printed to STDOUT. Will also include information about runtime progress. | FALSE || |--debug |-d| Flag indicating that additional debugging information (e.g. error traceback) should be printed to STDOUT. | FALSE |<tr><td colspan="5">**Write Mode**</td></tr> |--file |-f| DLG/Vina PDBQT file(s) to be read into database | no default || |--file_path |-fp| Path(s) to files to read into database | no default || |--file_list |-fl| File(s) with list of files to read into database | no default || |--pattern |-p| Specify pattern to search for when finding files | \*.dlg\* / \*.pdbqt\* (vina mode) || |--recursive |-r| Flag to perform recursive subdirectory search on --file_path directory(s) | FALSE || |--append_results |-a| Add new docking files to existing database given with --input_db | FALSE || |--duplicate_handling|-dh| Specify how dulicate results should be handled. May specify "ignore" or "replace". Unique results determined from ligand and target names and ligand pose. *NB: use of duplicate handling causes increase in database writing time*| None | |--save_receptor |-sr| Flag to specify that receptor file should be imported to database. Receptor file must also be specified with --receptor_file| FALSE || |--output_db |-o| Name for output database | output.db || |--overwrite |-ov| Flag to overwrite existing database | FALSE || |--max_poses |-mp| Number of clusters for which to store top-scoring pose (dlg) or number of poses (vina) to save in database| 3 || |--store_all_poses |-sa| Flag to indicate that all poses should be stored in database| FALSE || |--interaction_tolerance|-it| Adds the interactions for poses within some tolerance RMSD range of the top pose in a cluster to that top pose. Can use as flag with default tolerance of 0.8, or give other value as desired | FALSE -> 0.8 (Å) | Yes | |--add_interactions |-ai| Find interactions between ligands and receptor. Requires receptor PDBQT to be written. | FALSE || |--interaction_cutoffs |-ic| Specify distance cutoffs for measuring interactions between ligand and receptor in angstroms. Give as string, separating cutoffs for hydrogen bonds and VDW with comma (in that order). E.g. '-ic 3.7,4.0' will set the cutoff for hydrogen bonds to 3.7 angstroms and for VDW to 4.0. | 3.7,4.0 || |--receptor_file |-rn| Use with --save_receptor and/or --add_interactions. Give receptor PDBQT. | None || |--max_proc |-mpr| Maximum number of subprocesses to spawn during database writing. | [# available CPUs] |<tr><td colspan="5">**Read Mode**</td></tr> |--log |-l| Name for log of filtered results | output_log.txt || |--outfields |-of| Data fields to be written in output (log file and STDOUT). Ligand name always included. | e || |--order_results |-ord| String for field by which the passing results should be ordered in log file. | no default || |--output_all_poses |-ap| Flag that if mutiple poses for same ligand pass filters, log all poses | (OFF) || |--export_bookmark_csv |-xs| Name of database result bookmark or table to be exported as CSV. Output as <table_name>.csv | no default || |--export_query_csv |-xq| Create csv of the requested SQL query. Output as query.csv. MUST BE PRE-FORMATTED IN SQL SYNTAX e.g. SELECT [columns] FROM [table] WHERE [conditions] | no default || |--export_sdf_path|-sdf| Path for saving exported SDF files of ligand poses passing given filtering criteria | no default || |--export_bookmark_db |-xdb| Export a database containing only the results found in the bookmark specified by --bookmark_name. Will save as <input_db>_<bookmark_name>.db| FALSE || |--data_from_bookmark |-nd| Flag that out_fields data should be written to log for results in given --bookmark_name. Requires no filters. | FALSE || |--filter_bookmark |-fb| Filter over specified bookmark, not whole Results table. | FALSE || |--plot |-p| Flag to create scatterplot of ligand efficiency vs binding energy for best pose of each ligand. Saves as [filters_file].png or out.png. | FALSE | <tr><td colspan="5">PROPERTY FILTERS</td></tr> |--eworst |-e| Worst energy value accepted (kcal/mol) | no_default || |--ebest |-eb| Best energy value accepted (kcal/mol) | no default || |--leworst |-le| Worst ligand efficiency value accepted | no default || |--lebest |-leb| Best ligand efficiency value accepted | no default || |--energy_percentile |-pe| Worst energy percentile accepted. Give as percentage (1 for top 1%, 0.1 for top 0.1%) | 1.0 || |--le_percentile |-ple| Worst ligand efficiency percentile accepted. Give as percentage (1 for top 1%, 0.1 for top 0.1%) | no default | <tr><td colspan="5">LIGAND FILTERS</td></tr> |--name |-n| Search for specific ligand name. Multiple names joined by "OR". Multiple filters should be separated by commas | no default | <tr><td colspan="5">INTERACTION FILTERS</td></tr> |--van_der_waals |-vdw| Filter for van der Waals interaction with given receptor information. | no default | Yes| |--hydrogen_bond |-hb| Filter with hydrogen bonding interaction with given information. Does not distinguish between donating or accepting | no default | Yes| |--reactive_res |-r| Filter for reation with residue containing specified information | no default |Yes | |--hb_count |-hc| Filter for poses with at least this many hydrogen bonds. Does not distinguish between donating and accepting | no default | Yes| |--react_any |-ra| Filter for poses with reaction with any residue | FALSE | Yes| |--max_miss |-mm| Will separately filter each combination of given interaction filters excluding up to max_miss interactions. Results in ![equation](https://latex.codecogs.com/svg.image?\sum_{m=0}^{m}\frac{n!}{(n-m)!*m!}) combinations for *n* interaction filters and *m* max_miss. Results for each combination written separately in log file. Cannot be used with --plot or --export_sdf_path. | 0 | Yes| --- ## rt_compare.py Documentation The `rt_compare.py` script is designed to be used with databases already made and filtered with the `rt_process_vs.py` script. The script is used to select ligands which are shared between the given filter bookmark(s) of some virtual screenings (wanted) or exclusive to some screenings and not others (unwanted). The basic process of preparing to use this script and the concept behind it is thus: Let us assume that kinase1 is our target of interest. It has related proteins kinase1a and kinase1b. protein2 is an unrelated protein. 1. Create a database for each virtual screening on each target (kinase1.db, kinase1a.db, kinase1b.db, protein2.db) 2. Filter each database separately to get a set of virtual hits for each target. Each set of filters may be different as desired (e.g. change interaction filters for analogous residues). The bookmark within each database may be given as a single string (same bookmark name in every database) or multiple bookmark names (one per database) with the `--bookmark_name` option. If specifying multiple names, the order should match the order that the databases were provided in, beginning with wanted, then unwanted databases. The default name is `passing_results`. 3. Use `rt_compare.py` to find ligands that pass the filters for kinase1 but not kinase1a or kinase1b. This will create a log file of the same format as that output from `rt_process_vs.py`. ``` rt_compare.py --wanted kinase1.db --unwanted kinase1a.db kinase1b.db ``` 4. Other usage examples and output options given below. For example, one can also select for potential dual-target ligands with ``` rt_compare.py --wanted kinase1.db protein2.db --unwanted kinase1a.db kinase1b.db ``` ### Usage examples #### Access help message for rt_compare.py ``` rt_compare.py --help ``` #### Select ligands found in "passing_results" bookmarks of vs1 but not vs2 or vs3 ``` rt_compare.py --wanted vs1.db --unwanted vs2.db vs3.db ``` #### Select ligands found in "passing_results" bookmarks of vs1 and vs2 but not vs3 or vs4 ``` rt_compare.py --wanted vs1.db vs2.db --unwanted vs3.db vs4.db ``` #### Select ligands found in "passing_results" bookmarks of every vs except vs4 ``` rt_compare.py --wanted vs1.db vs2.db vs3.db --unwanted vs4.db ``` #### Select ligands found in "filter1" bookmarks of vs1 but not vs2 ``` rt_compare.py --wanted vs1.db --unwanted vs2.db --bookmark_name filter1 ``` #### Save bookmark of ligands found in "filter1" bookmarks of vs1 and vs2 but not vs3 or vs4 as "selective_bookmark" in vs1.db ``` rt_compare.py --wanted vs1.db vs2.db --unwanted vs3.db vs4.db --save_bookmark selective_bookmark ``` #### Export bookmark set of ligands found in "filter1" bookmarks of vs1 and vs2 but not vs3 or vs4 as CSV ``` rt_compare.py --wanted vs1.db vs2.db --unwanted vs3.db vs4.db --export_csv ``` ### rt_compare.py supported arguments | Argument || Description | Default value | |:------------------------|:-----|:-------------------------------------------------|----:| |--config | -c| Configuration JSON file to specify new default options. Overridded by command line | no default <tr><td colspan="4"></td></tr> |--wanted |-w| Database files for which to include the intersection of ligands in bookmark_name(s) for all databases specified with this option.| no default| |--unwanted |-n| Database files for which to exclude any ligands found in bookmark_name of any of the databases specified with this option. | no default| |--bookmark_name |-sn| Name of bookmark to select ligands within. Must be present in all databases given.| passing_results| |--log |-l| Name for log file| selective_log.txt | |--save_bookmark| -s| Save the final selective bookmark as a view with given name in the first database specified with --wanted. | no default| |--export_csv| -x| Save final selective bookmark as csv. Saved as [save_bookmark].csv or 'crossref.csv' if --save_bookmark not used.| FALSE| --- ## Brief python tutorials #### Make sqlite database from current directory ``` from ringtail import RingtailCore opts = RingtailCore.get_defaults() opts["storage_opts"]["values"]["storage_type"] = "sqlite" opts["rman_opts"]["values"]["file_sources"]["file_path"]["path"] = [["."]] opts["rman_opts"]["values"]["file_sources"]["file_path"]["recursive"] = True with RingtailCore(**opts) as rt_core: rt_core.add_results() ``` #### Convert database tables to pandas dataframes ``` from ringtail import DBManagerSQLite # make database manager with connection to SQLite file vs.db with StorageManagerSQLite("vs.db") as dbman: # fetch entire Results table as pandas dataframe results_df = dbman.to_dataframe("Results") # fetch entire Ligands table as pandas dataframe ligands_df = dbman.to_dataframe("Ligands") # fetch entire Receptors table as pandas dataframe rec_df = dbman.to_dataframe("Receptors") # fetch entire Interaction Indices table as pandas dataframe interaction_idx_df = dbman.to_dataframe("Interaction_indices") # fetch entire Interaction bitvectors table as pandas dataframe interaction_bv_df = dbman.to_dataframe("Interaction_bitvectors") ```
/ringtail-1.0.0-py3-none-any.whl/ringtail-1.0.0.data/data/README.md
0.415017
0.970909
README.md
pypi
========================= Transaction tree analysis ========================= Mitchell P. Krawiec-Thayer (@isthmus) // Noncesense Research Lab This library enables passive deanonymization of Monero-style blockchains for true spends revealed by "differ-by-one" ring pair analysis (described below). The analysis engine leverages CPU multiprocessing and automatically distributes the workload across cores (this can be disabled & the number of workers can be adjusted). **NOTE: If you generate transactions with a "wallet2"-based software (such as the core GUI or CLI) then they should not exhibit the anomaly exploited by this analysis.** **NOTE: This is under early-stage development, and the API is likely to change frequently and dramatically.** Introduction to differ-by-one (DBO) analysis ============================================ Suppose we have the sets ``{2, 4, 8}`` and ``{2, 4, 10}``. We'll say that this pair has a "differ by one" (DBO) relationship, because singleton 8 sticks out on the left, and the singleton 10 sticks out on the right. Any pair of rings whose members differ by only one element will be called a "DBO ring pair". We'll refer to any ring that belongs to any DBO pair as a "DBO ring". (Note that one DBO ring can be in many DBO pairs, and this is disturbingly common on the Monero blockchain) Each DBO ring produces one new singleton, corresponding to the output spent in that ring. From a graph analysis perspective, this reveals one edge of the transaction tree belonging to the subgraph representing the true flow of funds. We can record this edge as a ``(ring, output)`` tuple. Since key images are 1:1 with rings, it also works as well to record ``(key image, output)`` tuple. Any time that output shows up in a different ring signature, we know that it is a decoy and can remove its possible spend from the set of plausible edges. Example output ============== (below is an excerpt of real results from the Monero blockchain):: Txn: 48ab24a942778d0c7d79d8bbc7076329ae45b9b7c8cc7c15d105e135b4746587 Key Image: f7c4e158caaa3d8b15bbf878ed15392d99debf1eaf78a421637fd13e51dce229 Spends output: 9641bf77a6f7031b1f077c183e590b3e0c6cf9acd951aa9436d4b670958aff53 Txn: 71879ba6099ea18d456cd31694b0860f3649ebeb28ce5630ccb1be312c0cc8cb Key Image: 8b4afa486c7a8d40c569a172a5ea2200e36c921ee543c2a6c7e43452c3efc9bd Spends output: c75a7b36d2311ce6b41ad062133a0a4b1f16c21d3251c10719158330d4799f7a Txn: 48ab24a942778d0c7d79d8bbc7076329ae45b9b7c8cc7c15d105e135b4746587 Key Image: f37df1f2d6e28ef4fd2a22fa4172aa5453e5dad54e44503e130ce18ef4a28df9 Spends output: c419117a83906e84c76de0604b85c00888097c1993b05784f3efdd84633e6d77 Txn: 71879ba6099ea18d456cd31694b0860f3649ebeb28ce5630ccb1be312c0cc8cb Key Image: 71f9ad1b7735bad5d0f26eb9ea23545af1a39517e0e184c7c74d4ee9203156c1 Spends output: 736eb676e8dcf030ab4116afe4c8c14e37adff19de70fd25e092a5da20dac778 DBO pairs observed in the wild ======================================= There are multiple contexts in which DBO pairs found in the wild on Monero. intERtransaction DBO pairs -------------------------- We can have DBO ring pairs across different transactions, for example: + https://xmrchain.net/tx/6fb06bcd042e5f705a458a37cc3aaf6a1ad7a35657cf03f74e3aea383a47fb7e + https://xmrchain.net/tx/4509d22833ca47ec224fcd226626bc830056d39a6ff1278c56a4796645c47859 Here is another more extreme example, with dozens of DBO ring pairs across just two many-input transactions: + https://xmrchain.net/tx/71879ba6099ea18d456cd31694b0860f3649ebeb28ce5630ccb1be312c0cc8cb + https://xmrchain.net/tx/48ab24a942778d0c7d79d8bbc7076329ae45b9b7c8cc7c15d105e135b4746587 *(as an aside, there are many oddities in the above pair, such as the incorrect decoy selection algorithm for most of the rings (old clusters, and then one new output), and the fact that the 4th ring does appear to be sampled from the correct distribution?)* intRAtransaction DBO pairs -------------------------- We also find many examples of DBO ring pairs within the same transaction, for example: * Mitchell TODO: dig up one of those old links for this Scope = everything ------------------ By optionally removing transaction labels we can automatically detect intertransaction and intratransaction DBO relationships in a single pass. Scalability =========== If ``R`` is the number of rings on the blockchain, to make each pairwise comparison we would naively expect to do ``R^2`` checks However, we do not need to check along the diagonal of the matrix, because a ring cannot be a DBO ring pair with itself. So we can reduce the number of checks to ``R^2 - R`` Furthermore, because ring xor is symmetric, we only need to look at the upper triangle of the matrix! This brings us down to ``(R^2 - R) / 2`` checks. Also, because sets with different sizes cannot produce a DBO ring pair, we can reduce the number of checks by only comparing rings of the same size. So consider the set of rings sized 11 (``R11``) and the set of ring sized 16 (``R16``). We only need to check ``(R11^2 - R11 + R16^2 - R16) / 2`` which is much less than ``(R^2 - R) / 2`` This process is "embarrassingly parallel", and this library implements CPU multiprocessing. Benchmarks for new unoptimized python code: about 850,000 ring pair checks per second. Previous prototype code clocked in an order of magnitude faster, but I think the new numbers are more practical when actually juggling a large number of rings.
/ringxor-0.0.2.3.tar.gz/ringxor-0.0.2.3/README.rst
0.919331
0.66341
README.rst
pypi
import json from django.contrib.auth.models import AnonymousUser from graphene import Schema from graphql import GraphQLError from graphene import Mutation from .models import MutationCommit import re import functools def commit(mutation_name): def decorator(func): def wrapper(*args, **kwargs): result = None if isinstance(decorator.data.user, AnonymousUser): user = None else: user = decorator.data.user try: result = func(*args, **kwargs) MutationCommit.objects.create(user=user, arguments=decorator.data.query_args, mutation_name=mutation_name) except Exception as err: MutationCommit.objects.create(user=user, arguments=decorator.data.query_args, mutation_name=mutation_name, error=str(err)) raise GraphQLError(str(err)) return result return wrapper return decorator def login_required(func): def wrapper(*args, **kwargs): if login_required.data.user.is_authenticated: result = func(*args, **kwargs) else: raise GraphQLError("you are not authorized") return result return wrapper class Register(object): def __init__(self, *decorators): self.decorators = decorators def __call__(self, func): for deco in self.decorators[::-1]: func = deco(func) func.data = {} func.decorators = self.decorators return func def register(*decorators): def register_wrapper(func): for deco in decorators[::-1]: func = deco(func) func.data = {} func.decorators = decorators return func return register_wrapper class DataSchema: def __init__(self): pass def add_data(self, data): self.__dict__.update(data) class InterLayer: def __init__(self, schema: Schema): self.schema = schema self.query_resolvers_and_functions = {} self.get_mutations_attributes() def get_mutations_attributes(self): queries = {key: value for key, value in self.schema._query.__dict__.items() if key.startswith('resolve_')} mutations = {key: value.__dict__['resolver'] for key, value in self.schema._mutation.__dict__.items() if not key.startswith("_")} self.query_resolvers_and_functions = dict( zip(self.convert_queries_names(list(queries.keys()) + list(mutations.keys())), list(queries.values()) + list(mutations.values()))) def execute(self, query: str, variables: dict, data: dict): # deletes all \n \t \s from query string one_line_query = re.sub("\s+", '', query) # find all queries names from query string try: query_names = re.findall("\{([a-zA-Z]+)\(", one_line_query) except IndexError: raise Exception('you have not provided correct graphql query') query = query.replace('()', '') # create data "container" for pushing his into decorators data_schema = DataSchema() data_schema.add_data({"query_args": json.dumps(variables)}) data_schema.add_data(data) # pushing data schemas into decorators for query_name in query_names: self.add_data_schema_to_decorators(data_schema, query_name) # quering decorated schema result = self.schema.execute(query, variables=variables) return result def add_data_schema_to_decorators(self, data_schema: DataSchema, query_name): try: for func in self.query_resolvers_and_functions[query_name].decorators: func.data = data_schema except KeyError: raise Exception('you provided query or mutation name that not exists. Name %s' % query_name) @classmethod def convert_queries_names(self, queries_names: list): result = [] for query_name in queries_names: query_name = query_name.replace('resolve_', '', 1) letters_after_ = re.findall("_([a-zA-Z])", query_name) for letter in letters_after_: query_name = query_name.replace("_" + letter, letter.upper()) result.append(query_name) return result
/rinit_graphql_extention-0.1.2.tar.gz/rinit_graphql_extention-0.1.2/rinit_graphql_extention/inter_layer.py
0.435661
0.158467
inter_layer.py
pypi
import numpy as np import plotly.graph_objects as go def rink(setting = "full", vertical = False): ''' Function to plot rink in Plotly. Takes 2 arguments : setting : full (default) for full ice, offense positive half of the ice, ozone positive quarter of ice, defense for negative half of the ice, dzone for negative quarter of the ice, and neutral for the neutral zone vertical : True if you want a vertical rink, False (default) is for an horizontal rink ''' def faceoff_circle(x, y): theta = np.linspace(0, 2*np.pi, 300) # Outer circle x_outer = x + 15*np.cos(theta) y_outer = y + 15*np.sin(theta) outer_circle = go.Scatter(x=x_outer, y=y_outer, mode='lines', line=dict(width=2, color='red'), showlegend=False, hoverinfo='skip') # Inner circle x_inner = x + np.cos(theta) y_inner = y + np.sin(theta) inner_circle = go.Scatter(x=x_inner, y=y_inner, mode='lines', fill='toself', fillcolor='rgba(255, 0, 0, 0.43)', line=dict(color='rgba(255, 0, 0, 1)', width=2), showlegend=False, hoverinfo='skip') return [outer_circle, inner_circle] #segments fig = go.Figure() if vertical : setting_dict = { "full" : [-101, 101], "offense" : [0, 101], "ozone" : [25, 101], "defense" : [-101, 0], "dzone" : [-101, -25], "neutral" : [-25,25] } fig.update_layout(xaxis=dict(range=[-42.6, 42.6], showgrid=False, zeroline=False, showticklabels=False, constrain="domain"), yaxis=dict(range=setting_dict[setting], showgrid=False, zeroline=False, showticklabels=False, constrain="domain"), showlegend=False, autosize=True, template="plotly_white") fig.update_yaxes( scaleanchor="x", scaleratio=1, ) def goal_crease(flip=1): x_seq = np.linspace(-4, 4, 100) x_goal = np.concatenate(([-4], x_seq, [4])) y_goal = flip * np.concatenate(([89], 83 + x_seq**2/4**2*1.5, [89])) goal_crease = go.Scatter(x=x_goal, y=y_goal, fill='toself', fillcolor='rgba(173, 216, 230, 0.3)', line=dict(color='red')) return goal_crease # Outer circle theta = np.linspace(0, 2*np.pi, 300) x_outer = 15 * np.cos(theta) y_outer = 15 * np.sin(theta) fig.add_trace(go.Scatter(x=x_outer, y=y_outer, mode='lines', line=dict(color='royalblue', width=2), showlegend=False, hoverinfo='skip')) # Inner circle theta2 = np.linspace(np.pi/2, 3*np.pi/2, 300) x_inner = 42.5 + 10 * np.cos(theta2) y_inner = 10 * np.sin(theta2) fig.add_trace(go.Scatter(x=x_inner, y=y_inner, mode='lines', line=dict(color='red', width=2), showlegend=False, hoverinfo='skip')) # Rink boundaries fig.add_shape(type='rect', xref='x', yref='y', x0=-42.5, y0=25, x1=42.5, y1=26, line=dict(color='royalblue', width=1), fillcolor='royalblue', opacity=1) fig.add_shape(type='rect', xref='x', yref='y', x0=-42.5, y0=-25, x1=42.5, y1=-26, line=dict(color='royalblue', width=1), fillcolor='royalblue', opacity=1) fig.add_shape(type='rect', xref='x', yref='y', x0=-42.5, y0=-0.5, x1=42.5, y1=0.5, line=dict(color='red', width=2), fillcolor='red') # Goal crease fig.add_trace(goal_crease()) fig.add_trace(goal_crease(-1)) # Goal lines goal_line_extreme = 42.5 - 28 + np.sqrt(28**2 - (28-11)**2) fig.add_shape(type='line', xref='x', yref='y', x0=-goal_line_extreme, y0=89, x1=goal_line_extreme, y1=89, line=dict(color='red', width=2)) fig.add_shape(type='line', xref='x', yref='y', x0=-goal_line_extreme, y0=-89, x1=goal_line_extreme, y1=-89, line=dict(color='red', width=2)) # Faceoff circles fig.add_traces(faceoff_circle(-22, 69)) fig.add_traces(faceoff_circle(22, 69)) fig.add_traces(faceoff_circle(-22, -69)) fig.add_traces(faceoff_circle(22, -69)) # Sidelines theta_lines = np.linspace(0, np.pi/2, 20) x_lines1 = np.concatenate(([-42.5], -42.5 + 28 - 28*np.cos(theta_lines), 42.5 - 28 + 28*np.cos(np.flip(theta_lines)))) y_lines1 = np.concatenate(([15], 72 + 28*np.sin(theta_lines), 72 + 28*np.sin(np.flip(theta_lines)))) x_lines2 = np.concatenate(([-42.5], -42.5 + 28 - 28*np.cos(theta_lines), 42.5 - 28 + 28*np.cos(np.flip(theta_lines)))) y_lines2 = np.concatenate(([15], -72 - 28*np.sin(theta_lines), -72 - 28*np.sin(np.flip(theta_lines)))) fig.add_trace(go.Scatter(x=x_lines1, y=y_lines1, mode='lines', line=dict(color='black', width=2), showlegend=False, hoverinfo='skip')) fig.add_trace(go.Scatter(x=x_lines2, y=y_lines2, mode='lines', line=dict(color='black', width=2), showlegend=False, hoverinfo='skip')) fig.add_shape(type='line', xref='x', yref='y', x0=42.5, y0=-72.5, x1=42.5, y1=72.5, line=dict(color='black', width=2)) fig.add_shape(type='line', xref='x', yref='y', x0=-42.5, y0=-72.5, x1=-42.5, y1=72.5, line=dict(color='black', width=2)) else : setting_dict = { "full" : [-101, 101], "offense" : [0, 101], "ozone" : [25, 101], "defense" : [-101, 0], "dzone" : [-101, -25] } fig.update_layout(xaxis=dict(range=setting_dict[setting], showgrid=False, zeroline=False, showticklabels=False), yaxis=dict(range=[-42.6, 42.6], showgrid=False, zeroline=False, showticklabels=False, constrain="domain"), showlegend=True, autosize =True, template="plotly_white") fig.update_yaxes( scaleanchor="x", scaleratio=1, ) def goal_crease(flip=1): y_seq = np.linspace(-4, 4, 100) y_goal = np.concatenate(([-4], y_seq, [4])) x_goal = flip * np.concatenate(([89], 83 + y_seq**2/4**2*1.5, [89])) goal_crease = go.Scatter(x=x_goal, y=y_goal, fill='toself', fillcolor='rgba(173, 216, 230, 0.3)', line=dict(color='red'), showlegend=False, hoverinfo='skip') return goal_crease # Outer circle theta = np.linspace(0, 2 * np.pi, 300) x_outer = 15 * np.sin(theta) y_outer = 15 * np.cos(theta) fig.add_trace(go.Scatter(x=x_outer, y=y_outer, mode='lines', line=dict(color='royalblue', width=2), showlegend=False, hoverinfo='skip')) # Inner circle theta2 = np.linspace(3 * np.pi / 2, np.pi / 2, 300) # Update theta2 to rotate the plot by 180 degrees x_inner = 10 * np.sin(theta2) # Update x_inner to rotate the plot by 180 degrees y_inner = -42.5 - 10 * np.cos(theta2) # Update y_inner to rotate the plot by 180 degrees fig.add_trace(go.Scatter(x=x_inner, y=y_inner, mode='lines', line=dict(color='red', width=2), showlegend=False, hoverinfo='skip')) # Rink boundaries fig.add_shape(type='rect', xref='x', yref='y', x0=25, y0=-42.5, x1=26, y1=42.5, line=dict(color='royalblue', width=1), fillcolor='royalblue', opacity=1) fig.add_shape(type='rect', xref='x', yref='y', x0=-25, y0=-42.5, x1=-26, y1=42.5, line=dict(color='royalblue', width=1), fillcolor='royalblue', opacity=1) fig.add_shape(type='rect', xref='x', yref='y', x0=-0.5, y0=-42.5, x1=0.5, y1=42.5, line=dict(color='red', width=2), fillcolor='red') # Goal crease fig.add_trace(goal_crease()) fig.add_trace(goal_crease(-1)) # Goal lines goal_line_extreme = 42.5 - 28 + np.sqrt(28 ** 2 - (28 - 11) ** 2) fig.add_shape(type='line', xref='x', yref='y', x0=89, y0=-goal_line_extreme, x1=89, y1=goal_line_extreme, line=dict(color='red', width=2)) fig.add_shape(type='line', xref='x', yref='y', x0=-89, y0=-goal_line_extreme, x1=-89, y1=goal_line_extreme, line=dict(color='red', width=2)) # Faceoff circles fig.add_traces(faceoff_circle(-69, -22)) fig.add_traces(faceoff_circle(-69, 22)) fig.add_traces(faceoff_circle(69, -22)) fig.add_traces(faceoff_circle(69, 22)) # Sidelines theta_lines = np.linspace(0, np.pi / 2, 20) x_lines1 = np.concatenate(([15], 72 + 28 * np.sin(theta_lines), 72 + 28 * np.sin(np.flip(theta_lines)))) y_lines1 = np.concatenate(([-42.5], -42.5 + 28 - 28 * np.cos(theta_lines), 42.5 - 28 + 28 * np.cos(np.flip(theta_lines)))) x_lines2 = np.concatenate(([15], -72 - 28 * np.sin(theta_lines), -72 - 28 * np.sin(np.flip(theta_lines)))) y_lines2 = np.concatenate(([-42.5], -42.5 + 28 - 28 * np.cos(theta_lines), 42.5 - 28 + 28 * np.cos(np.flip(theta_lines)))) fig.add_trace(go.Scatter(x=x_lines1, y=y_lines1, mode='lines', line=dict(color='black', width=2), showlegend=False, hoverinfo='skip')) fig.add_trace(go.Scatter(x=x_lines2, y=y_lines2, mode='lines', line=dict(color='black', width=2), showlegend=False, hoverinfo='skip')) fig.add_shape(type='line', xref='x', yref='y', x0=-72.5, y0=-42.5, x1=72.5, y1=-42.5, line=dict(color='black', width=2)) fig.add_shape(type='line', xref='x', yref='y', x0=-72.5, y0=42.5, x1=72.5, y1=42.5, line=dict(color='black', width=2)) return fig
/rink_plotly-0.1.0-py3-none-any.whl/rink_plotly-0.1.0.data/scripts/rink_plot.py
0.661376
0.581719
rink_plot.py
pypi
import numpy as np import plotly.graph_objects as go def rink(setting = "full", vertical = False): ''' Function to plot rink in Plotly. Takes 2 arguments : setting : full (default) for full ice, offense positive half of the ice, ozone positive quarter of ice, defense for negative half of the ice, dzone for negative quarter of the ice, and neutral for the neutral zone vertical : True if you want a vertical rink, False (default) is for an horizontal rink ''' def faceoff_circle(x, y): theta = np.linspace(0, 2*np.pi, 300) # Outer circle x_outer = x + 15*np.cos(theta) y_outer = y + 15*np.sin(theta) outer_circle = go.Scatter(x=x_outer, y=y_outer, mode='lines', line=dict(width=2, color='red'), showlegend=False, hoverinfo='skip') # Inner circle x_inner = x + np.cos(theta) y_inner = y + np.sin(theta) inner_circle = go.Scatter(x=x_inner, y=y_inner, mode='lines', fill='toself', fillcolor='rgba(255, 0, 0, 0.43)', line=dict(color='rgba(255, 0, 0, 1)', width=2), showlegend=False, hoverinfo='skip') return [outer_circle, inner_circle] #segments fig = go.Figure() if vertical : setting_dict = { "full" : [-101, 101], "offense" : [0, 101], "ozone" : [25, 101], "defense" : [-101, 0], "dzone" : [-101, -25], "neutral" : [-25,25] } fig.update_layout(xaxis=dict(range=[-42.6, 42.6], showgrid=False, zeroline=False, showticklabels=False, constrain="domain"), yaxis=dict(range=setting_dict[setting], showgrid=False, zeroline=False, showticklabels=False, constrain="domain"), showlegend=False, autosize=True, template="plotly_white") fig.update_yaxes( scaleanchor="x", scaleratio=1, ) def goal_crease(flip=1): x_seq = np.linspace(-4, 4, 100) x_goal = np.concatenate(([-4], x_seq, [4])) y_goal = flip * np.concatenate(([89], 83 + x_seq**2/4**2*1.5, [89])) goal_crease = go.Scatter(x=x_goal, y=y_goal, fill='toself', fillcolor='rgba(173, 216, 230, 0.3)', line=dict(color='red')) return goal_crease # Outer circle theta = np.linspace(0, 2*np.pi, 300) x_outer = 15 * np.cos(theta) y_outer = 15 * np.sin(theta) fig.add_trace(go.Scatter(x=x_outer, y=y_outer, mode='lines', line=dict(color='royalblue', width=2), showlegend=False, hoverinfo='skip')) # Inner circle theta2 = np.linspace(np.pi/2, 3*np.pi/2, 300) x_inner = 42.5 + 10 * np.cos(theta2) y_inner = 10 * np.sin(theta2) fig.add_trace(go.Scatter(x=x_inner, y=y_inner, mode='lines', line=dict(color='red', width=2), showlegend=False, hoverinfo='skip')) # Rink boundaries fig.add_shape(type='rect', xref='x', yref='y', x0=-42.5, y0=25, x1=42.5, y1=26, line=dict(color='royalblue', width=1), fillcolor='royalblue', opacity=1) fig.add_shape(type='rect', xref='x', yref='y', x0=-42.5, y0=-25, x1=42.5, y1=-26, line=dict(color='royalblue', width=1), fillcolor='royalblue', opacity=1) fig.add_shape(type='rect', xref='x', yref='y', x0=-42.5, y0=-0.5, x1=42.5, y1=0.5, line=dict(color='red', width=2), fillcolor='red') # Goal crease fig.add_trace(goal_crease()) fig.add_trace(goal_crease(-1)) # Goal lines goal_line_extreme = 42.5 - 28 + np.sqrt(28**2 - (28-11)**2) fig.add_shape(type='line', xref='x', yref='y', x0=-goal_line_extreme, y0=89, x1=goal_line_extreme, y1=89, line=dict(color='red', width=2)) fig.add_shape(type='line', xref='x', yref='y', x0=-goal_line_extreme, y0=-89, x1=goal_line_extreme, y1=-89, line=dict(color='red', width=2)) # Faceoff circles fig.add_traces(faceoff_circle(-22, 69)) fig.add_traces(faceoff_circle(22, 69)) fig.add_traces(faceoff_circle(-22, -69)) fig.add_traces(faceoff_circle(22, -69)) # Sidelines theta_lines = np.linspace(0, np.pi/2, 20) x_lines1 = np.concatenate(([-42.5], -42.5 + 28 - 28*np.cos(theta_lines), 42.5 - 28 + 28*np.cos(np.flip(theta_lines)))) y_lines1 = np.concatenate(([15], 72 + 28*np.sin(theta_lines), 72 + 28*np.sin(np.flip(theta_lines)))) x_lines2 = np.concatenate(([-42.5], -42.5 + 28 - 28*np.cos(theta_lines), 42.5 - 28 + 28*np.cos(np.flip(theta_lines)))) y_lines2 = np.concatenate(([15], -72 - 28*np.sin(theta_lines), -72 - 28*np.sin(np.flip(theta_lines)))) fig.add_trace(go.Scatter(x=x_lines1, y=y_lines1, mode='lines', line=dict(color='black', width=2), showlegend=False, hoverinfo='skip')) fig.add_trace(go.Scatter(x=x_lines2, y=y_lines2, mode='lines', line=dict(color='black', width=2), showlegend=False, hoverinfo='skip')) fig.add_shape(type='line', xref='x', yref='y', x0=42.5, y0=-72.5, x1=42.5, y1=72.5, line=dict(color='black', width=2)) fig.add_shape(type='line', xref='x', yref='y', x0=-42.5, y0=-72.5, x1=-42.5, y1=72.5, line=dict(color='black', width=2)) else : setting_dict = { "full" : [-101, 101], "offense" : [0, 101], "ozone" : [25, 101], "defense" : [-101, 0], "dzone" : [-101, -25] } fig.update_layout(xaxis=dict(range=setting_dict[setting], showgrid=False, zeroline=False, showticklabels=False), yaxis=dict(range=[-42.6, 42.6], showgrid=False, zeroline=False, showticklabels=False, constrain="domain"), showlegend=True, autosize =True, template="plotly_white") fig.update_yaxes( scaleanchor="x", scaleratio=1, ) def goal_crease(flip=1): y_seq = np.linspace(-4, 4, 100) y_goal = np.concatenate(([-4], y_seq, [4])) x_goal = flip * np.concatenate(([89], 83 + y_seq**2/4**2*1.5, [89])) goal_crease = go.Scatter(x=x_goal, y=y_goal, fill='toself', fillcolor='rgba(173, 216, 230, 0.3)', line=dict(color='red'), showlegend=False, hoverinfo='skip') return goal_crease # Outer circle theta = np.linspace(0, 2 * np.pi, 300) x_outer = 15 * np.sin(theta) y_outer = 15 * np.cos(theta) fig.add_trace(go.Scatter(x=x_outer, y=y_outer, mode='lines', line=dict(color='royalblue', width=2), showlegend=False, hoverinfo='skip')) # Inner circle theta2 = np.linspace(3 * np.pi / 2, np.pi / 2, 300) # Update theta2 to rotate the plot by 180 degrees x_inner = 10 * np.sin(theta2) # Update x_inner to rotate the plot by 180 degrees y_inner = -42.5 - 10 * np.cos(theta2) # Update y_inner to rotate the plot by 180 degrees fig.add_trace(go.Scatter(x=x_inner, y=y_inner, mode='lines', line=dict(color='red', width=2), showlegend=False, hoverinfo='skip')) # Rink boundaries fig.add_shape(type='rect', xref='x', yref='y', x0=25, y0=-42.5, x1=26, y1=42.5, line=dict(color='royalblue', width=1), fillcolor='royalblue', opacity=1) fig.add_shape(type='rect', xref='x', yref='y', x0=-25, y0=-42.5, x1=-26, y1=42.5, line=dict(color='royalblue', width=1), fillcolor='royalblue', opacity=1) fig.add_shape(type='rect', xref='x', yref='y', x0=-0.5, y0=-42.5, x1=0.5, y1=42.5, line=dict(color='red', width=2), fillcolor='red') # Goal crease fig.add_trace(goal_crease()) fig.add_trace(goal_crease(-1)) # Goal lines goal_line_extreme = 42.5 - 28 + np.sqrt(28 ** 2 - (28 - 11) ** 2) fig.add_shape(type='line', xref='x', yref='y', x0=89, y0=-goal_line_extreme, x1=89, y1=goal_line_extreme, line=dict(color='red', width=2)) fig.add_shape(type='line', xref='x', yref='y', x0=-89, y0=-goal_line_extreme, x1=-89, y1=goal_line_extreme, line=dict(color='red', width=2)) # Faceoff circles fig.add_traces(faceoff_circle(-69, -22)) fig.add_traces(faceoff_circle(-69, 22)) fig.add_traces(faceoff_circle(69, -22)) fig.add_traces(faceoff_circle(69, 22)) # Sidelines theta_lines = np.linspace(0, np.pi / 2, 20) x_lines1 = np.concatenate(([15], 72 + 28 * np.sin(theta_lines), 72 + 28 * np.sin(np.flip(theta_lines)))) y_lines1 = np.concatenate(([-42.5], -42.5 + 28 - 28 * np.cos(theta_lines), 42.5 - 28 + 28 * np.cos(np.flip(theta_lines)))) x_lines2 = np.concatenate(([15], -72 - 28 * np.sin(theta_lines), -72 - 28 * np.sin(np.flip(theta_lines)))) y_lines2 = np.concatenate(([-42.5], -42.5 + 28 - 28 * np.cos(theta_lines), 42.5 - 28 + 28 * np.cos(np.flip(theta_lines)))) fig.add_trace(go.Scatter(x=x_lines1, y=y_lines1, mode='lines', line=dict(color='black', width=2), showlegend=False, hoverinfo='skip')) fig.add_trace(go.Scatter(x=x_lines2, y=y_lines2, mode='lines', line=dict(color='black', width=2), showlegend=False, hoverinfo='skip')) fig.add_shape(type='line', xref='x', yref='y', x0=-72.5, y0=-42.5, x1=72.5, y1=-42.5, line=dict(color='black', width=2)) fig.add_shape(type='line', xref='x', yref='y', x0=-72.5, y0=42.5, x1=72.5, y1=42.5, line=dict(color='black', width=2)) return fig
/rink_plotly-0.1.0-py3-none-any.whl/rink_plotly/rink_plot.py
0.661376
0.581719
rink_plot.py
pypi
.. _styling: Element Styling =============== This section describes how styles defined in a style sheet are applied to document elements. Understanding how this works will help you when designing a custom style sheet. rinohtype's style sheets are heavily inspired by CSS_, but add some additional functionality. Similar to CSS, rinohtype makes use of so-called *selectors* to select document elements in the *document tree* to style. Unlike CSS however, these selectors are not directly specified in a style sheet. Instead, all selectors are collected in a *matcher* where they are mapped to descriptive labels for the selected elements. A *style sheet* assigns style properties to these labels. Besides the usefulness of having these labels instead of the more cryptic selectors, a matcher can be reused by multiple style sheets, avoiding duplication. .. note:: This section currently assumes some Python or general object-oriented programming knowledge. A future update will move Python-specific details to another section, making things more accessible for non-programmers. .. _CSS: https://en.wikipedia.org/wiki/Cascading_Style_Sheets Document Tree ------------- A :class:`.Flowable` is a document element that is placed on a page. It is usually a part of a document tree. Flowables at one level in a document tree are rendered one below the other. Here is schematic representation of an example document tree:: |- Section | |- Paragraph | \- Paragraph \- Section |- Paragraph |- List | |- ListItem | | |- Paragraph (item label; a number or bullet symbol) | | \- StaticGroupedFlowables (item body) | | \- Paragraph | \- ListItem | \- Paragraph | | \- StaticGroupedFlowables | | \- List | | |- ListItem | | | \- ... | | \- ... \- Paragraph This represents a document consisting of two sections. The first section contains two paragraphs. The second section contains a paragraph followed by a list and another paragraph. All of the elements in this tree are instances of :class:`.Flowable` subclasses. :class:`.Section` and :class:`List` are subclasses of :class:`.GroupedFlowables`; they group a number of flowables. In the case of :class:`.List`, these are always of the :class:`.ListItem` type. Each list item contains an item number (ordered list) or a bullet symbol (unordered list) and an item body. For simple lists, the item body is typically a single :class:`.Paragraph`. The second list item contains a nested :class:`.List`. A :class:`.Paragraph` does not have any :class:`.Flowable` children. It is however the root node of a tree of *inline elements*. This is an example paragraph in which several text styles are combined:: Paragraph |- SingleStyledText('Text with ') |- MixedStyledText(style='emphasis') | |- SingleStyledText('multiple ') | \- MixedStyledText(style='strong') | |- SingleStyledText('nested ') | \- SingleStyledText('styles', style='small caps') \- SingleStyledText('.') The visual representation of the words in this paragraph is determined by the applied style sheet. Read more about how this works in the next section. Besides :class:`.SingleStyledText` and :class:`.MixedStyledText` elements (subclasses of :class:`.StyledText`), paragraphs can also contain :class:`.InlineFlowable`\ s. Currently, the only inline flowable is :class:`.InlineImage`. The common superclass for flowable and inline elements is :class:`.Styled`, which indicates that these elements can be styled using the style sheets. Selectors --------- Selectors in rinohtype select elements of a particular type. The *class* of a document element serves as a selector for all instances of the class (and its subclasses). The :class:`.Paragraph` class is a selector that matches all paragraphs in the document, for example:: Paragraph As with `CSS selectors`_, elements can also be matched based on their context. For example, the following matches any paragraph that is a direct child of a list item or in other words, a list item label:: ListItem / Paragraph Python's :ref:`ellipsis <python:bltin-ellipsis-object>` can be used to match any number of levels of elements in the document tree. The following selector matches paragraphs at any level inside a table cell:: TableCell / ... / Paragraph To help avoid duplicating selector definitions, context selectors can reference other selectors defined in the same :ref:`matcher <matchers>` using :class:`SelectorByName`:: SelectorByName('definition term') / ... / Paragraph Selectors can select all instances of :class:`.Styled` subclasses. These include :class:`.Flowable` and :class:`.StyledText`, but also :class:`.TableSection`, :class:`.TableRow`, :class:`.Line` and :class:`.Shape`. Elements of some of the latter classes only appear as children of other flowables (such as :class:`.Table`). Similar to a HTML element's *class* attribute, :class:`.Styled` elements can have an optional *style* attribute which can be used when constructing a selector. This one selects all styled text elements with the *emphasis* style, for example:: StyledText.like('emphasis') The :meth:`.Styled.like` method can also match **arbitrary attributes** of elements by passing them as keyword arguments. This can be used to do more advanced things such as selecting the background objects on all odd rows of a table, limited to the cells not spanning multiple rows:: TableCell.like(row_index=slice(0, None, 2), rowspan=1) / TableCellBackground The argument passed as *row_index* is a slice object that is used for extended indexing\ [#slice]_. To make this work, :attr:`.TableCell.row_index` is an object with a custom :meth:`__eq__` that allows comparison to a slice. Rinohtype borrows CSS's concept of `specificity`_ to determine the "winning" selector when multiple selectors match a given document element. Each part of a selector adds to the specificity of a selector. Roughly stated, the more specific selector will win. For example:: ListItem / Paragraph # specificity (0, 0, 0, 0, 2) wins over:: Paragraph # specificity (0, 0, 0, 0, 1) since it matches two elements instead of just one. Specificity is represented as a 5-tuple. The last four elements represent the number of *location* (currently not used), *style*, *attribute* and *class* matches. Here are some selectors along with their specificity:: StyledText.like('emphasis') # specificity (0, 0, 1, 0, 1) TableCell / ... / Paragraph # specificity (0, 0, 0, 0, 2) TableCell.like(row_index=2, rowspan=1) # specificity (0, 0, 0, 2, 1) Specificity ordering is the same as tuple ordering, so (0, 0, 1, 0, 0) wins over (0, 0, 0, 5, 0) and (0, 0, 0, 0, 3) for example. Only when the number of style matches are equal, the attributes match count is compared and so on. In practice, the class match count is dependent on the element being matched. If the class of the element exactly matches the selector, the right-most specificity value is increased by 2. If the element's class is a subclass of the selector, it is only increased by 1. The first element of the specificity tuple is the *priority* of the selector. For most selectors, the priority will have the default value of 0. The priority of a selector only needs to be set in some cases. For example, we want the :class:`.CodeBlock` selector to match a :class:`.CodeBlock` instance. However, because :class:`.CodeBlock` is a :class:`.Paragraph` subclass, another selector with a higher specificity will also match it:: CodeBlock # specificity (0, 0, 0, 0, 2) DefinitionList / Definition / Paragraph # specificity (0, 0, 0, 0, 3) To make sure the :class:`.CodeBlock` selector wins, we increase the priority of the :class:`.CodeBlock` selector by prepending it with a ``+`` sign:: +CodeBlock # specificity (1, 0, 0, 0, 2) In general, you can use multiple ``+`` or ``-`` signs to adjust the priority:: ++CodeBlock # specificity (2, 0, 0, 0, 2) ---CodeBlock # specificity (-3, 0, 0, 0, 2) .. _CSS selectors: https://en.wikipedia.org/wiki/Cascading_Style_Sheets#Selector .. _specificity: https://en.wikipedia.org/wiki/Cascading_St174yle_Sheets#Specificity .. _matchers: Matchers -------- At the most basic level, a :class:`.StyledMatcher` is a dictionary that maps labels to selectors:: matcher = StyledMatcher() ... matcher['emphasis'] = StyledText.like('emphasis') matcher['chapter'] = Section.like(level=1) matcher['list item number'] = ListItem / Paragraph matcher['nested line block'] = (GroupedFlowables.like('line block') / GroupedFlowables.like('line block')) ... Rinohtype currently includes one matcher which defines labels for all common elements in documents:: from rinoh.stylesheets import matcher Style Sheets ------------ A :class:`.StyleSheet` takes a :class:`.StyledMatcher` to provide element labels to assign style properties to:: styles = StyleSheet('IEEE', matcher=matcher) ... styles['strong'] = TextStyle(font_weight=BOLD) styles('emphasis', font_slant=ITALIC) styles('nested line block', margin_left=0.5*CM) ... Each :class:`.Styled` has a :class:`.Style` class associated with it. For :class:`.Paragraph`, this is :class:`.ParagraphStyle`. These style classes determine which style attributes are accepted for the styled element. Because the style class can automatically be determined from the selector, it is possible to simply pass the style properties to the style sheet by calling the :class:`.StyleSheet` instance as shown above. Style sheets are usually loaded from a `.rts` file using :class:`.StyleSheetFile`. An example style sheet file is shown in :ref:`basics_stylesheets`. A style sheet file contains a number of sections, denoted by a section title enclosed in square brackets. There are two special sections: - ``[STYLESHEET]`` describes global style sheet information (see :class:`.StyleSheetFile` for details) - ``[VARIABLES]`` collects variables that can be referenced elsewhere in the style sheet Other sections define the style for a document elements. The section titles correspond to the labels associated with selectors in the :class:`.StyledMatcher`. Each entry in a section sets a value for a style attribute. The style for enumerated lists is defined like this, for example: .. code-block:: ini [enumerated list] margin_left=8pt space_above=5pt space_below=5pt ordered=true flowable_spacing=5pt number_format=NUMBER label_suffix=')' Since this is an enumerated list, *ordered* is set to ``true``. *number_format* and *label_suffix* are set to produce list items labels of the style *1)*, *2)*, .... Other entries control margins and spacing. See :class:`.ListStyle` for the full list of accepted style attributes. .. todo:: base stylesheets are specified by name ... entry points Base Styles ~~~~~~~~~~~ It is possible to define styles which are not linked to a selector. These can be useful to collect common attributes in a base style for a set of style definitions. For example, the Sphinx style sheet defines the *header_footer* style to serve as a base for the *header* and *footer* styles: .. code-block:: ini [header_footer : Paragraph] base=default typeface=$(sans_typeface) font_size=10pt font_weight=BOLD indent_first=0pt tab_stops=50% CENTER, 100% RIGHT [header] base=header_footer padding_bottom=2pt border_bottom=$(thin_black_stroke) space_below=24pt [footer] base=header_footer padding_top=4pt border_top=$(thin_black_stroke) space_above=18pt Because there is no selector associated with *header_footer*, the element type needs to be specified manually. This is done by adding the name of the relevant :class:`.Styled` subclass to the section name, using a colon (``:``) to separate it from the style name, optionally surrounded by spaces. Custom Selectors ~~~~~~~~~~~~~~~~ It is also possible to define new selectors directly in a style sheet file. This allows making tweaks to an existing style sheet without having to create a new :class:`.StyledMatcher`. However, this should be used sparingly. If a great number of custom selectors are required, it is better to create a new :class:`.StyledMatcher` The syntax for specifying a selector for a style is similar to that when constructing selectors in a Python source code (see `Matchers`_), but with a number of important differences. A :class:`.Styled` subclass name followed by parentheses represents a simple class selector (without context). Arguments to be passed to :meth:`.Styled.like()` can be included within the parentheses. .. code-block:: ini [special text : StyledText('special')] font_color=#FF00FF [accept button : InlineImage(filename='images/ok_button.png')] baseline=20% Even if no arguments are passed to the class selector, it is important that the class name is followed by parentheses. If the parentheses are omitted, the selector is not registered with the matcher and the style can only be used as a base style for other style definitions (see `Base Styles`_). As in Python source code, context selectors are constructed using forward slashes (``/``) and the ellipsis (``...``). Another selector can be referenced in a context selector by enclosing its name in single or double quotes. .. code-block:: ini [admonition title colon : Admonition / ... / StyledText('colon')] font_size=10pt [chapter title : LabeledFlowable('chapter title')] label_spacing=1cm align_baselines=false [chapter title number : 'chapter title' / Paragraph('number')] font_size=96pt text_align=right Variables ~~~~~~~~~ Variables can be used for values that are used in multiple style definitions. This example declares a number of typefaces to allow easily replacing the fonts in a style sheet: .. code-block:: ini [VARIABLES] mono_typeface=TeX Gyre Cursor serif_typeface=TeX Gyre Pagella sans_typeface=Tex Gyre Heros thin_black_stroke=0.5pt,#000 blue=#20435c It also defines the *thin_black_stroke* line style for use in table and frame styles, and a specific color labelled *blue*. These variables can be referenced in style definitions as follows: .. code-block:: ini [code block] typeface=$(mono_typeface) font_size=9pt text_align=LEFT indent_first=0 space_above=6pt space_below=4pt border=$(thin_black_stroke) padding_left=5pt padding_top=1pt padding_bottom=3pt Another stylesheet can inherit (see below) from this one and easily replace fonts in the document by overriding the variables. Style Attribute Resolution ~~~~~~~~~~~~~~~~~~~~~~~~~~ The style system makes a distinction between text (inline) elements and flowables with respect to how attribute values are resolved. **Text elements** by default inherit the properties from their parent. Take for example the *emphasis* style definition from the example above. The value for style properties other than *font_slant* (which is defined in the *emphasis* style itself) will be looked up in the style definition corresponding to the parent element, which can be either another :class:`.StyledText` instance, or a :class:`.Paragraph`. If the parent element is a :class:`.StyledText` that neither defines the style attribute, lookup proceeds recursively, moving up in the document tree. For **flowables**, there is no fall-back to the parent's style by default. A base style can be specified explicitly however. If a style attribute is not present in a particular style definition, it is looked up in the base style. This can help avoid duplication of style information and the resulting maintenance difficulties. In the following example, the *unnumbered heading level 1* style inherits all properties from *heading level 1*, overriding only the *number_format* attribute: .. code-block:: ini [heading level 1] typeface=$(sans_typeface) font_weight=BOLD font_size=16pt font_color=$(blue) line_spacing=SINGLE space_above=18pt space_below=12pt number_format=NUMBER label_suffix=' ' [unnumbered heading level 1] base=heading level 1 number_format=None When a value for a particular style attribute is set nowhere in the style definition lookup hierarchy, its default value is returned. The default values for all style properties are defined in the class definition for each of the :class:`.Style` subclasses. For text elements, it is possible to override the default behavior of falling back to the parent's style. Setting *base* to the label of a :class:`.TextStyle` or :class:`.ParagraphStyle` prevents fallback to the parent element's style. For flowables, *base* can be set to ``PARENT_STYLE`` to enable fallback, but this requires that the current element type is the same or a subclass of the parent type, so it cannot be used for all styles. Style Logs ---------- When rendering a document, rinohtype will create a :index:`style log`. It is written to disk using the same base name as the output file, but with a `.stylelog` extension. The information logged in the style log is invaluable when debugging your style sheet. It tells you which style maps to each element in the document. The style log lists the document elements (as a tree) that have been rendered to each page, and for each element all matching styles are listed together with their specificity. No styles are listed when there aren't any selectors matching an element and the default values are used. The winning style is indicated with a ``>`` symbol. Styles that are not defined in the style sheet or its base(s) are marked with an ``x``. If none of the styles are defined, rinohtype falls back to using the default style. Here is an example excerpt from a style log: .. code-block:: text ... Paragraph('January 03, 2012', style='title page date') > (0,0,1,0,2) title page date (0,0,0,0,2) body SingleStyledText('January 03, 2012') ---------------------------------- page 3 ---------------------------------- #### ChainedContainer('column1') DocumentTree() Section(id='structural-elements') demo.txt:62 <section> > (0,0,0,1,2) chapter Heading('1 Structural Elements') demo.txt:62 <title> > (0,0,0,1,2) heading level 1 (0,0,0,0,2) other heading levels MixedStyledText('1 Structural Elements') SingleStyledText('1') MixedStyledText(' ') SingleStyledText(' ') SingleStyledText('Structural Elements') Paragraph('A paragraph.') demo.txt:64 <paragraph> > (0,0,0,0,2) body MixedStyledText('A paragraph.') SingleStyledText('A paragraph.') List(style='bulleted') demo.txt:66 <bullet_list> > (0,0,1,0,2) bulleted list ListItem() x (0,0,1,0,4) bulleted list item > fallback to default style ListItemLabel('•') > (0,0,1,0,6) bulleted list item label (0,0,0,0,2) list item label MixedStyledText('•') SingleStyledText('') SingleStyledText('•') StaticGroupedFlowables() demo.txt:66 <list_item> > (0,0,0,0,3) list item body ... .. [#slice] Indexing a list like this ``lst[slice(0, None, 2)]`` is equivalent to ``lst[0::2]``.
/rinohtype-reloaded-0.3.3.tar.gz/rinohtype-reloaded-0.3.3/doc/elementstyling.rst
0.945083
0.785761
elementstyling.rst
pypi
.. _basic_styling: Basic Document Styling ====================== rinohtype allows for fine-grained control over the style of its output. Most aspects of a document's style can be controlled by style sheet files and template configuration files which are being introduced in this chapter. These files are plain text files that are easy to create, read and modify. .. _basics_stylesheets: Style Sheets ~~~~~~~~~~~~ .. currentmodule:: rinoh.style A style sheet defines the look of each element in a document. For each type of document element, the style sheet assign values to the style properties available for that element. Style sheets are stored in plain text files using the Windows INI\ [#ini]_ format with the ``.rts`` extension. Below is an excerpt from the :doc:`sphinx_stylesheet` included with rinohtype. .. _base style sheet: .. literalinclude:: /../src/rinoh/data/stylesheets/sphinx.rts :language: ini :end-before: [italic] Except for ``[STYLESHEET]`` and ``[VARIABLES]``, each configuration section in a style sheet determines the style of a particular type of document element. The ``emphasis`` style, for example, determines the look of emphasized text, which is displayed in an italic font. This is similar to how HTML's cascading style sheets work. In rinohtype however, document elements are identified by means of a descriptive label (such as *emphasis*) instead of a cryptic selector. rinohtype also makes use of selectors, but these are collected in a :ref:`matcher <matchers>` which maps them to descriptive names to be used by many style sheets. Unless you are using rinohtype as a PDF library to create custom documents, the :ref:`default matcher <default_matcher>` should cover your needs. The following two subsections illustrate how to extend an existing style sheet and how to create a new, independent style sheet. For more in-depth information on style sheets, please refer to :ref:`styling`. Extending an Existing Style Sheet --------------------------------- Starting from an existing style sheet, it is easy to make small changes to the style of individual document elements. The following style sheet file is based on the Sphinx stylesheet included with rinohtype. .. code-block:: ini [STYLESHEET] name=My Style Sheet description=Small tweaks made to the Sphinx style sheet base=sphinx [VARIABLES] mono_typeface=Courier [emphasis] font_color=#00a [strong] base=DEFAULT_STYLE font_color=#a00 By default, styles defined in a style sheet *extend* the corresponding style from the base style sheet. In this example, emphasized text will be set in an italic font (as configured in the `base style sheet`_) and colored blue (``#00a``). It is also possible to completely override a style definition. This can be done by setting the ``base`` of a style definition to ``DEFAULT_STYLE`` as illustrated by the `strong` style. This causes strongly emphasised text to be displayed in red (#a00) but **not** in a bold font as was defined in the `base style sheet`_ (the default for ``font_weight`` is `Medium`; see :class:`~rinoh.text.TextStyle`). Refer to :ref:`default_matcher` to find out which style attributes are accepted by each style (by following the hyperlink to the style class's documentation). The style sheet also redefines the ``mono_typeface`` variable. This variable is used in the `base style sheet`_ in all style definitions where a monospaced font is desired. Redefining the variable in the derived style sheet affects all of these style definitions. Starting from Scratch --------------------- If you don't specify a base style sheet in the ``[STYLESHEET]`` section, you create an independent style sheet. You should do this if you want to create a document style that is not based on an existing style sheet. If the style definition for a particular document element is not included in the style sheet, the default values for its style properties are used. .. todo:: specifying a custom matcher for an INI style sheet Unless a custom :class:`StyledMatcher` is passed to :class:`StyleSheetFile`, the :ref:`default matcher <default_matcher>` is used. Providing your own matcher offers even more customizability, but it is unlikely you will need this. See :ref:`matchers`. .. note:: In the future, rinohtype will be able to generate an empty INI style sheet, listing all styles defined in the matcher with the supported style attributes along with the default values as comments. This generated style sheet can serve as a good starting point for developing a custom style sheet from scratch. .. _basics_templates: Document Templates ~~~~~~~~~~~~~~~~~~ As with style sheets, you can choose to make use of a template provided by rinohtype and optionally customize it or you can create a custom template from scratch. This section discusses how you can configure an existing template. See :ref:`templates` on how to create a custom template. .. _configure_templates: Configuring a Template ---------------------- rinohtype provides a number of :ref:`standard_templates`. These can be customized by means of a template configuration file; a plain text file in the INI\ [#ini]_ format with the ``.rtt`` extension. Here is an example configuration for the article template: .. literalinclude:: /my_article.rtt :language: ini The ``TEMPLATE_CONFIGURATION`` sections collects global template options. Set *name* to provide a short label for your template configuration. *template* identifies the :ref:`document template <standard_templates>` to configure. All document templates consist of a number of document parts. The :class:`.Article` template defines three parts: :attr:`~.Article.title`, :attr:`~.Article.front_matter` and :attr:`~.Article.contents`. The order of these parts can be changed (although that makes little sense for the article template), and individual parts can optionally be hidden by setting the :attr:`~.DocumentTemplate.parts` configuration option. The configuration above hides the front matter part (commented out using a semicolon), for example. The template configuration also specifies which style sheet is used for styling document elements. The :class:`.DocumentTemplate.stylesheet` option takes the name of an installed style sheet (see :option:`rinoh --list-stylesheets`) or the filename of a stylesheet file (``.rts``). The :class:`~.DocumentTemplate.language` option sets the default language for the document. It determines which language is used for standard document strings such as section and admonition titles. The :class:`.Article` template defines two custom template options. The :class:`~.Article.abstract_location` option determines where the (optional) article abstract is placed, on the title page or in the front matter part. :class:`~.Article.table_of_contents` allows hiding the table of contents section. Empty document parts will not be included in the document. When the table of contents section is suppressed and there is no abstract in the input document or :class:`~.Article.abstract_location` is set to title, the front matter document part will not appear in the PDF. The standard document strings configured by the :class:`~.DocumentTemplate.language` option described above can be overridden by user-defined strings in the :class:`SectionTitles` and :class:`AdmonitionTitles` sections of the configuration file. For example, the default title for the table of contents section (*Table of Contents*) is replaced with *Contents*. The configuration also sets custom titles for the caution and warning admonitions. The others sections in the configuration file are the ``VARIABLES`` section, followed by document part and page template sections. Similar to style sheets, the variables can be referenced in the template configuration sections. Here, the ``paper_size`` variable is set, which is being referenced by by all page templates in :class:`Article` (although indirectly through the :class:`~.Article.page` base page template). For document part templates, :class:`~.DocumentPartTemplate.page_number_format` determines how page numbers are formatted. When a document part uses the same page number format as the preceding part, the numbering is continued. The :class:`.DocumentPartTemplate.end_at_page` option controls at which page the document part ends. This is set to ``left`` for the title part in the example configuration to make the contents part start on a right page. Each document part finds page templates by name. They will first look for specific left/right page templates by appending ``_left_page`` or ``_right_page`` to the document part name. If these page templates have not been defined in the template, it will look for the more general ``<document part name>_page`` template. Note that, if left and right page templates have been defined by the template (such as the book template), the configuration will need to override these, as they will have priority over the general page template defined in the configuration. The example configuration only adjusts the top margin for the :class:`TitlePageTemplate`, but many more aspects of the page templates are configurable. Refer to :ref:`standard_templates` for details. .. todo:: base for part template? Using a Template Configuration File ----------------------------------- A template configuration file can be specified when rendering using the command-line :program:`rinoh` tool by passing it to the :option:`--template <rinoh --template>` command-line option. When using the :ref:`Sphinx_builder`, you can set the :confval:`rinoh_template` option in ``conf.py``. To render a document using this template configuration programatically, load the template file using :class:`.TemplateConfigurationFile`: .. include:: testcode.rst .. testcode:: my_document from rinoh.frontend.rst import ReStructuredTextReader from rinoh.template import TemplateConfigurationFile # the parser builds a rinohtype document tree parser = ReStructuredTextReader() with open('my_document.rst') as file: document_tree = parser.parse(file) # load the article template configuration file config = TemplateConfigurationFile('my_article.rtt') # render the document to 'my_document.pdf' document = config.document(document_tree) document.render('my_document') .. testoutput:: my_document :hide: ... Writing output: my_document.pdf The :meth:`.TemplateConfigurationFile.document` method creates a document instance with the template configuration applied. So if you want to render your document using a different template configuration, it suffices to load the new configuration file. Refer to the :class:`.Article` documentation to discover all of the options accepted by it and the document part and page templates. .. footnotes .. [#ini] see *Supported INI File Structure* in :mod:`python:configparser`
/rinohtype-reloaded-0.3.3.tar.gz/rinohtype-reloaded-0.3.3/doc/basicstyling.rst
0.91153
0.806205
basicstyling.rst
pypi
from .attribute import Attribute, OptionSet, Bool from .paragraph import ParagraphBase, ParagraphStyle from .style import Style from .text import StyledText __all__ = ['NumberStyle', 'Label', 'NumberedParagraph', 'format_number'] class NumberFormat(OptionSet): values = (None, 'number', 'symbol', 'lowercase character', 'uppercase character', 'lowercase roman', 'uppercase roman') # number: plain arabic numbers (1, 2, 3, ...) # lowercase character: lowercase letters (a, b, c, ..., aa, ab, ...) # uppercase character: uppercase letters (A, B, C, ..., AA, AB, ...) # lowercase roman: lowercase Roman numerals (i, ii, iii, iv, v, vi, ...) # uppercase roman: uppercase Roman numerals (I, II, III, IV, V, VI, ...) # symbol: symbols (*, †, ‡, §, ‖, ¶, #, **, *†, ...) def format_number(number, format): """Format `number` according the given `format` (:class:`NumberFormat`)""" if format == NumberFormat.NUMBER: return str(number) elif format == NumberFormat.LOWERCASE_CHARACTER: string = '' while number > 0: number, ordinal = divmod(number, 26) if ordinal == 0: ordinal = 26 number -= 1 string = chr(ord('a') - 1 + ordinal) + string return string elif format == NumberFormat.UPPERCASE_CHARACTER: return format_number(number, 'lowercase character').upper() elif format == NumberFormat.LOWERCASE_ROMAN: return romanize(number).lower() elif format == NumberFormat.UPPERCASE_ROMAN: return romanize(number) elif format == NumberFormat.SYMBOL: return symbolize(number) elif format == NumberFormat.NONE: return '' else: raise ValueError("Unknown number format '{}'".format(format)) # romanize by Kay Schluehr - from http://billmill.org/python_roman.html NUMERALS = (('M', 1000), ('CM', 900), ('D', 500), ('CD', 400), ('C', 100), ('XC', 90), ('L', 50), ('XL', 40), ('X', 10), ('IX', 9), ('V', 5), ('IV', 4), ('I', 1)) def romanize(number): """Convert `number` to a Roman numeral.""" roman = [] for numeral, value in NUMERALS: times, number = divmod(number, value) roman.append(times * numeral) return ''.join(roman) SYMBOLS = ('*', '†', '‡', '§', '‖', '¶', '#') def symbolize(number): """Convert `number` to a foot/endnote symbol.""" repeat, index = divmod(number - 1, len(SYMBOLS)) return SYMBOLS[index] * (1 + repeat) class LabelStyle(Style): label_prefix = Attribute(StyledText, None, 'Text to prepend to the label') label_suffix = Attribute(StyledText, None, 'Text to append to the label') custom_label = Attribute(Bool, False, 'Use a custom label if specified') class Label(object): def __init__(self, custom_label=None): self.custom_label = custom_label def format_label(self, label, container): prefix = self.get_style('label_prefix', container) or '' suffix = self.get_style('label_suffix', container) or '' return prefix + label + suffix class NumberStyle(LabelStyle): number_format = Attribute(NumberFormat, 'number', 'How numbers are formatted') class NumberedParagraphStyle(ParagraphStyle, NumberStyle): pass class NumberedParagraph(ParagraphBase, Label): style_class = NumberedParagraphStyle def __init__(self, content, custom_label=None, id=None, style=None, parent=None): super().__init__(id=id, style=style, parent=parent) Label.__init__(self, custom_label=custom_label) self.content = content def to_string(self, flowable_target): text = self.text(flowable_target) return ''.join(item.to_string(flowable_target) for item in text) @property def referenceable(self): raise NotImplementedError def number(self, container): document = container.document target_id = self.referenceable.get_id(document) formatted_number = document.get_reference(target_id, 'number') if formatted_number: return self.format_label(formatted_number, container) else: return '' def text(self, container): raise NotImplementedError
/rinohtype-reloaded-0.3.3.tar.gz/rinohtype-reloaded-0.3.3/src/rinoh/number.py
0.734024
0.196036
number.py
pypi
import binascii import struct from itertools import repeat from .attribute import AcceptNoneAttributeType, ParseError __all__ = ['Color', 'HexColor', 'BLACK', 'WHITE', 'RED', 'GREEN', 'BLUE', 'Gray', 'GRAY10', 'GRAY25', 'GRAY50', 'GRAY75', 'GRAY90'] class Color(AcceptNoneAttributeType): def __init__(self, red, green, blue, alpha=1): for value in (red, green, blue, alpha): if not 0 <= value <= 1: raise ValueError('Color component values can range from 0 to 1') self.r = red self.g = green self.b = blue self.a = alpha def __str__(self): rgba_bytes = struct.pack(4 * 'B', *(int(c * 255) for c in self.rgba)) string = binascii.hexlify(rgba_bytes).decode('ascii') if string.endswith('ff'): string = string[:-2] if string[::2] == string[1::2]: string = string[::2] return '#' + string def __repr__(self): return '{}({}, {}, {}, {})'.format(type(self).__name__, *self.rgba) @property def rgba(self): return self.r, self.g, self.b, self.a @classmethod def parse_string(cls, string): try: return HexColor(string) except ValueError: raise ParseError("'{}' is not a valid {}. Must be a HEX string." .format(string, cls.__name__)) @classmethod def doc_format(cls): return ('HEX string with optional alpha component ' '(``#RRGGBB``, ``#RRGGBBAA``, ``#RGB`` or ``#RGBA``)') class HexColor(Color): def __init__(self, string): if string.startswith('#'): string = string[1:] if len(string) in (3, 4): string = ''.join(repeated for char in string for repeated in repeat(char, 2)) string = string.encode('ascii') try: r, g, b = struct.unpack('BBB', binascii.unhexlify(string[:6])) if string[6:]: a, = struct.unpack('B', binascii.unhexlify(string[6:])) else: a = 255 except (struct.error, binascii.Error): raise ValueError('Bad color string passed to ' + self.__class__.__name__) super().__init__(*(value / 255 for value in (r, g, b, a))) class Gray(Color): def __init__(self, luminance, alpha=1): super().__init__(luminance, luminance, luminance, alpha) BLACK = Color(0, 0, 0) WHITE = Color(1, 1, 1) GRAY10 = Gray(0.10) GRAY25 = Gray(0.25) GRAY50 = Gray(0.50) GRAY75 = Gray(0.75) GRAY90 = Gray(0.90) RED = Color(1, 0, 0) GREEN = Color(0, 1, 0) BLUE = Color(0, 0, 1)
/rinohtype-reloaded-0.3.3.tar.gz/rinohtype-reloaded-0.3.3/src/rinoh/color.py
0.746046
0.278212
color.py
pypi
from .attribute import AttributeType, ParseError from .dimension import Dimension, INCH, MM __all__ = ['Paper', 'A0', 'A1', 'A2', 'A3', 'A4', 'A5', 'A6', 'A7', 'A8', 'A9', 'A10', 'LETTER', 'LEGAL', 'JUNIOR_LEGAL', 'LEDGER', 'TABLOID'] class Paper(AttributeType): """Defines a paper size. Args: name (str): the name of this paper type width (Dimension): the (portrait) width of this paper type height (Dimension): the (portrait) height of this paper type """ def __init__(self, name, width, height): self.name = name self.width = width self.height = height def __repr__(self): return ("{}('{}', width={}, height={})" .format(type(self).__name__, self.name, repr(self.width), repr(self.height))) def __str__(self): return self.name @classmethod def parse_string(cls, string): try: return PAPER_BY_NAME[string.lower()] except KeyError: try: width, height = (Dimension.from_string(part.strip()) for part in string.split('*')) except ValueError: raise ParseError("'{}' is not a valid {} format" .format(string, cls.__name__)) return cls(string, width, height) @classmethod def doc_format(cls): return ('the name of a :ref:`predefined paper format <paper>` ' 'or ``<width> * <height>`` where ``width`` and ``height`` are ' ':class:`.Dimension`\ s') # International (DIN 476 / ISO 216) A0 = Paper('A0', 841*MM, 1189*MM) #: A1 = Paper('A1', 594*MM, 841*MM) #: A2 = Paper('A2', 420*MM, 594*MM) #: A3 = Paper('A3', 297*MM, 420*MM) #: A4 = Paper('A4', 210*MM, 297*MM) #: A5 = Paper('A5', 148*MM, 210*MM) #: A6 = Paper('A6', 105*MM, 148*MM) #: A7 = Paper('A7', 74*MM, 105*MM) #: A8 = Paper('A8', 52*MM, 74*MM) #: A9 = Paper('A9', 37*MM, 52*MM) #: A10 = Paper('A10', 26*MM, 37*MM) #: # North America LETTER = Paper('letter', 8.5*INCH, 11*INCH) #: LEGAL = Paper('legal', 8.5*INCH, 14*INCH) #: JUNIOR_LEGAL = Paper('junior legal', 8*INCH, 5*INCH) #: LEDGER = Paper('ledger', 17*INCH, 11*INCH) #: TABLOID = Paper('tabloid', 11*INCH, 17*INCH) #: PAPER_BY_NAME = {paper.name.lower(): paper for paper in globals().values() if isinstance(paper, Paper)}
/rinohtype-reloaded-0.3.3.tar.gz/rinohtype-reloaded-0.3.3/src/rinoh/paper.py
0.740644
0.311636
paper.py
pypi
from itertools import chain from .attribute import Attribute, Bool, Integer, OverrideDefault from .draw import Line, LineStyle from .element import create_destination from .flowable import GroupedFlowables, StaticGroupedFlowables from .flowable import PageBreak, PageBreakStyle from .flowable import LabeledFlowable, GroupedLabeledFlowables from .flowable import Flowable, FlowableStyle, GroupedFlowablesStyle from .layout import PageBreakException from .number import NumberStyle, Label, LabelStyle, format_number from .number import NumberedParagraph, NumberedParagraphStyle from .paragraph import ParagraphStyle, ParagraphBase, Paragraph from .reference import (ReferenceField, ReferencingParagraph, ReferencingParagraphStyle) from .reference import ReferenceType from .text import StyledText, SingleStyledText, MixedStyledText, Tab from .style import PARENT_STYLE from .strings import StringCollection, String, StringField from .util import NotImplementedAttribute __all__ = ['Section', 'Heading', 'ListStyle', 'List', 'ListItem', 'ListItemLabel', 'DefinitionList', 'Header', 'Footer', 'TableOfContentsSection', 'TableOfContentsStyle', 'TableOfContents', 'ListOfStyle', 'TableOfContentsEntry', 'Admonition', 'AdmonitionStyle', 'HorizontalRule', 'HorizontalRuleStyle'] class SectionTitles(StringCollection): """Collection of localized titles for common sections""" contents = String('Title for the table of contents section') list_of_figures = String('Title for the list of figures section') list_of_tables = String('Title for the list of tables section') chapter = String('Label for top-level sections') index = String('Title for the index section') class SectionStyle(GroupedFlowablesStyle, PageBreakStyle): show_in_toc = Attribute(Bool, True, 'List this section in the table of ' 'contents') class NewChapterException(PageBreakException): pass class Section(StaticGroupedFlowables, PageBreak): """A subdivision of a document A section usually has a heading associated with it, which is optionally numbered. """ style_class = SectionStyle exception_class = NewChapterException @property def category(self): return 'Chapter' if self.level == 1 else 'Section' @property def level(self): try: return self.parent.level + 1 except AttributeError: return 1 @property def section(self): return self def show_in_toc(self, container): parent_show_in_toc = (self.parent is None or self.parent.section is None or self.parent.section.show_in_toc(container)) return (self.get_style('show_in_toc', container) and not self.is_hidden(container) and parent_show_in_toc) def create_destination(self, container, at_top_of_container=False): pass # destination is set by the section's Heading class HeadingStyle(NumberedParagraphStyle): number_separator = Attribute(StyledText, '.', "Characters inserted between the number " "label of the parent section and this " "section. If ``None``, only show this " "section's number label.") keep_with_next = OverrideDefault(True) class Heading(NumberedParagraph): """The title for a section Args: title (StyledText): the title text custom_label (StyledText): a frontend can supply a custom label to use instead of an automatically determined section number """ style_class = HeadingStyle def __init__(self, title, custom_label=None, id=None, style=None, parent=None): super().__init__(title, id=id, style=style, parent=parent) self.custom_label = custom_label @property def referenceable(self): return self.section def __repr__(self): return '{}({}) (style={})'.format(self.__class__.__name__, self.content, self.style) def prepare(self, flowable_target): document = flowable_target.document document._sections.append(self.section) section_id = self.section.get_id(document) numbering_style = self.get_style('number_format', flowable_target) if self.get_style('custom_label', flowable_target): assert self.custom_label is not None label = str(self.custom_label) elif numbering_style: try: parent_section_id = self.section.parent.section.get_id(document) except AttributeError: parent_section_id = None ref_category = self.referenceable.category section_counters = document.counters.setdefault(ref_category, {}) section_counter = section_counters.setdefault(parent_section_id, []) section_counter.append(self) number = len(section_counter) label = format_number(number, numbering_style) separator = self.get_style('number_separator', flowable_target) if separator is not None and self.level > 1: parent_id = self.section.parent.section.get_id(document) parent_ref = document.get_reference(parent_id, 'number') if parent_ref: separator_string = separator.to_string(flowable_target) label = parent_ref + separator_string + label else: label = None title_string = self.content.to_string(flowable_target) document.set_reference(section_id, ReferenceType.NUMBER, label) document.set_reference(section_id, ReferenceType.TITLE, title_string) def text(self, container): number = self.number(container) return MixedStyledText(number + self.content, parent=self) def flow(self, container, last_descender, state=None, **kwargs): if self.level == 1 and container.page.chapter_title: container.page.create_chapter_title(self) result = 0, 0, None else: result = super().flow(container, last_descender, state, **kwargs) return result def flow_inner(self, container, descender, state=None, **kwargs): result = super().flow_inner(container, descender, state=state, **kwargs) create_destination(self.section, container, True) return result class ListStyle(GroupedFlowablesStyle, NumberStyle): ordered = Attribute(Bool, False, 'This list is ordered or unordered') bullet = Attribute(StyledText, SingleStyledText('\N{BULLET}'), 'Bullet to use in unordered lists') class List(StaticGroupedFlowables, Label): style_class = ListStyle def __init__(self, flowables, id=None, style=None, parent=None): items = [ListItem(i + 1, flowable, parent=self) for i, flowable in enumerate(flowables)] super().__init__(items, id=id, style=style, parent=parent) class ListItem(LabeledFlowable): def __init__(self, index, flowable, id=None, style=None, parent=None): label = ListItemLabel(index) super().__init__(label, flowable, id=id, style=style, parent=parent) class ListItemLabelStyle(ParagraphStyle, LabelStyle): pass class ListItemLabel(ParagraphBase, Label): style_class = ListItemLabelStyle def __init__(self, index, style=None, parent=None): super().__init__(style=style, parent=parent) self.index = index def text(self, container): list = self.parent.parent if list.get_style('ordered', container): number_format = list.get_style('number_format', container) label = format_number(self.index, number_format) else: label = list.get_style('bullet', container) return MixedStyledText(self.format_label(label, container), parent=self) class DefinitionList(GroupedLabeledFlowables, StaticGroupedFlowables): pass class Header(Paragraph): pass class Footer(Paragraph): pass class TableOfContentsStyle(GroupedFlowablesStyle, ParagraphStyle): depth = Attribute(Integer, 3, 'The number of section levels to include in ' 'the table of contents') def __init__(self, base=None, **attributes): super().__init__(base=base, **attributes) class TableOfContentsSection(Section): def __init__(self): section_title = StringField(SectionTitles, 'contents') super().__init__([Heading(section_title, style='unnumbered'), TableOfContents()], style='table of contents') def __repr__(self): return '{}()'.format(type(self).__name__) def get_id(self, document, create=True): try: return document.metadata['toc_id'] except KeyError: return super().get_id(document, create) class TableOfContents(GroupedFlowables): style_class = TableOfContentsStyle location = 'table of contents' def __init__(self, local=False, id=None, style=None, parent=None): super().__init__(id=id, style=style, parent=parent) self.local = local self.source = self def __repr__(self): args = ''.join(', {}={}'.format(name, repr(getattr(self, name))) for name in ('id', 'style') if getattr(self, name) is not None) return '{}(local={}{})'.format(type(self).__name__, self.local, args) def flowables(self, container): def limit_items(items, section): while next(items) is not section: # fast-forward `items` to the pass # first sub-section of `section` for item in items: if item.level == section.level: break yield item depth = self.get_style('depth', container) items = (section for section in container.document._sections if section.show_in_toc(container) and section.level <= depth) if self.local and self.section: items = limit_items(items, self.section) for section in items: yield TableOfContentsEntry(section, parent=self) class TableOfContentsEntryStyle(ReferencingParagraphStyle): text = OverrideDefault(ReferenceField('number') + Tab() + ReferenceField('title') + Tab() + ReferenceField('page')) class TableOfContentsEntry(ReferencingParagraph): style_class = TableOfContentsEntryStyle def __init__(self, flowable, id=None, style=None, parent=None): super().__init__(flowable, id=id, style=style, parent=parent) @property def depth(self): return self.target_id_or_flowable.level class ListOfSection(Section): list_class = NotImplementedAttribute() def __init__(self): key = 'list_of_{}s'.format(self.list_class.category.lower()) section_title = StringField(SectionTitles, key) self.list_of = self.list_class() super().__init__([Heading(section_title, style='unnumbered'), self.list_of], style='list of {}'.format(self.category)) def __repr__(self): return '{}()'.format(type(self).__name__) def is_hidden(self, container): return (super().is_hidden(container) or self.list_of.is_hidden(container)) class ListOfStyle(GroupedFlowablesStyle, ParagraphStyle): pass class ListOf(GroupedFlowables): category = NotImplementedAttribute() style_class = ListOfStyle def __init__(self, local=False, id=None, style=None, parent=None): super().__init__(id=id, style=style, parent=parent) self.local = local self.source = self def __repr__(self): args = ''.join(', {}={}'.format(name, repr(getattr(self, name))) for name in ('id', 'style') if getattr(self, name) is not None) return '{}(local={}{})'.format(type(self).__name__, self.local, args) @property def location(self): return 'List of {}s'.format(self.category) def is_hidden(self, container): try: next(self.flowables(container)) except StopIteration: return True return False def flowables(self, container): document = container.document category_counters = document.counters.get(self.category, {}) def limit_items(items, section): for item in items: # fast-forward `items` to the if item.section is section: # first sub-section of `section` yield item break for item in items: if not (item.section.level > section.level or item.section is section): break yield item def items_in_section(section): section_id = (section.get_id(document, create=False) if section else None) yield from category_counters.get(section_id, []) items = chain(items_in_section(None), *(items_in_section(section) for section in document._sections)) if self.local and self.section: items = limit_items(items, self.section) for caption in items: yield ListOfEntry(caption.referenceable, parent=self) class ListOfEntryStyle(ReferencingParagraphStyle): text = OverrideDefault(ReferenceField('reference') + ': ' + ReferenceField('title') + Tab() + ReferenceField('page')) class ListOfEntry(ReferencingParagraph): style_class = ListOfEntryStyle class AdmonitionStyle(GroupedFlowablesStyle): inline_title = Attribute(Bool, True, "Show the admonition's title inline " "with the body text, if possible") class AdmonitionTitles(StringCollection): """Collection of localized titles for common admonitions""" attention = String('Title for attention admonitions') caution = String('Title for caution admonitions') danger = String('Title for danger admonitions') error = String('Title for error admonitions') hint = String('Title for hint admonitions') important = String('Title for important admonitions') note = String('Title for note admonitions') tip = String('Title for tip admonitions') warning = String('Title for warning admonitions') seealso = String('Title for see-also admonitions') class Admonition(StaticGroupedFlowables): style_class = AdmonitionStyle def __init__(self, flowables, title=None, type=None, id=None, style=None, parent=None): super().__init__(flowables, id=id, style=style, parent=parent) self.custom_title = title self.admonition_type = type def title(self, document): return (self.custom_title or document.get_string(AdmonitionTitles, self.admonition_type)) def flowables(self, container): title = self.title(container.document) flowables = super().flowables(container) first_flowable = next(flowables) inline_title = self.get_style('inline_title', container) if inline_title and isinstance(first_flowable, Paragraph): title = MixedStyledText(title, style='inline title') kwargs = dict(id=first_flowable.id, style=first_flowable.style) paragraph = Paragraph(title + ' ' + first_flowable, **kwargs) paragraph.secondary_ids = first_flowable.secondary_ids yield paragraph else: yield Paragraph(title, style='title') yield first_flowable for flowable in flowables: yield flowable class HorizontalRuleStyle(FlowableStyle, LineStyle): pass class HorizontalRule(Flowable): style_class = HorizontalRuleStyle def render(self, container, descender, state, **kwargs): width = float(container.width) line = Line((0, 0), (width, 0), style=PARENT_STYLE, parent=self) line.render(container) return width, 0, 0
/rinohtype-reloaded-0.3.3.tar.gz/rinohtype-reloaded-0.3.3/src/rinoh/structure.py
0.721645
0.230162
structure.py
pypi
from .attribute import Attribute from .dimension import Dimension, PT from .element import DocumentElement from .flowable import Flowable, FlowableStyle from .layout import VirtualContainer from .style import StyledMeta from .util import NotImplementedAttribute __all__ = ['InlineFlowableException', 'InlineFlowable', 'InlineFlowableStyle'] class InlineFlowableException(Exception): pass class InlineFlowableStyle(FlowableStyle): baseline = Attribute(Dimension, 0*PT, "The location of the flowable's " "baseline relative to the bottom " "edge") class InlineFlowableMeta(StyledMeta): def __new__(mcls, classname, bases, cls_dict): cls = super().__new__(mcls, classname, bases, cls_dict) if classname == 'InlineFlowable': cls.directives = {} else: InlineFlowable.directives[cls.directive] = cls return cls class InlineFlowable(Flowable, metaclass=InlineFlowableMeta): directive = None style_class = InlineFlowableStyle arguments = NotImplementedAttribute() def __init__(self, baseline=None, id=None, style=None, parent=None): super().__init__(id=id, style=style, parent=parent) self.baseline = baseline def to_string(self, flowable_target): return type(self).__name__ def font(self, document): raise InlineFlowableException def y_offset(self, document): return 0 @property def items(self): return [self] def spans(self, document): yield self def flow_inline(self, container, last_descender, state=None): baseline = self.baseline or self.get_style('baseline', container) virtual_container = VirtualContainer(container) width, _, _ = self.flow(virtual_container, last_descender, state=state) return InlineFlowableSpan(width, baseline, virtual_container) class InlineFlowableSpan(DocumentElement): number_of_spaces = 0 ends_with_space = False def __init__(self, width, baseline, virtual_container): super().__init__() self.width = width self.baseline = baseline self.virtual_container = virtual_container def font(self, document): raise InlineFlowableException @property def span(self): return self def height(self, document): return self.ascender(document) - self.descender(document) def ascender(self, document): baseline = self.baseline.to_points(self.virtual_container.height) if baseline > self.virtual_container.height: return 0 else: return self.virtual_container.height - baseline def descender(self, document): return min(0, - self.baseline.to_points(self.virtual_container.height)) def line_gap(self, document): return 0 def before_placing(self, container): pass # TODO: get_style and word_to_glyphs may need proper implementations def get_style(self, attribute, document=None): pass def chars_to_glyphs(self, chars): return chars
/rinohtype-reloaded-0.3.3.tar.gz/rinohtype-reloaded-0.3.3/src/rinoh/inline.py
0.646237
0.253347
inline.py
pypi
from .attribute import Attribute, AcceptNoneAttributeType, ParseError from .color import Color, BLACK, GRAY90 from .style import Style, Styled from .dimension import Dimension, PT __all__ = ['Stroke', 'LineStyle', 'Line', 'ShapeStyle', 'Shape', 'Polygon', 'Rectangle'] class Stroke(AcceptNoneAttributeType): """The display properties of a line Args: width (Dimension): the width of the line color (Color): the color of the line """ def __init__(self, width, color): self.width = width self.color = color def __str__(self): return '{}, {}'.format(self.width, self.color) def __repr__(self): return '{}({}, {})'.format(type(self).__name__, repr(self.width), repr(self.color)) @classmethod def check_type(cls, value): if value and not (Dimension.check_type(value.width) and Color.check_type(value.color)): return False return super().check_type(value) @classmethod def parse_string(cls, string): try: width_str, color_str = (part.strip() for part in string.split(',')) except ValueError: raise ParseError('Expecting stroke width and color separated by a ' 'comma') width = Dimension.from_string(width_str) color = Color.from_string(color_str) return cls(width, color) @classmethod def doc_format(cls): return ('the width (:class:`.Dimension`) and color (:class:`.Color`) ' 'of the stroke, separated by a comma (``,``)') class LineStyle(Style): stroke = Attribute(Stroke, Stroke(1*PT, BLACK), 'Width and color used to ' 'draw the line') class Line(Styled): """Draws a line Args: start (2-tuple): coordinates for the start point of the line end (2-tuple): coordinates for the end point of the line """ style_class = LineStyle def __init__(self, start, end, style=None, parent=None): super().__init__(style=style, parent=parent) self.start = start self.end = end def render(self, container, offset=0): canvas, document = container.canvas, container.document stroke = self.get_style('stroke', container) if not stroke: return with canvas.save_state(): points = self.start, self.end canvas.line_path(points) canvas.stroke(stroke.width, stroke.color) class ShapeStyle(LineStyle): fill_color = Attribute(Color, GRAY90, 'Color to fill the shape') class Shape(Styled): """Base class for closed shapes""" style_class = ShapeStyle def __init__(self, style=None, parent=None): super().__init__(style=style, parent=parent) def render(self, canvas, offset=0): raise NotImplementedError class Polygon(Shape): def __init__(self, points, style=None, parent=None): super().__init__(style=style, parent=parent) self.points = points def render(self, container, offset=0): canvas = container.canvas stroke = self.get_style('stroke', container) fill_color = self.get_style('fill_color', container) if not (stroke or fill_color): return with canvas.save_state(): canvas.line_path(self.points) canvas.close_path() if stroke and fill_color: canvas.stroke_and_fill(stroke.width, stroke.color, fill_color) elif stroke: canvas.stroke(stroke.width, stroke.color) elif fill_color: canvas.fill(fill_color) class Rectangle(Polygon): def __init__(self, bottom_left, width, height, style=None, parent=None): bottom_right = (bottom_left[0] + width, bottom_left[1]) top_right = (bottom_left[0] + width, bottom_left[1] + height) top_left = (bottom_left[0], bottom_left[1] + height) points = bottom_left, bottom_right, top_right, top_left super().__init__(points, style=style, parent=parent)
/rinohtype-reloaded-0.3.3.tar.gz/rinohtype-reloaded-0.3.3/src/rinoh/draw.py
0.892135
0.303648
draw.py
pypi
import inspect import re import sys from .attribute import AcceptNoneAttributeType, ParseError from collections import OrderedDict from token import PLUS, MINUS, NUMBER, NAME, OP __all__ = ['Dimension', 'PT', 'PICA', 'INCH', 'MM', 'CM', 'PERCENT', 'QUARTERS'] class DimensionType(type): """Maps comparison operators to their equivalents in :class:`float`""" def __new__(mcs, name, bases, cls_dict): """Return a new class with predefined comparison operators""" for method_name in ('__lt__', '__le__', '__gt__', '__ge__', '__eq__', '__ne__'): if method_name not in cls_dict: cls_dict[method_name] = mcs._make_operator(method_name) return type.__new__(mcs, name, bases, cls_dict) @staticmethod def _make_operator(method_name): """Return an operator method that takes parameters of type :class:`Dimension`, evaluates them, and delegates to the :class:`float` operator with name `method_name`""" def operator(self, other): """Operator delegating to the :class:`float` method `method_name`""" float_operator = getattr(float, method_name) try: float_other = float(other) except (ValueError, TypeError): return False return float_operator(float(self), float_other) return operator class DimensionBase(AcceptNoneAttributeType, metaclass=DimensionType): """Late-evaluated dimension The result of mathematical operations on dimension objects is not a statically evaluated version, but rather stores references to the operator arguments. The result is only evaluated to a number on conversion to a :class:`float`. The internal representation is in terms of PostScript points. A PostScript point is equal to one 72th of an inch. """ def __neg__(self): return DimensionMultiplication(self, -1) def __add__(self, other): """Return the sum of this dimension and `other`.""" return DimensionAddition(self, other) __radd__ = __add__ def __sub__(self, other): """Return the difference of this dimension and `other`.""" return DimensionSubtraction(self, other) def __rsub__(self, other): """Return the difference of `other` and this dimension.""" return DimensionSubtraction(other, self) def __mul__(self, factor): """Return the product of this dimension and `factor`.""" return DimensionMultiplication(self, factor) __rmul__ = __mul__ def __truediv__(self, divisor): """Return the quotient of this dimension and `divisor`.""" return DimensionMultiplication(self, 1.0 / divisor) def __abs__(self): """Return the absolute value of this dimension (in points).""" return abs(float(self)) def __float__(self): """Evaluate the value of this dimension in points.""" raise NotImplementedError @classmethod def check_type(cls, value): return (super().check_type(value) or isinstance(value, Fraction) or value == 0) REGEX = re.compile(r"""(?P<value> [+-]? # optional sign \d*\.?\d+ # integer or float value ) \s* # optional space between value & unit (?P<unit> [a-z%/0-9]* # unit (can be an empty string) ) """, re.IGNORECASE | re.VERBOSE) @classmethod def from_tokens(cls, tokens): sign = 1 if tokens.next.exact_type in (PLUS, MINUS): sign = -1 if next(tokens).exact_type == MINUS else 1 token = next(tokens) if token.type != NUMBER: raise ParseError('Expecting a number') try: value = int(token.string) except ValueError: value = float(token.string) if tokens.next and tokens.next.type in (NAME, OP): unit_string = next(tokens).string elif value != 0: raise ParseError('Expecting a dimension unit') else: return value if unit_string == '/': unit_string += next(tokens).string try: unit = DimensionUnitBase.all[unit_string.lower()] except KeyError: raise ValueError("'{}' is not a valid dimension unit" .format(unit_string)) return sign * value * unit @classmethod def doc_format(cls): return ('a numeric value followed by a unit ({})' .format(', '.join('``{}``'.format(unit) for unit in DimensionUnitBase.all))) def to_points(self, total_dimension): """Convert this dimension to PostScript points If this dimension is context-sensitive, it will be evaluated relative to ``total_dimension``. This can be the total width available to a flowable, for example. Args: total_dimension (int, float or Dimension): the dimension providing context to a context-sensitive dimension. If int or float, it is assumed to have a unit of PostScript points. Returns: float: this dimension in PostScript points """ return float(self) class Dimension(DimensionBase): """A simple dimension Args: value (int or float): the magnitude of the dimension unit (DimensionUnit): the unit this dimension is expressed in. Default: :data:`PT`. """ # TODO: em, ex? (depends on context) def __init__(self, value=0, unit=None): self._value = value self._unit = unit or PT def __str__(self): number = '{:.2f}'.format(self._value).rstrip('0').rstrip('.') return '{}{}'.format(number, self._unit.label) def __repr__(self): for name, obj in inspect.getmembers(sys.modules[__name__]): if obj is self._unit: return '{}*{}'.format(self._value, name) else: raise ValueError def __float__(self): return float(self._value) * self._unit.points_per_unit def grow(self, value): """Grow this dimension (in-place) The ``value`` is interpreted as a magnitude expressed in the same unit as this dimension. Args: value (int or float): the amount to add to the magnitude of this dimension Returns: :class:`Dimension`: this (growed) dimension itself """ self._value += float(value) return self class DimensionAddition(DimensionBase): """The sum of a set of dimensions Args: addends (Dimension\ s): """ def __init__(self, *addends): self.addends = list(addends) def __float__(self): return sum(map(float, self.addends or (0.0, ))) class DimensionSubtraction(DimensionBase): def __init__(self, minuend, subtrahend): self.minuend = minuend self.subtrahend = subtrahend def __float__(self): return float(self.minuend) - float(self.subtrahend) class DimensionMultiplication(DimensionBase): def __init__(self, multiplicand, multiplier): self.multiplicand = multiplicand self.multiplier = multiplier def __float__(self): return float(self.multiplicand) * self.multiplier class DimensionMaximum(DimensionBase): def __init__(self, *dimensions): self.dimensions = dimensions def __float__(self): return max(*(float(dimension) for dimension in self.dimensions)) class DimensionUnitBase(object): all = OrderedDict() def __init__(self, label): self.label = label self.all[label] = self class DimensionUnit(DimensionUnitBase): """A unit to express absolute dimensions in Args: points_per_unit (int or float): the number of PostScript points that fit in one unit label (str): label for the unit """ def __init__(self, points_per_unit, label): super().__init__(label) self.points_per_unit = float(points_per_unit) def __repr__(self): return '{}({}, {})'.format(type(self).__name__, self.points_per_unit, repr(self.label)) def __rmul__(self, value): return Dimension(value, self) # Units PT = DimensionUnit(1, 'pt') #: PostScript points INCH = DimensionUnit(72*PT, 'in') #: imperial/US inch PICA = DimensionUnit(1 / 6 * INCH, 'pc') #: computer pica MM = DimensionUnit(1 / 25.4 * INCH, 'mm') #: millimeter CM = DimensionUnit(10*MM, 'cm') #: centimeter class Fraction(DimensionBase): """A context-sensitive dimension This fraction is multiplied by the reference dimension when evaluating it using :meth:`to_points`. Args: numerator (int or float): the numerator of the fraction unit (FractionUnit): the fraction unit """ def __init__(self, numerator, unit): self._numerator = numerator self._unit = unit def __str__(self): number = '{:.2f}'.format(self._numerator).rstrip('0').rstrip('.') return '{}{}'.format(number, self._unit.label) __eq__ = AcceptNoneAttributeType.__eq__ def to_points(self, total_dimension): fraction = self._numerator / self._unit.denominator return fraction * float(total_dimension) class FractionUnit(DimensionUnitBase): """A unit to express relative dimensions in Args: denominator (int or float): the number of parts to divide the whole in label (str): label for the unit """ def __init__(self, denominator, label): super().__init__(label) self.denominator = denominator def __repr__(self): return '{}({}, {})'.format(type(self).__name__, self.denominator, repr(self.label)) def __rmul__(self, nominator): return Fraction(nominator, self) PERCENT = FractionUnit(100, '%') #: fraction of 100 QUARTERS = FractionUnit(4, '/4') #: fraction of 4
/rinohtype-reloaded-0.3.3.tar.gz/rinohtype-reloaded-0.3.3/src/rinoh/dimension.py
0.743541
0.412471
dimension.py
pypi
from .annotation import NamedDestination from .warnings import warn __all__ = ['DocumentElement', 'Location'] class Location(object): def __init__(self, document_element): self.location = document_element.__class__.__name__ class DocumentElement(object): """An element that is directly or indirectly part of a :class:`Document` and is eventually rendered to the output.""" def __init__(self, id=None, parent=None, source=None): """Initialize this document element as as a child of `parent` (:class:`DocumentElement`) if it is not a top-level :class:`Flowable` element. `source` should point to a node in the input's document tree corresponding to this document element. It is used to point to a location in the input file when warnings or errors are generated (see the :meth:`warn` method). Both parameters are optional, and can be set at a later point by assigning to the identically named instance attributes.""" self.id = id self.secondary_ids = [] self.parent = parent self.source = source def get_id(self, document, create=True): try: return self.id or document.ids_by_element[self] except KeyError: if create: return document.register_element(self) def get_ids(self, document): primary_id = self.get_id(document) yield primary_id for id in self.secondary_ids: yield id @property def source(self): """The source element this document element was created from.""" if self._source is not None: return self._source elif self.parent is not None: return self.parent.source else: return Location(self) @source.setter def source(self, source): """Set `source` as the source element of this document element.""" self._source = source @property def elements(self): yield self def build_document(self, flowable_target): """Set document metadata and populate front and back matter""" pass def prepare(self, flowable_target): """Determine number labels and register references with the document""" if self.get_id(flowable_target.document, create=False): flowable_target.document.register_element(self) def create_destination(self, container, at_top_of_container=False): """Create a destination anchor in the `container` to direct links to this :class:`DocumentElement` to.""" create_destination(self, container, at_top_of_container) def warn(self, message, container=None): """Present the warning `message` to the user, adding information on the location of the related element in the input file.""" if self.source is not None: message = '[{}] '.format(self.source.location) + message if container is not None: try: message += ' (page {})'.format(container.page.formatted_number) except AttributeError: pass warn(message) def create_destination(flowable, container, at_top_of_container=False): """Create a destination anchor in the `container` to direct links to `flowable` to.""" vertical_position = 0 if at_top_of_container else container.cursor ids = flowable.get_ids(container.document) destination = NamedDestination(*(str(id) for id in ids)) container.canvas.annotate(destination, 0, vertical_position, container.width, None) container.document.register_page_reference(container.page, flowable)
/rinohtype-reloaded-0.3.3.tar.gz/rinohtype-reloaded-0.3.3/src/rinoh/element.py
0.887741
0.244724
element.py
pypi
import re from ast import literal_eval from html.entities import name2codepoint from token import NAME, STRING, NEWLINE, LPAR, RPAR, ENDMARKER from .attribute import (AttributeType, Attribute, Bool, Integer, AcceptNoneAttributeType, ParseError) from .color import Color, BLACK from .dimension import Dimension, PT from .font import Typeface from .fonts import adobe14 from .font.style import (FontWeight, FontSlant, FontWidth, FontVariant, TextPosition) from .style import Style, Styled, StyledMeta, PARENT_STYLE, StyleException from .util import NotImplementedAttribute, PeekIterator __all__ = ['TextStyle', 'StyledText', 'WarnInline', 'SingleStyledText', 'MixedStyledText', 'ConditionalMixedStyledText', 'Space', 'FixedWidthSpace', 'NoBreakSpace', 'Spacer', 'Tab', 'Newline', 'Superscript', 'Subscript'] class Locale(AttributeType): REGEX = re.compile(r'^[a-z]{2}_[A-Z]{2}$') @classmethod def check_type(cls, value): return cls.REGEX.match(value) is not None @classmethod def from_tokens(cls, tokens): token = next(tokens) if not cls.check_type(token.string): raise ValueError("'{}' is not a valid locale. Needs to be of the " "form 'en_US'.".format(token.string)) return token.string @classmethod def doc_format(cls): return 'locale identifier in the ``<language ID>_<region ID>`` format' class TextStyle(Style): typeface = Attribute(Typeface, adobe14.times, 'Typeface to set the text in') font_weight = Attribute(FontWeight, 'medium', 'Thickness of character ' 'outlines relative to their ' 'height') font_slant = Attribute(FontSlant, 'upright', 'Slope style of the font') font_width = Attribute(FontWidth, 'normal', 'Stretch of the characters') font_size = Attribute(Dimension, 10*PT, 'Height of characters') font_color = Attribute(Color, BLACK, 'Color of the font') font_variant = Attribute(FontVariant, 'normal', 'Variant of the font') position = Attribute(TextPosition, 'normal', 'Vertical text position') kerning = Attribute(Bool, True, 'Improve inter-letter spacing') ligatures = Attribute(Bool, True, 'Run letters together where possible') # TODO: character spacing hyphenate = Attribute(Bool, True, 'Allow words to be broken over two lines') hyphen_chars = Attribute(Integer, 2, 'Minimum number of characters in a ' 'hyphenated part of a word') hyphen_lang = Attribute(Locale, 'en_US', 'Language to use for hyphenation. ' 'Accepts locale codes such as ' "'en_US'") default_base = PARENT_STYLE class CharacterLike(Styled): def __repr__(self): return "{0}(style={1})".format(self.__class__.__name__, self.style) @property def width(self): raise NotImplementedError def height(self, document): raise NotImplementedError def render(self): raise NotImplementedError NAME2CHAR = {name: chr(codepoint) for name, codepoint in name2codepoint.items()} class StyledText(Styled, AcceptNoneAttributeType): """Base class for text that has a :class:`TextStyle` associated with it.""" style_class = TextStyle def __add__(self, other): """Return the concatenation of this styled text and `other`. If `other` is `None`, this styled text itself is returned.""" return MixedStyledText([self, other]) if other is not None else self def __radd__(self, other): """Return the concatenation of `other` and this styled text. If `other` is `None`, this styled text itself is returned.""" return MixedStyledText([other, self]) if other is not None else self def __iadd__(self, other): """Return the concatenation of this styled text and `other`. If `other` is `None`, this styled text itself is returned.""" return self + other @classmethod def check_type(cls, value): return super().check_type(value) or isinstance(value, str) @classmethod def from_tokens(cls, tokens): texts = [] for token in tokens: if token.type == NEWLINE: continue elif token.type == NAME: # inline flowable directive = token.string.lower() inline_flowable_class = InlineFlowable.directives[directive] if next(tokens).exact_type != LPAR: raise ParseError('Expecting an opening parenthesis.') args, kwargs = inline_flowable_class.arguments.parse_arguments(tokens) if next(tokens).exact_type != RPAR: raise ParseError('Expecting a closing parenthesis.') inline_flowable = inline_flowable_class(*args, **kwargs) texts.append(inline_flowable) elif token.type == STRING: # text text = literal_eval(token.string) if tokens.next.exact_type == LPAR: _, start_col = next(tokens).end for token in tokens: if token.exact_type == RPAR: _, end_col = token.start style = token.line[start_col:end_col].strip() break elif token.type == NEWLINE: raise StyledTextParseError('No newline allowed in' 'style name') else: style = None texts.append(cls._substitute_variables(text, style)) else: raise StyledTextParseError('Expecting text or inline flowable') if tokens.next.type == ENDMARKER: break if len(texts) > 1: return MixedStyledText(texts) else: first, = texts return first @classmethod def doc_repr(cls, value): return '``{}``'.format(value) if value else '(no value)' @classmethod def doc_format(cls): return ("a list of styled text strings, separated by spaces. A styled " "text string is a quoted string (``'`` or ``\"``), optionally " "followed by a style name enclosed in braces: " "``'text string' (style name)``") @classmethod def validate(cls, value, accept_variables=False, attribute_name=None): if attribute_name is None and isinstance(value, str): value = SingleStyledText(value) return super().validate(value, accept_variables, attribute_name) @classmethod def _substitute_variables(cls, text, style): def substitute_controlchars_htmlentities(string, style=None): try: return ControlCharacter.all[string]() except KeyError: return SingleStyledText(string.format(**NAME2CHAR), style=style) return Field.substitute(text, substitute_controlchars_htmlentities, style=style) def __str__(self): return self.to_string(None) def _short_repr_args(self, flowable_target): yield self._short_repr_string(flowable_target) def to_string(self, flowable_target): """Return the text content of this styled text.""" raise NotImplementedError('{}.to_string'.format(type(self).__name__)) @property def paragraph(self): return self.parent.paragraph position = {TextPosition.SUPERSCRIPT: 1 / 3, TextPosition.SUBSCRIPT: - 1 / 6} position_size = 583 / 1000 def is_script(self, container): """Returns `True` if this styled text is super/subscript.""" try: style = self._style(container) return style.get_value('position', container) != TextPosition.NORMAL except StyleException: return False def script_level(self, container): """Nesting level of super/subscript.""" try: level = self.parent.script_level(container) except AttributeError: level = -1 return level + 1 if self.is_script(container) else level def height(self, container): """Font size after super/subscript size adjustment.""" height = float(self.get_style('font_size', container)) script_level = self.script_level(container) if script_level > -1: height *= self.position_size * (5 / 6)**script_level return height def y_offset(self, container): """Vertical baseline offset (up is positive).""" offset = (self.parent.y_offset(container)\ if hasattr(self.parent, 'y_offset') else 0) if self.is_script(container): style = self._style(container) offset += (self.parent.height(container) * self.position[style.position]) # The Y offset should only change once for the nesting level # where the position style is set, hence we don't recursively # get the position style using self.get_style('position') return offset @property def items(self): """The list of items in this StyledText.""" raise NotImplementedError def spans(self, container): """Generator yielding all spans in this styled text, one item at a time (used in typesetting).""" raise NotImplementedError class StyledTextParseError(Exception): pass class WarnInline(StyledText): """Inline element that emits a warning Args: message (str): the warning message to emit """ def __init__(self, message, parent=None): super().__init__(parent=parent) self.message = message def to_string(self, flowable_target): return '' @property def items(self): return [self] def spans(self, container): self.warn(self.message, container) return iter([]) class SingleStyledTextBase(StyledText): """Styled text where all text shares a single :class:`TextStyle`.""" def __repr__(self): """Return a representation of this single-styled text; the text string along with a representation of its :class:`TextStyle`.""" return "{0}('{1}', style={2})".format(self.__class__.__name__, self.text(None), self.style) def text(self, flowable_target, **kwargs): raise NotImplementedError def to_string(self, flowable_target): return self.text(flowable_target) def font(self, container): """The :class:`Font` described by this single-styled text's style. If the exact font style as described by the `font_weight`, `font_slant` and `font_width` style attributes is not present in the `typeface`, the closest font available is returned instead, and a warning is printed.""" typeface = self.get_style('typeface', container) weight = self.get_style('font_weight', container) slant = self.get_style('font_slant', container) width = self.get_style('font_width', container) return typeface.get_font(weight=weight, slant=slant, width=width) def ascender(self, container): return (self.font(container).ascender_in_pt * float(self.get_style('font_size', container))) def descender(self, container): return (self.font(container).descender_in_pt * float(self.get_style('font_size', container))) def line_gap(self, container): return (self.font(container).line_gap_in_pt * float(self.get_style('font_size', container))) @property def items(self): return [self] def spans(self, container): yield self ESCAPE = str.maketrans({"'": r"\'", '\n': r'\n', '\t': r'\t'}) class SingleStyledText(SingleStyledTextBase): def __init__(self, text, style=None, parent=None): super().__init__(style=style, parent=parent) self._text = text def __str__(self): result = "'{}'".format(self._text.translate(ESCAPE)) if self.style is not None: result += ' ({})'.format(self.style) return result def text(self, container, **kwargs): return self._text class MixedStyledTextBase(StyledText): def to_string(self, flowable_target): return ''.join(item.to_string(flowable_target) for item in self.children(flowable_target)) def spans(self, container): """Recursively yield all the :class:`SingleStyledText` items in this mixed-styled text.""" for child in self.children(container): container.register_styled(child) for span in child.spans(container): yield span def children(self, flowable_target): raise NotImplementedError class MixedStyledText(MixedStyledTextBase, list): """Concatenation of styled text Args: text_or_items (str, StyledText or iterable of these): mixed styled text style: see :class:`.Styled` parent: see :class:`.DocumentElement` """ _assumed_equal = {} def __init__(self, text_or_items, id=None, style=None, parent=None): """Initialize this mixed-styled text as the concatenation of `text_or_items`, which is either a single text item or an iterable of text items. Individual text items can be :class:`StyledText` or :class:`str` objects. This mixed-styled text is set as the parent of each of the text items. See :class:`StyledText` for information on `style`, and `parent`.""" super().__init__(id=id, style=style, parent=parent) if isinstance(text_or_items, (str, StyledText)): text_or_items = (text_or_items, ) for item in text_or_items: self.append(item) def __add__(self, other): if isinstance(other, str): other = SingleStyledText(other) if self.style == other.style: return MixedStyledText(self.items + other.items, style=self.style, parent=self.parent) else: return super().__add__(other) def __repr__(self): """Return a representation of this mixed-styled text; its children along with a representation of its :class:`TextStyle`.""" return '{}{} (style={})'.format(self.__class__.__name__, super().__repr__(), self.style) def __str__(self): assert self.style is None return ' '.join(str(item) for item in self) def __eq__(self, other): # avoid infinite recursion due to the 'parent' attribute assumed_equal = type(self)._assumed_equal.setdefault(id(self), set()) other_id = id(other) if other_id in assumed_equal: return True try: assumed_equal.add(other_id) return super().__eq__(other) and list.__eq__(self, other) finally: assumed_equal.remove(other_id) def prepare(self, flowable_target): for item in self: item.prepare(flowable_target) def append(self, item): """Append `item` (:class:`StyledText` or :class:`str`) to the end of this mixed-styled text. The parent of `item` is set to this mixed-styled text.""" if isinstance(item, str): item = SingleStyledText(item) item.parent = self list.append(self, item) @property def items(self): return list(self) def children(self, flowable_target): return self.items class ConditionalMixedStyledText(MixedStyledText): def __init__(self, text_or_items, document_option, style=None, parent=None): super().__init__(text_or_items, style=style, parent=parent) self.document_option = document_option def spans(self, container): if container.document.options[self.document_option]: for span in super().spans(container): yield span class Character(SingleStyledText): """:class:`SingleStyledText` consisting of a single character.""" class Space(Character): """A space character.""" def __init__(self, fixed_width=False, style=None, parent=None): """Initialize this space. `fixed_width` specifies whether this space can be stretched (`False`) or not (`True`) in justified paragraphs. See :class:`StyledText` about `style` and `parent`.""" super().__init__(' ', style=style, parent=parent) self.fixed_width = fixed_width class FixedWidthSpace(Space): """A fixed-width space character.""" def __init__(self, style=None, parent=None): """Initialize this fixed-width space with `style` and `parent` (see :class:`StyledText`).""" super().__init__(True, style=style, parent=parent) class NoBreakSpace(Character): """Non-breaking space character. Lines cannot wrap at a this type of space.""" def __init__(self, style=None, parent=None): """Initialize this non-breaking space with `style` and `parent` (see :class:`StyledText`).""" super().__init__(' ', style=style, parent=parent) class Spacer(FixedWidthSpace): """A space of a specific width.""" def __init__(self, width, style=None, parent=None): """Initialize this spacer at `width` with `style` and `parent` (see :class:`StyledText`).""" super().__init__(style=style, parent=parent) self._width = width def widths(self): """Generator yielding the width of this spacer.""" yield float(self._width) class Box(Character): def __init__(self, width, height, depth, ps): super().__init__('?') self._width = width self._height = height self.depth = depth self.ps = ps @property def width(self): return self._width def height(self, document): return self._height def render(self, canvas, x, y): box_canvas = canvas.new(x, y - self.depth, self.width, self.height + self.depth) print(self.ps, file=box_canvas.psg_canvas) canvas.append(box_canvas) return self.width class ControlCharacterMeta(StyledMeta): def __new__(metacls, classname, bases, cls_dict): cls = super().__new__(metacls, classname, bases, cls_dict) try: ControlCharacter.all[cls.character] = cls except NameError: pass return cls class ControlCharacter(Character, metaclass=ControlCharacterMeta): """A non-printing character that affects typesetting of the text near it.""" character = NotImplementedAttribute() exception = Exception all = {} def __init__(self): """Initialize this control character with it's unicode `char`.""" super().__init__(self.character) def __repr__(self): """A textual representation of this control character.""" return self.__class__.__name__ @property def width(self): """Raises the exception associated with this control character. This method is called during typesetting.""" raise self.exception class NewlineException(Exception): """Exception signaling a :class:`Newline`.""" class Newline(ControlCharacter): """Control character ending the current line and starting a new one.""" character = '\n' exception = NewlineException class Tab(ControlCharacter): """Tabulator character, used for vertically aligning text. The :attr:`tab_width` attribute is set a later point in time when context (:class:`TabStop`) is available.""" character = '\t' # predefined text styles SUPERSCRIPT_STYLE = TextStyle(position='superscript') SUBSCRIPT_STYLE = TextStyle(position='subscript') class Superscript(MixedStyledText): """Superscript.""" def __init__(self, text, parent=None): """Accepts a single instance of :class:`str` or :class:`StyledText`, or an iterable of these.""" super().__init__(text, style=SUPERSCRIPT_STYLE, parent=parent) class Subscript(MixedStyledText): """Subscript.""" def __init__(self, text, parent=None): """Accepts a single instance of :class:`str` or :class:`StyledText`, or an iterable of these.""" super().__init__(text, style=SUBSCRIPT_STYLE, parent=parent) from .reference import Field from .inline import InlineFlowable
/rinohtype-reloaded-0.3.3.tar.gz/rinohtype-reloaded-0.3.3/src/rinoh/text.py
0.675444
0.158044
text.py
pypi
import os from ast import literal_eval from functools import partial from token import LPAR, RPAR, NAME, EQUAL, NUMBER, ENDMARKER, STRING, COMMA from .attribute import (Attribute, AcceptNoneAttributeType, Integer, OptionSet, AttributesDictionary, ParseError) from .color import RED from .dimension import Dimension, PERCENT from .flowable import (Flowable, FlowableState, HorizontalAlignment, FlowableWidth, StaticGroupedFlowables, GroupedFlowablesStyle, Float, FloatStyle) from .inline import InlineFlowable from .layout import ContainerOverflow, EndOfContainer from .number import NumberedParagraph, NumberedParagraphStyle, format_number from .paragraph import Paragraph from .reference import ReferenceType from .structure import ListOf, ListOfSection from .text import MixedStyledText, SingleStyledText, TextStyle, StyledText from .util import posix_path, ReadAliasAttribute, PeekIterator __all__ = ['Image', 'InlineImage', 'BackgroundImage', 'ImageArgs', 'Scale', 'Caption', 'CaptionStyle', 'Figure', 'FigureStyle', 'ListOfFiguresSection', 'ListOfFigures'] class Scale(OptionSet): """Scaling factor for images Can be a numerical value where a value of 1 keeps the image's original size or one of :attr:`values`. """ values = 'fit', 'fill' @classmethod def check_type(cls, value): return super().check_type(value) or value > 0 @classmethod def from_tokens(cls, tokens): if tokens.next.type == NAME: value = super().from_tokens(tokens) elif tokens.next.type == NUMBER: value = float(next(tokens).string) if not cls.check_type(value): raise ParseError('Scale factor should be larger than 0') else: raise ParseError('Expecting scale option name or number') return value @classmethod def doc_format(cls): return ('{} or a float larger than 0' .format(', '.join('``{}``'.format(s) for s in cls.value_strings))) class ImageState(FlowableState): image = ReadAliasAttribute('flowable') width = None class Filename(str): """str subclass that provides system-independent path comparison""" def __eq__(self, other): return posix_path(str(self)) == posix_path(str(other)) def __ne__(self, other): return not (self == other) class RequiredArg(Attribute): def __init__(self, accepted_type, description): super().__init__(accepted_type, None, description) class OptionalArg(Attribute): pass class String(AcceptNoneAttributeType): @classmethod def from_tokens(cls, tokens): token = next(tokens) if token.type != STRING: raise ParseError('Expecting a string') return literal_eval(token.string) class ImageArgsBase(AttributesDictionary): file_or_filename = RequiredArg(String, 'Path to the image file') scale = OptionalArg(Scale, 'fit', 'Scaling factor for the image') width = OptionalArg(Dimension, None, 'The width to scale the image to') height = OptionalArg(Dimension, None, 'The height to scale the image to') dpi = OptionalArg(Integer, 0, 'Overrides the DPI value set in the image') rotate = OptionalArg(Integer, 0, 'Angle in degrees to rotate the image') @staticmethod def _parse_argument(argument_definition, tokens): arg_tokens = [] depth = 0 for token in tokens: if token.exact_type == LPAR: depth += 1 elif token.exact_type == RPAR: depth -= 1 arg_tokens.append(token) if depth == 0 and tokens.next.exact_type in (COMMA, RPAR, ENDMARKER): break argument_type = argument_definition.accepted_type arg_tokens_iter = PeekIterator(arg_tokens) argument = argument_type.from_tokens(arg_tokens_iter) if not arg_tokens_iter._at_end: raise ParseError('Syntax error') return argument, tokens.next.exact_type in (RPAR, ENDMARKER) @classmethod def parse_arguments(cls, tokens): argument_defs = (cls.attribute_definition(name) for name in cls._all_attributes) args, kwargs = [], {} is_last_arg = False # required arguments for argument_def in (argdef for argdef in argument_defs if isinstance(argdef, RequiredArg)): argument, is_last_arg = cls._parse_argument(argument_def, tokens) args.append(argument) # optional arguments while not is_last_arg: assert next(tokens).exact_type == COMMA keyword_token = next(tokens) if keyword_token.exact_type != NAME: raise ParseError('Expecting a keyword!') keyword = keyword_token.string equals_token = next(tokens) if equals_token.exact_type != EQUAL: raise ParseError('Expecting the keyword to be followed by an ' 'equals sign.') try: argument_def = cls.attribute_definition(keyword) except KeyError: raise ParseError('Unsupported argument keyword: {}' .format(keyword)) argument, is_last_arg = cls._parse_argument(argument_def, tokens) kwargs[keyword] = argument return args, kwargs class ImageBase(Flowable): """Base class for flowables displaying an image If DPI information is embedded in the image, it is used to determine the size at which the image is displayed in the document (depending on the sizing options specified). Otherwise, a value of 72 DPI is used. Args: filename_or_file (str, file): the image to display. This can be a path to an image file on the file system or a file-like object containing the image. scale (float): scales the image to `scale` times its original size width (Dimension): specifies the absolute width or the width relative to the container width height (Dimension): specifies the absolute height or the width relative to the container **width**. dpi (float): overrides the DPI value embedded in the image (or the default of 72) rotate (float): the angle in degrees to rotate the image over limit_width (Dimension): limit the image to this width when none of scale, width and height are given and the image would be wider than the container If only one of `width` or `height` is given, the image is scaled preserving the original aspect ratio. If `width` or `height` is given, `scale` or `dpi` may not be specified. """ arguments = ImageArgsBase def __init__(self, filename_or_file, scale=1.0, width=None, height=None, dpi=None, rotate=0, limit_width=None, id=None, style=None, parent=None, **kwargs): super().__init__(id=id, style=style, parent=parent, **kwargs) self.filename_or_file = filename_or_file if (width, height) != (None, None): if scale != 1.0: raise TypeError('Scale may not be specified when either ' 'width or height are given.') if dpi is not None: raise TypeError('DPI may not be specified when either ' 'width or height are given.') self.scale = scale self.width = width self.height = height self.dpi = dpi self.rotate = rotate self.limit_width = limit_width @property def filename(self): if isinstance(self.filename_or_file, str): return Filename(self.filename_or_file) def _short_repr_args(self, flowable_target): yield "'{}'".format(self.filename) def initial_state(self, container): return ImageState(self) def render(self, container, last_descender, state, **kwargs): try: try: posix_filename = posix_path(self.filename_or_file) except AttributeError: # self.filename_or_file is a file filename_or_file = self.filename_or_file else: source_root = container.document.document_tree.source_root abs_filename = source_root / posix_filename filename_or_file = os.path.normpath(str(abs_filename)) image = container.document.backend.Image(filename_or_file) except OSError as err: container.document.error = True message = "Error opening image file: {}".format(err) self.warn(message) text = SingleStyledText(message, style=TextStyle(font_color=RED)) return Paragraph(text).flow(container, last_descender) left, top = 0, float(container.cursor) width = self._width(container) try: scale_width = width.to_points(container.width) / image.width except AttributeError: # width is a FlowableWidth scale_width = None if self.height is not None: scale_height = self.height.to_points(container.width) / image.height if scale_width is None: scale_width = scale_height else: scale_height = scale_width if scale_width is None: # no width or height given if self.scale in Scale.values: w_scale = float(container.width) / image.width h_scale = float(container.remaining_height) / image.height min_or_max = min if self.scale == Scale.FIT else max scale_width = scale_height = min_or_max(w_scale, h_scale) else: scale_width = scale_height = self.scale dpi_x, dpi_y = image.dpi dpi_scale_x = (dpi_x / self.dpi) if self.dpi and dpi_x else 1 dpi_scale_y = (dpi_y / self.dpi) if self.dpi and dpi_y else 1 if (scale_width == scale_height == 1.0 # limit width if necessary and self.limit_width is not None and image.width * dpi_scale_x > container.width): limit_width = self.limit_width.to_points(container.width) scale_width = scale_height = limit_width / image.width w, h = container.canvas.place_image(image, left, top, container.document, scale_width * dpi_scale_x, scale_height * dpi_scale_y, self.rotate) ignore_overflow = (self.scale == Scale.FIT) or container.page._empty try: container.advance(h, ignore_overflow) except ContainerOverflow: raise EndOfContainer(state) return w, h, 0 class InlineImageArgs(ImageArgsBase): baseline = OptionalArg(Dimension, 0, "Location of this inline image's " "baseline") class InlineImage(ImageBase, InlineFlowable): directive = 'image' arguments = InlineImageArgs def __init__(self, filename_or_file, scale=1.0, width=None, height=None, dpi=None, rotate=0, baseline=None, id=None, style=None, parent=None): super().__init__(filename_or_file=filename_or_file, scale=scale, height=height, dpi=dpi, rotate=rotate, baseline=baseline, id=id, style=style, parent=parent) self.width = width def _width(self, container): return FlowableWidth.AUTO if self.width is None else self.width class _Image(ImageBase): def __init__(self, filename_or_file, scale=1.0, width=None, height=None, dpi=None, rotate=0, limit_width=100*PERCENT, align=None, id=None, style=None, parent=None): super().__init__(filename_or_file=filename_or_file, scale=scale, width=width, height=height, dpi=dpi, rotate=rotate, limit_width=limit_width, align=align, id=id, style=style, parent=parent) class Image(_Image): pass class BackgroundImageMeta(type(_Image), type(AttributesDictionary)): pass class ImageArgs(ImageArgsBase): limit_width = Attribute(Dimension, 100*PERCENT, 'Limit the image width ' 'when none of :attr:`scale`, :attr:`width` and ' ':attr:`height` are given and the image would ' 'be wider than the container') align = Attribute(HorizontalAlignment, 'left', 'How to align the image ' 'within the page') class BackgroundImage(_Image, AcceptNoneAttributeType): """Image to place in the background of a page Takes the same arguments as :class:`Image`. """ arguments = ImageArgs @classmethod def from_tokens(cls, tokens): args, kwargs = cls.arguments.parse_arguments(tokens) return cls(*args, **kwargs) @classmethod def doc_format(cls): return ('filename of an image file enclosed in quotes, optionally ' 'followed by space-delimited keyword arguments ' '(``<keyword>=<value>``) that determine how the image is ' 'displayed') class CaptionStyle(NumberedParagraphStyle): numbering_level = Attribute(Integer, 1, 'At which section level to ' 'restart numbering') number_separator = Attribute(StyledText, '.', 'Characters inserted between' ' the section number and the caption number') class Caption(NumberedParagraph): style_class = CaptionStyle @property def referenceable(self): return self.parent def prepare(self, flowable_target): super().prepare(flowable_target) document = flowable_target.document get_style = partial(self.get_style, flowable_target=flowable_target) category = self.referenceable.category numbering_level = get_style('numbering_level') section = self.section while section and section.level > numbering_level: section = section.parent.section section_id = section.get_id(document, False) if section else None category_counters = document.counters.setdefault(category, {}) category_counter = category_counters.setdefault(section_id, []) category_counter.append(self) number_format = get_style('number_format') number = format_number(len(category_counter), number_format) if section_id: section_number = document.get_reference(section_id, 'number') sep = get_style('number_separator') or SingleStyledText('') number = section_number + sep.to_string(flowable_target) + number reference = '{} {}'.format(category, number) for id in self.referenceable.get_ids(document): document.set_reference(id, ReferenceType.NUMBER, number) document.set_reference(id, ReferenceType.REFERENCE, reference) document.set_reference(id, ReferenceType.TITLE, self.content.to_string(None)) def text(self, container): label = self.referenceable.category + ' ' + self.number(container) return MixedStyledText(label + self.content, parent=self) class FigureStyle(FloatStyle, GroupedFlowablesStyle): pass class Figure(Float, StaticGroupedFlowables): style_class = FigureStyle category = 'Figure' class ListOfFigures(ListOf): category = 'Figure' class ListOfFiguresSection(ListOfSection): list_class = ListOfFigures
/rinohtype-reloaded-0.3.3.tar.gz/rinohtype-reloaded-0.3.3/src/rinoh/image.py
0.799833
0.307904
image.py
pypi
import re from collections import OrderedDict from configparser import ConfigParser from io import BytesIO from itertools import chain from pathlib import Path from token import NUMBER, ENDMARKER, MINUS, PLUS, NAME from tokenize import tokenize, ENCODING from warnings import warn from .util import (NamedDescriptor, WithNamedDescriptors, NotImplementedAttribute, class_property, PeekIterator) __all__ = ['AttributeType', 'AcceptNoneAttributeType', 'OptionSet', 'Attribute', 'OverrideDefault', 'AttributesDictionary', 'RuleSet', 'RuleSetFile', 'Bool', 'Integer', 'ParseError', 'Var'] class AttributeType(object): def __eq__(self, other): return type(self) == type(other) and self.__dict__ == other.__dict__ def __ne__(self, other): return not self == other @classmethod def check_type(cls, value): return isinstance(value, cls) @classmethod def from_string(cls, string): return cls.parse_string(string) @classmethod def parse_string(cls, string): encoded_string = BytesIO(string.encode('utf-8')) tokens = PeekIterator(tokenize(encoded_string.readline)) assert next(tokens)[:2] == (ENCODING, 'utf-8') result = cls.from_tokens(tokens) if next(tokens).type != ENDMARKER: raise ParseError('Syntax error') return result @classmethod def from_tokens(cls, tokens): raise NotImplementedError(cls) RE_VARIABLE = re.compile(r'^\$\(([a-z_ -]+)\)$', re.IGNORECASE) @classmethod def validate(cls, value, accept_variables=False, attribute_name=None): if isinstance(value, str): stripped = value.replace('\n', ' ').strip() m = cls.RE_VARIABLE.match(stripped) if m: value = Var(m.group(1)) else: value = cls.from_string(stripped) if isinstance(value, Var): if not accept_variables: raise TypeError("The '{}' attribute does not accept variables" .format(attribute_name)) elif not cls.check_type(value): raise TypeError("{} ({}) is not of the correct type for the '{}' " "attribute".format(value, type(value).__name__, attribute_name)) return value @classmethod def doc_repr(cls, value): return '``{}``'.format(value) if value else '(no value)' @classmethod def doc_format(cls): warn('Missing implementation for {}.doc_format'.format(cls.__name__)) return '' class AcceptNoneAttributeType(AttributeType): @classmethod def check_type(cls, value): return (isinstance(value, type(None)) or super(__class__, cls).check_type(value)) @classmethod def from_string(cls, string): if string.strip().lower() == 'none': return None return super(__class__, cls).from_string(string) @classmethod def doc_repr(cls, value): return '``{}``'.format('none' if value is None else value) class OptionSetMeta(type): def __new__(metacls, classname, bases, cls_dict): cls = super().__new__(metacls, classname, bases, cls_dict) cls.__doc__ = (cls_dict['__doc__'] + '\n\n' if '__doc__' in cls_dict else '') cls.__doc__ += 'Accepts: {}'.format(cls.doc_format()) return cls def __getattr__(cls, item): if item == 'NONE' and None in cls.values: return None string = item.lower().replace('_', ' ') if item.isupper() and string in cls.values: return string raise AttributeError(item) def __iter__(cls): return iter(cls.values) class OptionSet(AttributeType, metaclass=OptionSetMeta): """Accepts the values listed in :attr:`values`""" values = () @classmethod def check_type(cls, value): return value in cls.values @class_property def value_strings(cls): return ['none' if value is None else value.lower() for value in cls.values] @classmethod def from_tokens(cls, tokens): if tokens.next.type != NAME: raise ParseError('Expecting a name') token = next(tokens) _, start_col = token.start while tokens.next and tokens.next.type == NAME: token = next(tokens) _, end_col = token.end option_string = token.line[start_col:end_col].strip() try: index = cls.value_strings.index(option_string.lower()) except ValueError: raise ValueError("'{}' is not a valid {}. Must be one of: '{}'" .format(option_string, cls.__name__, "', '".join(cls.value_strings))) return cls.values[index] @classmethod def doc_repr(cls, value): return '``{}``'.format(value) @classmethod def doc_format(cls): return ', '.join('``{}``'.format(s) for s in cls.value_strings) class Attribute(NamedDescriptor): """Descriptor used to describe a style attribute""" def __init__(self, accepted_type, default_value, description): self.name = None self.accepted_type = accepted_type self.default_value = accepted_type.validate(default_value) self.description = description def __get__(self, style, type=None): try: return style.get(self.name, self.default_value) except AttributeError: return self def __set__(self, style, value): if not self.accepted_type.check_type(value): raise TypeError('The {} attribute only accepts {} instances' .format(self.name, self.accepted_type)) style[self.name] = value class OverrideDefault(Attribute): """Overrides the default value of an attribute defined in a superclass""" def __init__(self, default_value): self._default_value = default_value @property def overrides(self): return self._overrides @overrides.setter def overrides(self, attribute): self._overrides = attribute self.default_value = self.accepted_type.validate(self._default_value) @property def accepted_type(self): return self.overrides.accepted_type @property def description(self): return self.overrides.description class WithAttributes(WithNamedDescriptors): def __new__(mcls, classname, bases, cls_dict): attributes = cls_dict['_attributes'] = OrderedDict() doc = [] for name, attr in cls_dict.items(): if not isinstance(attr, Attribute): continue attributes[name] = attr if isinstance(attr, OverrideDefault): for mro_cls in (cls for base_cls in bases for cls in base_cls.__mro__): try: attr.overrides = mro_cls._attributes[name] break except KeyError: pass else: raise NotImplementedError doc.append('{0} (:class:`.{1}`): Overrides the default ' 'set in :attr:`{2} <.{2}.{0}>`' .format(name, attr.accepted_type.__name__, mro_cls.__name__)) else: doc.append('{} (:class:`.{}`): {}' .format(name, attr.accepted_type.__name__, attr.description)) format = attr.accepted_type.doc_format() default = attr.accepted_type.doc_repr(attr.default_value) doc.append('\n Accepts: {}\n'.format(format)) doc.append('\n Default: {}\n'.format(default)) supported_attributes = list(name for name in attributes) for base_class in bases: try: supported_attributes.extend(base_class._supported_attributes) except AttributeError: continue for mro_cls in base_class.__mro__: for name, attr in getattr(mro_cls, '_attributes', {}).items(): if name in attributes: continue doc.append('{} (:class:`.{}`): (:attr:`{} <.{}.{}>`) {}' .format(name, attr.accepted_type.__name__, mro_cls.__name__, mro_cls.__name__, name, attr.description)) format = attr.accepted_type.doc_format() default = attr.accepted_type.doc_repr(attr.default_value) doc.append('\n Accepts: {}\n'.format(format)) doc.append('\n Default: {}\n'.format(default)) if doc: attr_doc = '\n '.join(chain([' Attributes:'], doc)) cls_dict['__doc__'] = (cls_dict.get('__doc__', '') + '\n\n' + attr_doc) cls_dict['_supported_attributes'] = supported_attributes return super().__new__(mcls, classname, bases, cls_dict) @property def _all_attributes(cls): for mro_class in reversed(cls.__mro__): for name in getattr(mro_class, '_attributes', ()): yield name @property def supported_attributes(cls): for mro_class in cls.__mro__: for name in getattr(mro_class, '_supported_attributes', ()): yield name class AttributesDictionary(OrderedDict, metaclass=WithAttributes): default_base = None def __init__(self, base=None, **attributes): self.base = base or self.default_base for name, value in attributes.items(): attributes[name] = self.validate_attribute(name, value, True) super().__init__(attributes) @classmethod def validate_attribute(cls, name, value, accept_variables): try: attribute_type = cls.attribute_definition(name).accepted_type except KeyError: raise TypeError('{} is not a supported attribute for {}' .format(name, cls.__name__)) return attribute_type.validate(value, accept_variables, name) @classmethod def _get_default(cls, attribute): """Return the default value for `attribute`. If no default is specified in this style, get the default from the nearest superclass. If `attribute` is not supported, raise a :class:`KeyError`.""" try: for klass in cls.__mro__: if attribute in klass._attributes: return klass._attributes[attribute].default_value except AttributeError: raise KeyError("No attribute '{}' in {}".format(attribute, cls)) @classmethod def attribute_definition(cls, name): try: for klass in cls.__mro__: if name in klass._attributes: return klass._attributes[name] except AttributeError: pass raise KeyError(name) def get_value(self, attribute, rule_set): value = self[attribute] if isinstance(value, Var): accepted_type = self.attribute_definition(attribute).accepted_type value = value.get(accepted_type, rule_set) value = self.validate_attribute(attribute, value, False) return value class RuleSet(OrderedDict): main_section = NotImplementedAttribute() def __init__(self, name, base=None, **kwargs): super().__init__(**kwargs) self.name = name self.base = base self.variables = OrderedDict() def __getitem__(self, name): try: return super().__getitem__(name) except KeyError: if self.base is not None: return self.base[name] raise def __setitem__(self, name, style): assert name not in self if isinstance(style, AttributesDictionary): style.name = name super().__setitem__(name, style) def __call__(self, name, **kwargs): self[name] = self.get_entry_class(name)(**kwargs) def __str__(self): return '{}({})'.format(type(self).__name__, self.name) def get_variable(self, name, accepted_type): try: return self._get_variable(name, accepted_type) except KeyError: if self.base: return self.base.get_variable(name, accepted_type) else: raise VariableNotDefined("Variable '{}' is not defined" .format(name)) def _get_variable(self, name, accepted_type): return self.variables[name] def get_entry_class(self, name): raise NotImplementedError class RuleSetFile(RuleSet): def __init__(self, filename, base=None, **kwargs): self.filename = Path(filename) config = ConfigParser(default_section=None, delimiters=('=',), interpolation=None) with self.filename.open() as file: config.read_file(file) options = dict(config[self.main_section] if config.has_section(self.main_section) else {}) name = options.pop('name', filename) base = options.pop('base', base) options.update(kwargs) # optionally override options super().__init__(name, base=base, **options) if config.has_section('VARIABLES'): for name, value in config.items('VARIABLES'): self.variables[name] = value for section_name, section_body in config.items(): if section_name in (None, self.main_section, 'VARIABLES'): continue if ':' in section_name: name, classifier = (s.strip() for s in section_name.split(':')) else: name, classifier = section_name.strip(), None self.process_section(name, classifier, section_body.items()) def _get_variable(self, name, accepted_type): variable = super()._get_variable(name, accepted_type) if isinstance(variable, str): variable = accepted_type.from_string(variable) return variable def process_section(self, section_name, classifier, items): raise NotImplementedError class Bool(AttributeType): @classmethod def check_type(cls, value): return isinstance(value, bool) @classmethod def from_tokens(cls, tokens): string = next(tokens).string lower_string = string.lower() if lower_string not in ('true', 'false'): raise ValueError("'{}' is not a valid {}. Must be one of 'true' " "or 'false'".format(string, cls.__name__)) return lower_string == 'true' @classmethod def doc_repr(cls, value): return '``{}``'.format(str(value).lower()) @classmethod def doc_format(cls): return '``true`` or ``false``' class Integer(AttributeType): @classmethod def check_type(cls, value): return isinstance(value, int) @classmethod def from_tokens(cls, tokens): token = next(tokens) sign = 1 if token.exact_type in (MINUS, PLUS): sign = 1 if token.exact_type == PLUS else -1 token = next(tokens) if token.type != NUMBER: raise ParseError('Expecting a number') try: value = int(token.string) except ValueError: raise ParseError('Expecting an integer') return sign * value @classmethod def doc_format(cls): return 'a natural number (positive integer)' class ParseError(Exception): pass # variables class Var(object): def __init__(self, name): super().__init__() self.name = name def __repr__(self): return "{}('{}')".format(type(self).__name__, self.name) def __str__(self): return '$({})'.format(self.name) def get(self, accepted_type, rule_set): return rule_set.get_variable(self.name, accepted_type) class VariableNotDefined(Exception): pass
/rinohtype-reloaded-0.3.3.tar.gz/rinohtype-reloaded-0.3.3/src/rinoh/attribute.py
0.685002
0.262422
attribute.py
pypi
from collections import Iterable from itertools import chain from functools import partial from math import sqrt from .attribute import Attribute, OptionSet, OverrideDefault, Integer, Bool from .dimension import DimensionBase as DimBase from .draw import Line, Rectangle, ShapeStyle, LineStyle from .flowable import Flowable, FlowableStyle, FlowableState, FlowableWidth from .layout import MaybeContainer, VirtualContainer, EndOfContainer from .structure import (StaticGroupedFlowables, GroupedFlowablesStyle, ListOf, ListOfSection) from .style import Styled from .util import ReadAliasAttribute, NotImplementedAttribute __all__ = ['Table', 'TableStyle', 'TableWithCaption', 'TableSection', 'TableHead', 'TableBody', 'TableRow', 'TableCell', 'TableCellStyle', 'TableCellBorder', 'TableCellBorderStyle', 'TableCellBackground', 'TableCellBackgroundStyle', 'VerticalAlign', 'ListOfTables', 'ListOfTablesSection'] class TableState(FlowableState): table = ReadAliasAttribute('flowable') def __init__(self, table, column_widths=None, body_row_index=0): super().__init__(table) self.column_widths = column_widths self.body_row_index = body_row_index @property def width(self): return sum(self.column_widths) @property def body_row_index(self): return self._body_row_index @body_row_index.setter def body_row_index(self, body_row_index): self._body_row_index = body_row_index self.initial = body_row_index == 0 def __copy__(self): return self.__class__(self.table, self.column_widths, self.body_row_index) class TableStyle(FlowableStyle): split_minimum_rows = Attribute(Integer, 0, 'The minimum number of rows to ' 'display when the table is ' 'split across pages') repeat_head = Attribute(Bool, False, 'Repeat the head when the table is ' 'split across pages') NEVER_SPLIT = float('+inf') class Table(Flowable): style_class = TableStyle def __init__(self, body, head=None, width=None, column_widths=None, id=None, style=None, parent=None): """ Args: width (DimensionBase or None): the width of the table. If ``None``, the width of the table is automatically determined. column_widths (list or None): a list of relative (int or float) and absolute (:class:`.Dimension`) column widths. A value of ``None`` auto-sizes the column. Passing ``None` instead of a list auto-sizes all columns. """ super().__init__(width=width, id=id, style=style, parent=parent) self.head = head if head: head.parent = self self.body = body body.parent = self self.column_widths = column_widths def initial_state(self, container): return TableState(self) def render(self, container, last_descender, state, space_below=0, **kwargs): # TODO: allow data to override style (align) if state.column_widths is None: state.column_widths = self._size_columns(container) get_style = partial(self.get_style, flowable_target=container) with MaybeContainer(container) as maybe_container: def render_rows(section, next_row_index=0): rows = section[next_row_index:] rendered_spans = self._render_section(container, rows, state.column_widths) for rendered_rows, is_last_span in rendered_spans: sum_row_heights = sum(row.height for row in rendered_rows) remaining_height = maybe_container.remaining_height if isinstance(section, TableBody) and is_last_span: remaining_height -= space_below if sum_row_heights > remaining_height: break self._place_rows_and_render_borders(maybe_container, rendered_rows) next_row_index += len(rendered_rows) return next_row_index # head rows if self.head and (state.initial or get_style('repeat_head')): if render_rows(self.head) != len(self.head): raise EndOfContainer(state) # body rows next_row_index = render_rows(self.body, state.body_row_index) rows_left = len(self.body) - next_row_index if rows_left > 0: split_minimum_rows = get_style('split_minimum_rows') if min(next_row_index, rows_left) >= split_minimum_rows: state.body_row_index = next_row_index raise EndOfContainer(state) return sum(state.column_widths), 0, 0 def _size_columns(self, container): """Calculate the table's column sizes constrained by: - requested (absolute, relative and automatic) column widths - container width (= available width) - cell contents """ def calculate_column_widths(max_cell_width): """Calculate required column widths given a maximum cell width""" def cell_content_width(cell): buffer = VirtualContainer(container, width=max_cell_width) width, _, _ = cell.flow(buffer, None) return float(width) widths = [0] * self.body.num_columns for row in chain(self.head or [], self.body): for cell in (cell for cell in row if cell.colspan == 1): col = int(cell.column_index) widths[col] = max(widths[col], cell_content_width(cell)) for row in chain(self.head or [], self.body): for cell in (cell for cell in row if cell.colspan > 1): c = int(cell.column_index) c_end = c + cell.colspan padding = cell_content_width(cell) - sum(widths[c:c_end]) if padding > 0: per_column_padding = padding / cell.colspan for i in range(cell.colspan): widths[c + i] += per_column_padding return widths width = self._width(container) try: fixed_width = width.to_points(container.width) except AttributeError: fixed_width = width or FlowableWidth.AUTO min_column_widths = calculate_column_widths(0) max_column_widths = calculate_column_widths(float('+inf')) # calculate relative column widths for auto-sized columns auto_rel_colwidths = [sqrt(minimum * maximum) for minimum, maximum in zip(min_column_widths, max_column_widths)] column_widths = self.column_widths or [None for _ in max_column_widths] try: # TODO: max() instead of min()? relative_factor = min(auto_relative_width / width for width, auto_relative_width in zip(column_widths, auto_rel_colwidths) if width and not isinstance(width, DimBase)) except ValueError: relative_factor = 1 column_widths = [auto_relative_width * relative_factor if width is None else width for width, auto_relative_width in zip(column_widths, auto_rel_colwidths)] # set min = max for columns with a fixed width total_fixed_cols_width = 0 total_portions = 0 for i, column_width in enumerate(column_widths): if isinstance(column_width, DimBase): width_in_pt = column_width.to_points(container.width) min_column_widths[i] = max_column_widths[i] = width_in_pt total_fixed_cols_width += width_in_pt else: total_portions += column_width # does the table fit within the available width without wrapping? if sum(max_column_widths) <= container.width: return max_column_widths # determine table width if fixed_width != FlowableWidth.AUTO: table_width = fixed_width elif total_portions: max_factor = max(maximum / width for width, maximum, in zip(column_widths, max_column_widths) if not isinstance(width, DimBase)) no_wrap_rel_cols_width = total_portions * max_factor table_width = min(total_fixed_cols_width + no_wrap_rel_cols_width, float(container.width)) else: table_width = total_fixed_cols_width # TODO: warn when a column's fixed width < min width # determine absolute width of columns with relative widths if total_portions: total_relative_cols_width = table_width - total_fixed_cols_width portion_width = total_relative_cols_width / total_portions auto_widths = [width if isinstance(width, DimBase) else width * portion_width for width in column_widths] extra = [0 if isinstance(width, DimBase) else auto_width - min_column_widths[index] for index, auto_width in enumerate(auto_widths)] excess = [0 if isinstance(width, DimBase) else auto_width - max_column_widths[index] for index, auto_width in enumerate(auto_widths)] excess_pos = sum(x for x in excess if x > 0) extra_neg = sum(x for x in extra if x <= 0) + excess_pos extra_pos = (sum(x for x, c in zip(extra, excess) if x > 0 and c <= 0)) if extra_pos + extra_neg < 0: self.warn('Table contents are too wide to fit within the ' 'available width', container) return [width.to_points(container.width) if isinstance(width, DimBase) else width for width in auto_widths] def final_column_width(index, width): if isinstance(width, DimBase): return width.to_points(container.width) elif excess[index] > 0: return max_column_widths[index] elif extra[index] <= 0: return min_column_widths[index] else: return width + (extra_neg * extra[index] / extra_pos) return [final_column_width(i, width) for i, width in enumerate(auto_widths)] else: return [width.to_points(container.width) for width in column_widths] @classmethod def _render_section(cls, container, rows, column_widths): rendered_rows = [] rows_left_in_span = 0 for row in rows: rows_left_in_span = max(row.maximum_rowspan, rows_left_in_span) - 1 rendered_row = cls._render_row(column_widths, container, row) rendered_rows.append(rendered_row) if rows_left_in_span == 0: is_last_span = row == rows[-1] yield cls._vertically_size_cells(rendered_rows), is_last_span rendered_rows = [] assert not rendered_rows @staticmethod def _render_row(column_widths, container, row): rendered_row = RenderedRow(int(row._index), row) for cell in row: col_idx = int(cell.column_index) left = sum(column_widths[:col_idx]) cell_width = sum(column_widths[col_idx:col_idx + cell.colspan]) buffer = VirtualContainer(container, cell_width) cell.flow(buffer, None) rendered_cell = RenderedCell(cell, buffer, left) rendered_row.append(rendered_cell) return rendered_row @staticmethod def _vertically_size_cells(rendered_rows): """Grow row heights to cater for vertically spanned cells that do not fit in the available space.""" for r, rendered_row in enumerate(rendered_rows): for rendered_cell in rendered_row: if rendered_cell.rowspan > 1: row_height = sum(row.height for row in rendered_rows[r:r + rendered_cell.rowspan]) extra_height_needed = rendered_cell.height - row_height if extra_height_needed > 0: padding = extra_height_needed / rendered_cell.rowspan for i in range(r, r + rendered_cell.rowspan): rendered_rows[i].height += padding return rendered_rows @staticmethod def _place_rows_and_render_borders(container, rendered_rows): """Place the rendered cells onto the page canvas and draw borders around them.""" def draw_cell_border(rendered_cell, cell_height, container): cell_width = rendered_cell.width background = TableCellBackground((0, 0), cell_width, cell_height, parent=rendered_cell.cell) background.render(container) for position in ('top', 'right', 'bottom', 'left'): border = TableCellBorder(rendered_cell, cell_height, position) border.render(container) return background y_cursor = container.cursor for r, rendered_row in enumerate(rendered_rows): container.advance(rendered_row.height) if rendered_row.index == 0: container.register_styled(rendered_row.row.section) container.register_styled(rendered_row.row) for c, rendered_cell in enumerate(rendered_row): cell_height = sum(rendered_row.height for rendered_row in rendered_rows[r:r + rendered_cell.rowspan]) x_cursor = rendered_cell.x_position y_pos = float(y_cursor + cell_height) cell_container = VirtualContainer(container) background = draw_cell_border(rendered_cell, cell_height, cell_container) cell_container.place_at(container, x_cursor, y_pos) vertical_align = rendered_cell.cell.get_style('vertical_align', container) if vertical_align == VerticalAlign.TOP: vertical_offset = 0 elif vertical_align == VerticalAlign.MIDDLE: vertical_offset = (cell_height - rendered_cell.height) / 2 elif vertical_align == VerticalAlign.BOTTOM: vertical_offset = (cell_height - rendered_cell.height) y_offset = float(y_cursor + vertical_offset) rendered_cell.container.place_at(container, x_cursor, y_offset) container.register_styled(background) y_cursor += rendered_row.height class TableWithCaption(StaticGroupedFlowables): category = 'Table' class TableSection(Styled, list): def __init__(self, rows, style=None, parent=None): Styled.__init__(self, style=style, parent=parent) list.__init__(self, rows) for row in rows: row.parent = self def prepare(self, flowable_target): for row in self: row.prepare(flowable_target) @property def num_columns(self): return sum(cell.colspan for cell in self[0]) class TableHead(TableSection): pass class TableBody(TableSection): pass class TableRow(Styled, list): section = ReadAliasAttribute('parent') def __init__(self, cells, style=None, parent=None): Styled.__init__(self, style=style, parent=parent) list.__init__(self, cells) for cell in cells: cell.parent = self @property def maximum_rowspan(self): return max(cell.rowspan for cell in self) def prepare(self, flowable_target): for cells in self: cells.prepare(flowable_target) @property def _index(self): return next(i for i, item in enumerate(self.section) if item is self) def get_rowspanned_columns(self): """Return a dictionary mapping column indices to the number of columns spanned.""" spanned_columns = {} current_row_index = self._index current_row_cols = sum(cell.colspan for cell in self) prev_rows = iter(reversed(self.section[:current_row_index])) while current_row_cols < self.section.num_columns: row = next(prev_rows) min_rowspan = current_row_index - int(row._index) if row.maximum_rowspan > min_rowspan: for cell in (c for c in row if c.rowspan > min_rowspan): col_index = int(cell.column_index) spanned_columns[col_index] = cell.colspan current_row_cols += cell.colspan return spanned_columns class VerticalAlign(OptionSet): values = 'top', 'middle', 'bottom' class TableCellStyle(GroupedFlowablesStyle): vertical_align = Attribute(VerticalAlign, 'middle', 'Vertical alignment of the cell contents ' 'within the available space') class TableCell(StaticGroupedFlowables): style_class = TableCellStyle row = ReadAliasAttribute('parent') def __init__(self, flowables, rowspan=1, colspan=1, id=None, style=None, parent=None): super().__init__(flowables, id=id, style=style, parent=parent) self.rowspan = rowspan self.colspan = colspan @property def row_index(self): return RowIndex(self) @property def column_index(self): return ColumnIndex(self) class Index(object): def __init__(self, cell): self.cell = cell @property def row(self): return self.cell.parent @property def section(self): return self.row.section def __eq__(self, other): if isinstance(other, slice): indices = range(*other.indices(self.num_items)) elif isinstance(other, Iterable): indices = other else: indices = (other, ) indices = [self.num_items + idx if idx < 0 else idx for idx in indices] return any(index in indices for index in self) def __int__(self): raise NotImplementedError def num_items(self): raise NotImplementedError class RowIndex(Index): def __int__(self): return next(i for i, row in enumerate(self.section) if row is self.row) def __iter__(self): index = int(self) return (index + i for i in range(self.cell.rowspan)) @property def num_items(self): return len(self.section) class ColumnIndex(Index): def __int__(self): spanned_columns = self.row.get_rowspanned_columns() column_index = 0 cells = iter(self.row) for col_index in range(self.cell.row.section.num_columns): if col_index in spanned_columns: column_index += spanned_columns[col_index] else: cell = next(cells) if cell is self.cell: return column_index column_index += cell.colspan def __iter__(self): index = int(self) return (index + i for i in range(self.cell.colspan)) @property def num_items(self): return self.row.section.num_columns class RenderedCell(object): def __init__(self, cell, container, x_position): self.cell = cell self.container = container self.x_position = x_position @property def width(self): return float(self.container.width) @property def height(self): return float(self.container.height) @property def rowspan(self): return self.cell.rowspan class RenderedRow(list): def __init__(self, index, row): super().__init__() self.index = index self.row = row self.height = 0 def append(self, rendered_cell): if rendered_cell.cell.rowspan == 1: self.height = max(self.height, rendered_cell.height) super().append(rendered_cell) class TableCellBorderStyle(LineStyle): stroke = OverrideDefault(None) class TableCellBorder(Line): style_class = TableCellBorderStyle def __init__(self, rendered_cell, cell_height, position, style=None): left, bottom, right, top = 0, 0, rendered_cell.width, cell_height if position == 'top': start, end = (left, top), (right, top) if position == 'right': start, end = (right, top), (right, bottom) if position == 'bottom': start, end = (left, bottom), (right, bottom) if position == 'left': start, end = (left, bottom), (left, top) super().__init__(start, end, style=style, parent=rendered_cell.cell) self.position = position class TableCellBackgroundStyle(ShapeStyle): fill_color = OverrideDefault(None) stroke = OverrideDefault(None) class TableCellBackground(Rectangle): style_class = TableCellBackgroundStyle class ListOfTables(ListOf): category = 'Table' class ListOfTablesSection(ListOfSection): list_class = ListOfTables
/rinohtype-reloaded-0.3.3.tar.gz/rinohtype-reloaded-0.3.3/src/rinoh/table.py
0.740737
0.223547
table.py
pypi
from collections import deque from contextlib import contextmanager from copy import copy from .dimension import Dimension, PT, DimensionAddition from .util import ContextManager __all__ = ['Container', 'FlowablesContainer', 'ChainedContainer', 'DownExpandingContainer', 'InlineDownExpandingContainer', 'UpExpandingContainer', 'VirtualContainer', 'Chain', 'FootnoteContainer', 'MaybeContainer', 'discard_state', 'ContainerOverflow', 'EndOfContainer', 'PageBreakException'] class ContainerOverflow(Exception): """The end of the :class:`FlowableContainer` has been reached.""" class EndOfContainer(Exception): """TODO""" def __init__(self, flowable_state, page_break=False): """`flowable_state` represents the rendering state of the :class:`Flowable` at the time the :class:`FlowableContainer`" overflows. """ self.flowable_state = flowable_state self.page_break = page_break class PageBreakException(ContainerOverflow): def __init__(self, break_type, chain, flowable_state): super().__init__() self.break_type = break_type self.chain = chain self.flowable_state = flowable_state class ReflowRequired(Exception): """Reflow of the current page is required due to insertion of a float.""" class FlowableTarget(object): """Something that takes :class:`Flowable`\ s to be rendered.""" def __init__(self, document_part, *args, **kwargs): """Initialize this flowable target. `document_part` is the :class:`Document` this flowable target is part of.""" from .flowable import StaticGroupedFlowables self.flowables = StaticGroupedFlowables([]) super().__init__(*args, **kwargs) @property def document(self): return self.document_part.document def append_flowable(self, flowable): """Append a `flowable` to the list of flowables to be rendered.""" self.flowables.append(flowable) def __lshift__(self, flowable): """Shorthand for :meth:`append_flowable`. Returns `self` so that it can be chained.""" self.append_flowable(flowable) return self def prepare(self, document): self.flowables.prepare(self) class Container(object): """Rectangular area that contains elements to be rendered to a :class:`Page`. A :class:`Container` has an origin (the top-left corner), a width and a height. It's contents are rendered relative to the container's position in its parent :class:`Container`.""" register_with_parent = True def __init__(self, name, parent, left=None, top=None, width=None, height=None, right=None, bottom=None): """Initialize a this container as a child of the `parent` container. The horizontal position and width of the container are determined from `left`, `width` and `right`. If only `left` or `right` is specified, the container's opposite edge will be placed at the corresponding edge of the parent container. Similarly, the vertical position and height of the container are determined from `top`, `height` and `bottom`. If only one of `top` or `bottom` is specified, the container's opposite edge is placed at the corresponding edge of the parent container.""" if left is None: left = 0*PT if (right and width) is None else (right - width) if width is None: width = (parent.width - left) if right is None else (right - left) if right is None: right = left + width self.left = left self.width = width self.right = right if top is None: top = 0*PT if (bottom and height) is None else (bottom - height) if height is None: height = (parent.height - top) if bottom is None else (bottom - top) if bottom is None: bottom = top + height self.top = top self.height = height self.bottom = bottom self.name = name self.parent = parent if self.register_with_parent: self.parent.children.append(self) self.children = [] self.clear() @property def document_part(self): return self.parent.document_part @property def document(self): return self.document_part.document @property def page(self): """The :class:`Page` this container is located on.""" return self.parent.page def clear(self): self.empty_canvas() def __repr__(self): return "{}('{}')".format(self.__class__.__name__, self.name) def __getattr__(self, name): if name in ('_footnote_space', 'float_space'): return getattr(self.parent, name) raise AttributeError('{}.{}'.format(self.__class__.__name__, name)) def empty_canvas(self): self.canvas = self.document.backend.Canvas() def render(self, type, rerender=False): """Render the contents of this container to its canvas. Note that the rendered contents need to be :meth:`place`d on the parent container's canvas before they become visible.""" for child in self.children: child.render(type, rerender) def check_overflow(self): for child in self.children: child.check_overflow() def place_children(self): for child in self.children: child.place() def place(self): """Place this container's canvas onto the parent container's canvas.""" self.place_children() self.canvas.append(self.parent.canvas, float(self.left), float(self.top)) def before_placing(self): for child in self.children: child.before_placing() BACKGROUND = 'background' CONTENT = 'content' HEADER_FOOTER = 'header_footer' CHAPTER_TITLE = 'chapter_title' class FlowablesContainerBase(Container): """A :class:`Container` that renders :class:`Flowable`\ s to a rectangular area on a page. The first flowable is rendered at the top of the container. The next flowable is rendered below the first one, and so on.""" def __init__(self, name, type, parent, left=None, top=None, width=None, height=None, right=None, bottom=None): self._self_cursor = Dimension(0) # initialized at container's top edge self._cursor = DimensionAddition(self._self_cursor) self._placed_styleds = {} super().__init__(name, parent, left=left, top=top, width=width, height=height, right=right, bottom=bottom) self.type = type @property def top_level_container(self): try: return self.parent.top_level_container except AttributeError: return self def clear(self): super().clear() del self.children[:] self._placed_styleds.clear() self._self_cursor._value = 0 # initialized at container's top edge del self._cursor.addends[1:] def mark_page_nonempty(self): if self.type == CONTENT: self.page._empty = False elif self.type is None: self.parent.mark_page_nonempty() @property def cursor(self): """Keeps track of where the next flowable is to be placed. As flowables are flowed into the container, the cursor moves down.""" return float(self._cursor) @property def remaining_height(self): return self.height - self.cursor def advance(self, height, ignore_overflow=False): """Advance the cursor by `height`. If this would cause the cursor to point beyond the bottom of the container, an :class:`EndOfContainer` exception is raised.""" if height <= self.remaining_height: self._self_cursor.grow(height) elif ignore_overflow: self._self_cursor.grow(float(self.remaining_height)) else: raise ContainerOverflow(self.page.number) def advance2(self, height, ignore_overflow=False): """Advance the cursor by `height`. Returns `True` on success. Returns `False` if this would cause the cursor to point beyond the bottom of the container. """ if height <= self.remaining_height: self._self_cursor.grow(height) elif ignore_overflow: self._self_cursor.grow(float(self.remaining_height)) else: return False return True def check_overflow(self): if self.remaining_height < 0: raise ReflowRequired def render(self, type, rerender=False): if type in (self.type, None): self._render(type, rerender) def _render(self, type, rerender): raise NotImplementedError('{}.render()'.format(self.__class__.__name__)) def register_styled(self, styled, continued=False): styleds = self._placed_styleds.setdefault(len(self.children), []) styleds.append((styled, continued)) def before_placing(self): def log_styleds(index): for styled, continued in self._placed_styleds.get(index, ()): self.document.style_log.log_styled(styled, self, continued) styled.before_placing(self) log_styleds(0) for i, child in enumerate(self.children, start=1): child.before_placing() log_styleds(i) class _FlowablesContainer(FlowableTarget, FlowablesContainerBase): def __init__(self, name, type, parent, *args, **kwargs): super().__init__(parent.document_part, name, type, parent, *args, **kwargs) def _render(self, type, rerender): self.flowables.flow(self, last_descender=None) class FlowablesContainer(_FlowablesContainer): """A container that renders a predefined series of flowables.""" def __init__(self, name, type, parent, left=None, top=None, width=None, height=None, right=None, bottom=None): super().__init__(name, type, parent, left=left, top=top, width=width, height=height, right=right, bottom=bottom) class ChainedContainer(FlowablesContainerBase): """A container that renders flowables from the :class:`Chain` it is part of.""" def __init__(self, name, type, parent, chain, left=None, top=None, width=None, height=None, right=None, bottom=None): super().__init__(name, type, parent, left=left, top=top, width=width, height=height, right=right, bottom=bottom) chain.containers.append(self) self.chain = chain def _render(self, type, rerender): self.chain.render(self, rerender=rerender) class ExpandingContainerBase(FlowablesContainerBase): """A dynamically, vertically growing :class:`Container`.""" def __init__(self, name, type, parent, left=None, top=None, width=None, right=None, bottom=None, max_height=None): """See :class:`ContainerBase` for information on the `parent`, `left`, `width` and `right` parameters. `max_height` is the maximum height this container can grow to.""" height = DimensionAddition() super().__init__(name, type, parent, left=left, top=top, width=width, height=height, right=right, bottom=bottom) self.height.addends.append(self._cursor) self.max_height = max_height or float('+inf') @property def remaining_height(self): return self.max_height - self.cursor class DownExpandingContainerBase(ExpandingContainerBase): """A container that is anchored at the top and expands downwards.""" def __init__(self, name, type, parent, left=None, top=None, width=None, right=None, max_height=None): """See :class:`Container` for information on the `name`, `parent`, `left`, `width` and `right` parameters. `top` specifies the location of the container's top edge with respect to that of the parent container. When `top` is omitted, the top edge is placed at the top edge of the parent container. `max_height` is the maximum height this container can grow to.""" super().__init__(name, type, parent, left=left, top=top, width=width, right=right, max_height=max_height) class DownExpandingContainer(_FlowablesContainer, ExpandingContainerBase): def __init__(self, name, type, parent, left=None, top=None, width=None, right=None, max_height=None): super().__init__(name, type, parent, left=left, top=top, width=width, right=right, max_height=max_height) class ConditionalDownExpandingContainerBase(DownExpandingContainerBase): def __init__(self, name, type, parent, left=None, top=None, width=None, right=None, max_height=None, place=True): super().__init__(name, type, parent, left=left, top=top, width=width, right=right, max_height=max_height) self._do_place = place def do_place(self, place=True): self._do_place = place def place(self): if self._do_place: super().place() def before_placing(self): if self._do_place: super().before_placing() class InlineDownExpandingContainer(ConditionalDownExpandingContainerBase): """A :class:`DownExpandingContainer` whose top edge is placed at the parent's current cursor position. As flowables are flowed in this container, the parent's cursor also advances (but this behavior can be suppressed). See :class:`Container` about the `name`, `parent`, `left`, `width` and `right` parameters. Setting `advance_parent` to `False` prevents the parent container's cursor being advanced. """ def __init__(self, name, parent, left=None, width=None, right=None, advance_parent=True, place=True): super().__init__(name, None, parent, left=left, top=parent.cursor, width=width, right=right, max_height=parent.remaining_height, place=place) if advance_parent: parent._cursor.addends.append(self._cursor) class UpExpandingContainer(_FlowablesContainer, ExpandingContainerBase): """A container that is anchored at the bottom and expands upwards.""" def __init__(self, name, type, parent, left=None, bottom=None, width=None, right=None, max_height=None): """See :class:`ContainerBase` for information on the `name`, `parent`, `left`, `width` and `right` parameters. `bottom` specifies the location of the container's bottom edge with respect to that of the parent container. When `bottom` is omitted, the bottom edge is placed at the bottom edge of the parent container. `max_height` is the maximum height this container can grow to.""" bottom = bottom or parent.height super().__init__(name, type, parent, left=left, top=None, width=width, right=right, bottom=bottom, max_height=max_height) class _MaybeContainer(InlineDownExpandingContainer): def __init__(self, parent, left=None, width=None, right=None): super().__init__('MAYBE', parent, left=left, width=width, right=right, place=False) class MaybeContainer(ContextManager): def __init__(self, parent, left=None, width=None, right=None): self._container = _MaybeContainer(parent, left, width, right) def __enter__(self): return self._container def __exit__(self, exc_type, exc_value, _): if (exc_type is None or (issubclass(exc_type, (EndOfContainer, PageBreakException)) and not exc_value.flowable_state.initial)): self._container.do_place() @contextmanager def discard_state(initial_state): saved_state = copy(initial_state) try: yield except EndOfContainer: raise EndOfContainer(saved_state) class VirtualContainer(ConditionalDownExpandingContainerBase): """An infinitely down-expanding container whose contents are not automatically placed on the parent container's canvas. This container's content needs to be placed explicitly using :meth:`place_at`.""" register_with_parent = False def __init__(self, parent, width=None): """`width` specifies the width of the container.""" super().__init__('VIRTUAL', None, parent, width=width, max_height=float('+inf'), place=False) def place_at(self, parent_container, left, top): self.parent = parent_container parent_container.children.append(self) self.left = left self.top = top self.do_place() class FloatContainer(ExpandingContainerBase): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) class TopFloatContainer(DownExpandingContainer, FloatContainer): pass class BottomFloatContainer(UpExpandingContainer, FloatContainer): pass class FootnoteContainer(UpExpandingContainer): def __init__(self, name, parent, left=None, bottom=None, width=None, right=None, max_height=None): super().__init__(name, CONTENT, parent, left, bottom, width=width, right=right, max_height=max_height) self._footnote_number = 0 self._footnote_space = self self.footnote_queue = deque() self._flowing_footnotes = False self._reflowed = False self._descenders = [0] def add_footnote(self, footnote): self.footnote_queue.append(footnote) if not self._flowing_footnotes: self._flowing_footnotes = True try: self.flow_footnotes() finally: self._flowing_footnotes = False def flow_footnotes(self): if self._reflowed: self._cursor.addends.pop() self._descenders.pop() while self.footnote_queue: footnote = self.footnote_queue.popleft() footnote_id = footnote.get_id(self.document) if footnote_id not in self.document.placed_footnotes: with MaybeContainer(self) as maybe_container: _, _, descender = footnote.flow(maybe_container, self._descenders[-1]) self._descenders.append(descender) self._reflowed = True self.page.check_overflow() self._reflowed = False self.document.placed_footnotes.add(footnote_id) @property def next_number(self): self._footnote_number += 1 return self._footnote_number class Chain(FlowableTarget): """A :class:`FlowableTarget` that renders its flowables to a series of containers. Once a container is filled, the chain starts flowing flowables into the next container.""" def __init__(self, document_part): """Initialize this chain. `document` is the :class:`Document` this chain is part of.""" super().__init__(document_part) self.document_part = document_part self._init_state() self.containers = [] self.done = True def _init_state(self): """Reset the state of this chain: empty the list of containers, and zero the counter keeping track of which flowable needs to be rendered next. """ self._state = self._fresh_page_state = None self._rerendering = False @property def last_container(self): return self.containers[-1] def render(self, container, rerender=False): """Flow the flowables into the containers that have been added to this chain.""" if rerender: container.clear() if not self._rerendering: # restore saved state on this chain's 1st container on this page self._state = copy(self._fresh_page_state) self._rerendering = True try: self.done = False self.flowables.flow(container, last_descender=None, state=self._state) # all flowables have been rendered if container == self.last_container: self._init_state() # reset state for the next rendering loop self.done = True except PageBreakException as exc: self._state = exc.flowable_state self._fresh_page_state = copy(self._state) raise except EndOfContainer as e: self._state = e.flowable_state if container == self.last_container: # save state for when ReflowRequired occurs self._fresh_page_state = copy(self._state) except ReflowRequired: self._rerendering = False raise
/rinohtype-reloaded-0.3.3.tar.gz/rinohtype-reloaded-0.3.3/src/rinoh/layout.py
0.847242
0.467089
layout.py
pypi
from copy import copy from itertools import chain, tee from token import NAME from .attribute import Attribute, OptionSet, Bool, OverrideDefault from .color import Color from .dimension import Dimension, PT, DimensionBase from .draw import ShapeStyle, Rectangle, Line, LineStyle, Stroke from .layout import (InlineDownExpandingContainer, VirtualContainer, MaybeContainer, ContainerOverflow, EndOfContainer, PageBreakException) from .style import Styled, Style from .text import StyledText from .util import ReadAliasAttribute __all__ = ['Flowable', 'FlowableStyle', 'FlowableWidth', 'DummyFlowable', 'AnchorFlowable', 'WarnFlowable', 'SetMetadataFlowable', 'AddToFrontMatter', 'GroupedFlowables', 'StaticGroupedFlowables', 'LabeledFlowable', 'GroupedLabeledFlowables', 'Float', 'PageBreak', 'PageBreakStyle', 'Break'] class FlowableWidth(OptionSet): values = ('auto', 'fill') @classmethod def check_type(cls, value): return Dimension.check_type(value) or super().check_type(value) @classmethod def from_tokens(cls, tokens): if tokens.next.type == NAME: return super().from_tokens(tokens) else: return Dimension.from_tokens(tokens) class HorizontalAlignment(OptionSet): values = 'left', 'right', 'center' class FlowableStyle(Style): width = Attribute(FlowableWidth, 'auto', 'Width to render the flowable at') horizontal_align = Attribute(HorizontalAlignment, 'left', 'Horizontal alignment of the flowable') space_above = Attribute(Dimension, 0, 'Vertical space preceding the ' 'flowable') space_below = Attribute(Dimension, 0, 'Vertical space following the ' 'flowable') margin_left = Attribute(Dimension, 0, 'Left margin') margin_right = Attribute(Dimension, 0, 'Right margin') padding = Attribute(Dimension, 0, 'Padding') padding_left = Attribute(Dimension, 0, 'Left padding') padding_right = Attribute(Dimension, 0, 'Right padding') padding_top = Attribute(Dimension, 0, 'Top padding') padding_bottom = Attribute(Dimension, 0, 'Bottom padding') keep_with_next = Attribute(Bool, False, 'Keep this flowable and the next ' 'on the same page') border = Attribute(Stroke, None, 'Border surrounding the flowable') border_left = Attribute(Stroke, None, 'Border left of the flowable') border_right = Attribute(Stroke, None, 'Border right of the flowable') border_top = Attribute(Stroke, None, 'Border above the flowable') border_bottom = Attribute(Stroke, None, 'Border below the flowable') background_color = Attribute(Color, None, "Color of the area within the " "flowable's borders") hide = Attribute(Bool, False, 'Suppress rendering the flowable') default_base = None class FlowableState(object): """Stores a flowable's rendering state, which can be copied. This enables saving the rendering state at certain points in the rendering process, so rendering can later be resumed at those points, if needed. """ def __init__(self, flowable, _initial=True): self.flowable = flowable self.initial = _initial def __copy__(self): return self.__class__(self.flowable, _initial=self.initial) class Flowable(Styled): """A document element that can be "flowed" into a container on the page. A flowable can adapt to the width of the container, or it can horizontally align itself in the container (see :class:`HorizontallyAlignedFlowable`). Args: align (HorizontalAlignment): horizontal alignment of the flowable width (DimensionBase or None): the width of the table. If ``None``, the width of the flowable is automatically determined. """ style_class = FlowableStyle def __init__(self, align=None, width=None, id=None, style=None, parent=None): """Initialize this flowable and associate it with the given `style` and `parent` (see :class:`Styled`).""" super().__init__(id=id, style=style, parent=parent) self.annotation = None self.align = align self.width = width @property def level(self): try: return self.parent.level except AttributeError: return 0 @property def section(self): try: return self.parent.section except AttributeError: return None def is_hidden(self, container): return self.get_style('hide', container) def initial_state(self, container): return FlowableState(self) def mark_page_nonempty(self, container): if not self.get_style('keep_with_next', container): container.mark_page_nonempty() def _width(self, container): return self.width or self.get_style('width', container) def _align(self, container, bordered_width): align = self.align or self.get_style('horizontal_align', container) if align == HorizontalAlignment.LEFT: return if self._width(container) == FlowableWidth.FILL: self.warn("horizontal_align has no effect on flowables for which " "width is set to 'full'", container) return if align == HorizontalAlignment.CENTER: offset = float(container.width - bordered_width) / 2 elif align == HorizontalAlignment.RIGHT: offset = float(container.width - bordered_width) container.left += offset def flow(self, container, last_descender, state=None, **kwargs): """Flow this flowable into `container` and return the vertical space consumed. The flowable's contents is preceded by a vertical space with a height as specified in its style's `space_above` attribute. Similarly, the flowed content is followed by a vertical space with a height given by the `space_below` style attribute.""" top_to_baseline = 0 state = state or self.initial_state(container) if state.initial: space_above = self.get_style('space_above', container) if not container.advance2(float(space_above)): raise EndOfContainer(state) top_to_baseline += float(space_above) margin_left = self.get_style('margin_left', container) margin_right = self.get_style('margin_right', container) reference_id = self.get_id(container.document, create=False) right = container.width - margin_right container.register_styled(self, continued=not state.initial) margin_container = InlineDownExpandingContainer('MARGIN', container, left=margin_left, right=right) initial_before = state.initial state, width, inner_top_to_baseline, descender = \ self.flow_inner(margin_container, last_descender, state=state, **kwargs) self._align(margin_container, width) initial_after = state is not None and state.initial top_to_baseline += inner_top_to_baseline if self.annotation: height = float(margin_container.height) margin_container.canvas.annotate(self.annotation, 0, 0, width, height) self.mark_page_nonempty(container) if initial_before and not initial_after: if reference_id: self.create_destination(margin_container, True) if state is not None: raise EndOfContainer(state) space_below = self.get_style('space_below', container) container.advance2(float(space_below), ignore_overflow=True) container.document.progress(self, container) return margin_left + width + margin_right, top_to_baseline, descender def flow_inner(self, container, descender, state=None, **kwargs): def border_width(attribute): border = self.get_style(attribute, container) return border.width if border else 0 draw_top = state.initial width = self._width(container) padding = self.get_style('padding', container) padding_top = self.get_style('padding_top', container) or padding padding_left = self.get_style('padding_left', container) or padding padding_right = self.get_style('padding_right', container) or padding padding_bottom = self.get_style('padding_bottom', container) or padding padding_h = padding_left + padding_right border = border_width('border') border_left = border_width('border_left') or border border_right = border_width('border_right') or border border_top = border_width('border_top') or border border_bottom = border_width('border_bottom') or border border_h = border_left + border_right left = padding_left + border_left right = container.width - padding_right - border_right space_below = float(padding_bottom + border_bottom) if draw_top: if not container.advance2(padding_top + border_top): return state, 0, 0, descender pad_cntnr = InlineDownExpandingContainer('PADDING', container, left=left, right=right) try: content_width, first_line_ascender, descender = \ self.render(pad_cntnr, descender, state=state, space_below=space_below, **kwargs) state = None assert container.advance2(space_below) except EndOfContainer as eoc: state = eoc.flowable_state first_line_ascender = 0 try: content_width = state.width except AttributeError: content_width = pad_cntnr.width padded_width = content_width + padding_h bordered_width = padded_width + border_h if isinstance(width, DimensionBase) or width == FlowableWidth.AUTO: frame_width = bordered_width else: assert width == FlowableWidth.FILL frame_width = container.width if state is None or not state.initial: self.render_frame(container, frame_width, container.height, top=draw_top, bottom=state is None) top_to_baseline = border_top + padding_top + first_line_ascender return state, bordered_width, top_to_baseline, descender def render_frame(self, container, width, height, top=True, bottom=True): width, height = float(width), - float(height) border = self.get_style('border', container) border_left = self.get_style('border_left', container) or border border_right = self.get_style('border_right', container) or border border_top = self.get_style('border_top', container) or border border_bottom = self.get_style('border_bottom', container) or border background_color = self.get_style('background_color', container) fill_style = ShapeStyle(stroke=None, fill_color=background_color) rect = Rectangle((0, 0), width, height, style=fill_style, parent=self) rect.render(container) def offset_border(coord, stroke, corr_x, corr_y): return (coord + corr * float(stroke.width) / 2 for (coord, corr) in zip(coord, (corr_x, corr_y))) def render_border(start, end, stroke, corr_x, corr_y): if stroke is None: return Line(offset_border(start, stroke, corr_x, corr_y), offset_border(end, stroke, corr_x, corr_y), style=LineStyle(stroke=stroke)).render(container) if top: render_border((0, 0), (width, 0), border_top, 0, -1) render_border((0, 0), (0, height), border_left, 1, 0) render_border((width, 0), (width, height), border_right, -1, 0) if bottom: render_border((0, height), (width, height), border_bottom, 0, 1) def render(self, container, descender, state, space_below=0, **kwargs): """Renders the flowable's content to `container`, with the flowable's top edge lining up with the container's cursor. `descender` is the descender height of the preceding line or `None`.""" raise NotImplementedError # flowables that do not render anything (but with optional side-effects) class DummyFlowable(Flowable): """A flowable that does not directly place anything on the page. Subclasses can produce side-effects to affect the output in another way. """ style_class = None def __init__(self, id=None, parent=None): super().__init__(id=id, parent=parent) def get_style(self, attribute, flowable_target): if attribute == 'keep_with_next': return True elif attribute == 'hide': return False raise TypeError def flow(self, container, last_descender, state=None, **kwargs): return 0, 0, last_descender class AnchorFlowable(DummyFlowable): """A dummy flowable that registers a destination anchor. Places a destination for the flowable's ID at the current cursor position. """ def flow(self, container, last_descender, state=None, **kwargs): self.create_destination(container, True) return super().flow(container, last_descender, state=state, **kwargs) class WarnFlowable(DummyFlowable): """A dummy flowable that emits a warning during the rendering stage. Args: message (str): the warning message to emit """ def __init__(self, message, parent=None): super().__init__(parent=parent) self.message = message def flow(self, container, last_descender, state=None, **kwargs): self.warn(self.message, container) return super().flow(container, last_descender, state) class SetMetadataFlowable(DummyFlowable): """A dummy flowable that stores metadata in the document. The metadata is passed as keyword arguments. It will be available to other flowables during the rendering stage. """ def __init__(self, parent=None, **metadata): super().__init__(parent=parent) self.metadata = metadata def build_document(self, flowable_target): flowable_target.document.metadata.update(self.metadata) class AddToFrontMatter(DummyFlowable): def __init__(self, flowables, parent=None): super().__init__(parent=parent) self.flowables = flowables def build_document(self, flowable_target): flowable_target.document.front_matter.append(self.flowables) # grouping flowables class GroupedFlowablesState(FlowableState): def __init__(self, groupedflowables, flowables, first_flowable_state=None, _initial=True): super().__init__(groupedflowables, _initial) self.flowables = flowables self.first_flowable_state = first_flowable_state groupedflowables = ReadAliasAttribute('flowable') def __copy__(self): copy_flowables, self.flowables = tee(self.flowables) copy_first_flowable_state = copy(self.first_flowable_state) return self.__class__(self.groupedflowables, copy_flowables, copy_first_flowable_state, _initial=self.initial) def next_flowable(self): return next(self.flowables) def prepend(self, first_flowable_state): first_flowable = first_flowable_state.flowable self.flowables = chain((first_flowable, ), self.flowables) if first_flowable_state: self.first_flowable_state = first_flowable_state self.initial = self.initial and first_flowable_state.initial class GroupedFlowablesStyle(FlowableStyle): width = OverrideDefault('fill') title = Attribute(StyledText, None, 'Title to precede the flowables') flowable_spacing = Attribute(Dimension, 0, 'Spacing between flowables') class GroupedFlowables(Flowable): """Groups a list of flowables and renders them one below the other. Makes sure that a flowable for which `keep_with_next` is enabled is not seperated from the flowable that follows it. Subclasses should implement :meth:`flowables`. """ style_class = GroupedFlowablesStyle def flowables(self, container): """Generator yielding the :class:`Flowable`\ s to group""" raise NotImplementedError def initial_state(self, container): flowables_iter = self.flowables(container) title_text = self.get_style('title', container) if title_text: title = Paragraph(title_text, style='title') flowables_iter = chain((title, ), flowables_iter) return GroupedFlowablesState(self, flowables_iter) def mark_page_nonempty(self, container): pass # only the children place content on the page def render(self, container, descender, state, first_line_only=False, space_below=0, **kwargs): max_flowable_width = 0 first_top_to_baseline = None item_spacing = self.get_style('flowable_spacing', container) saved_state = copy(state) try: while True: # TODO: consider space_below for the last flowable width, top_to_baseline, descender = \ self._flow_with_next(state, container, descender, first_line_only=first_line_only, **kwargs) if first_top_to_baseline is None: first_top_to_baseline = top_to_baseline max_flowable_width = max(max_flowable_width, width) if first_line_only: break saved_state = copy(state) container.advance2(item_spacing, ignore_overflow=True) except LastFlowableException as exc: descender = exc.last_descender except KeepWithNextException: raise EndOfContainer(saved_state) except (EndOfContainer, PageBreakException) as exc: state.prepend(exc.flowable_state) exc.flowable_state = state raise exc return max_flowable_width, first_top_to_baseline or 0, descender def _flow_with_next(self, state, container, descender, **kwargs): try: flowable = state.next_flowable() while flowable.is_hidden(container): flowable = state.next_flowable() except StopIteration: raise LastFlowableException(descender) flowable.parent = self with MaybeContainer(container) as maybe_container: max_flowable_width, top_to_baseline, descender = \ flowable.flow(maybe_container, descender, state=state.first_flowable_state, **kwargs) state.initial = False state.first_flowable_state = None if flowable.get_style('keep_with_next', container): item_spacing = self.get_style('flowable_spacing', container) maybe_container.advance(item_spacing) try: width, _, descender = self._flow_with_next(state, container, descender, **kwargs) except EndOfContainer as eoc: if eoc.flowable_state.initial: maybe_container.do_place(False) raise KeepWithNextException else: raise eoc max_flowable_width = max(max_flowable_width, width) return max_flowable_width, top_to_baseline, descender class KeepWithNextException(Exception): pass class LastFlowableException(Exception): def __init__(self, last_descender): self.last_descender = last_descender class StaticGroupedFlowables(GroupedFlowables): """Groups a static list of flowables. Args: flowables (iterable[Flowable]): the flowables to group """ def __init__(self, flowables, id=None, style=None, parent=None): super().__init__(id=id, style=style, parent=parent) self.children = [] for flowable in flowables: self.append(flowable) @property def elements(self): for child in self.children: for element in child.elements: yield element def append(self, flowable): flowable.parent = self self.children.append(flowable) def flowables(self, container): return iter(self.children) def build_document(self, flowable_target): super().build_document(flowable_target) for flowable in self.flowables(flowable_target): flowable.build_document(flowable_target) def prepare(self, flowable_target): super().prepare(flowable_target) for flowable in self.flowables(flowable_target): flowable.parent = self flowable.prepare(flowable_target) class LabeledFlowableStyle(FlowableStyle): label_min_width = Attribute(Dimension, 12*PT, 'Minimum label width') label_max_width = Attribute(Dimension, 80*PT, 'Maximum label width') label_spacing = Attribute(Dimension, 3*PT, 'Spacing between a label and ' 'the labeled flowable') align_baselines = Attribute(Bool, True, 'Line up the baselines of the ' 'label and the labeled flowable') wrap_label = Attribute(Bool, False, 'Wrap the label at `label_max_width`') class LabeledFlowableState(FlowableState): def __init__(self, flowable, content_flowable_state, _initial=True): super().__init__(flowable, _initial=_initial) self.content_flowable_state = content_flowable_state def update(self, content_flowable_state=None): if content_flowable_state: self.content_flowable_state = content_flowable_state self.initial = self.initial and self.content_flowable_state.initial def __copy__(self): return self.__class__(self.flowable, copy(self.content_flowable_state), _initial=self.initial) class LabeledFlowable(Flowable): """A flowable with a label. The flowable and the label are rendered side-by-side. If the label exceeds the `label_max_width` style attribute value, the flowable is rendered below the label. Args: label (Flowable): the label for the flowable flowable (Flowable): the flowable to label """ style_class = LabeledFlowableStyle def __init__(self, label, flowable, id=None, style=None, parent=None): super().__init__(id=id, style=style, parent=parent) self.label = label self.flowable = flowable label.parent = flowable.parent = self def prepare(self, flowable_target): super().prepare(flowable_target) self.label.prepare(flowable_target) self.flowable.prepare(flowable_target) def label_width(self, container): label_max_width = self.get_style('label_max_width', container) virtual_container = VirtualContainer(container) label_width, _, _ = self.label.flow(virtual_container, 0) spillover = (label_width > label_max_width.to_points(container.width) if label_max_width else True) return label_width, spillover def initial_state(self, container): initial_content_state = self.flowable.initial_state(container) return LabeledFlowableState(self, initial_content_state) def render(self, container, last_descender, state, label_column_width=None, **kwargs): def style(name): return self.get_style(name, container) label_min_width = style('label_min_width').to_points(container.width) label_max_width = style('label_max_width') if label_max_width: label_max_width = label_max_width.to_points(container.width) label_spacing = style('label_spacing') wrap_label = style('wrap_label') align_baselines = style('align_baselines') free_label_width, _ = self.label_width(container) label_spillover = False if label_column_width: # part of a GroupedLabeledFlowables label_width = label_column_width elif free_label_width < label_min_width: label_width = label_min_width elif label_max_width and free_label_width <= label_max_width: label_width = free_label_width else: label_width = label_min_width if not label_max_width: label_spillover = True elif free_label_width > label_width: if wrap_label: vcontainer = VirtualContainer(container, width=label_max_width) wrapped_width, _, _ = self.label.flow(vcontainer, 0) if wrapped_width < label_max_width: label_width = wrapped_width else: label_width = label_min_width label_spillover = True else: label_spillover = True left = label_width + label_spacing label_cntnr_width = None if label_spillover else label_width if align_baselines and (state.initial and not label_spillover): label_baseline = find_baseline(self.label, container, last_descender, width=label_cntnr_width) content_state_copy = copy(state.content_flowable_state) content_baseline = find_baseline(self.flowable, container, last_descender, left=left, state=content_state_copy) else: label_baseline = content_baseline = 0 top_to_baseline = max(label_baseline, content_baseline) offset_label = top_to_baseline - label_baseline offset_content = top_to_baseline - content_baseline rendering_content = False try: with MaybeContainer(container) as maybe_container: if state.initial: label_container = \ InlineDownExpandingContainer('LABEL', maybe_container, width=label_cntnr_width, advance_parent=False) label_container.advance(offset_label) _, _, label_descender = self.label.flow(label_container, last_descender) label_height = label_container.height if label_spillover: maybe_container.advance(label_height) last_descender = label_descender else: label_height = label_descender = 0 maybe_container.advance(offset_content) rendering_content = True content_container = \ InlineDownExpandingContainer('CONTENT', maybe_container, left=left, advance_parent=False) width, _, content_descender \ = self.flowable.flow(content_container, last_descender, state=state.content_flowable_state) content_height = content_container.cursor except (ContainerOverflow, EndOfContainer) as eoc: if isinstance(eoc, ContainerOverflow): content_state = None else: content_state = eoc.flowable_state if rendering_content else None state.update(content_state) raise EndOfContainer(state) if label_spillover or content_height > label_height: container.advance(content_height) descender = content_descender else: container.advance(label_height) descender = label_descender return left + width, label_baseline, descender def find_baseline(flowable, container, last_descender, state=None, **kwargs): virtual_container = VirtualContainer(container) inline_ctnr = InlineDownExpandingContainer('DUMMY', virtual_container, advance_parent=False) _, baseline, _ = flowable.flow(inline_ctnr, last_descender, state=state, first_line_only=True) return baseline class GroupedLabeledFlowables(GroupedFlowables): """Groups a list of labeled flowables, lining them up. """ def _calculate_label_width(self, container): max_width = 0 for flowable in self.flowables(container): width, splillover = flowable.label_width(container) if not splillover: max_width = max(max_width, width) return max_width def render(self, container, descender, state, **kwargs): if state.initial: max_label_width = self._calculate_label_width(container) else: max_label_width = state.max_label_width try: return super().render(container, descender, state=state, label_column_width=max_label_width) except EndOfContainer as eoc: eoc.flowable_state.max_label_width = max_label_width raise class FloatStyle(FlowableStyle): float = Attribute(Bool, False, 'Float the flowable to the top or bottom ' 'of the page') class Float(Flowable): """A flowable that can optionally be placed elsewhere on the page. If this flowable's `float` style attribute is set to ``True``, it is not flowed in line with the surrounding flowables, but it is instead flowed into another container pointed to by the former's :attr:`Container.float_space` attribute. This is typically used to place figures and tables at the top or bottom of a page, instead of in between paragraphs. """ def flow(self, container, last_descender, state=None, **kwargs): if self.get_style('float', container): id = self.get_id(container.document) if id not in container.document.floats: super().flow(container.float_space, None) container.document.floats.add(id) container.page.check_overflow() return 0, 0, last_descender else: return super().flow(container, last_descender, state=state, **kwargs) class Break(OptionSet): values = None, 'any', 'left', 'right' class PageBreakStyle(FlowableStyle): page_break = Attribute(Break, None, 'Type of page break to insert ' 'before rendering this flowable') class PageBreak(Flowable): """A flowable that optionally triggers a page break before rendering. If this flowable's `page_break` style attribute is not ``None``, it breaks to the page of the type indicated by `page_break` before starting rendering. """ style_class = PageBreakStyle exception_class = PageBreakException def flow(self, container, last_descender, state=None, **kwargs): state = state or self.initial_state(container) page_number = container.page.number this_page_type = 'left' if page_number % 2 == 0 else 'right' page_break = self.get_style('page_break', container) if state.initial and page_break: if not (container.page._empty and page_break in (Break.ANY, this_page_type)): if page_break == Break.ANY: page_break = 'left' if page_number % 2 else 'right' chain = container.top_level_container.chain raise self.exception_class(page_break, chain, state) return super().flow(container, last_descender, state) def render(self, container, descender, state, **kwargs): return 0, 0, descender from .paragraph import Paragraph
/rinohtype-reloaded-0.3.3.tar.gz/rinohtype-reloaded-0.3.3/src/rinoh/flowable.py
0.866458
0.303971
flowable.py
pypi
from .attribute import Attribute, Bool from .flowable import GroupedFlowables, GroupedFlowablesStyle, DummyFlowable from .paragraph import Paragraph from .reference import Reference from .strings import StringField from .structure import Section, Heading, SectionTitles from .style import Styled from .text import MixedStyledText, StyledText from .util import intersperse __all__ = ['IndexSection', 'Index', 'IndexStyle', 'IndexLabel', 'IndexTerm', 'InlineIndexTarget', 'IndexTarget'] class IndexSection(Section): def __init__(self, title=None, flowables=None, style=None): section_title = title or StringField(SectionTitles, 'index') contents = [Heading(section_title, style='unnumbered')] if flowables: contents += list(flowables) else: contents.append(Index()) super().__init__(contents, style=style) class IndexStyle(GroupedFlowablesStyle): initials = Attribute(Bool, True, 'Group index entries based on their ' 'first letter') class Index(GroupedFlowables): style_class = IndexStyle location = 'index' def __init__(self, id=None, style=None, parent=None): super().__init__(id=id, style=style, parent=parent) self.source = self def flowables(self, container): initials = self.get_style('initials', container) def hande_level(index_entries, level=1): top_level = level == 1 entries = sorted((name for name in index_entries if name), key=lambda s: (s.lower(), s)) last_section = None for entry in entries: first = entry[0] section = first.upper() if first.isalpha() else 'Symbols' term, subentries = index_entries[entry] if initials and top_level and section != last_section: yield IndexLabel(section) last_section = section target_ids = [target.get_id(document) for term, target in subentries.get(None, ())] yield IndexEntry(term, level, target_ids) for paragraph in hande_level(subentries, level=level + 1): yield paragraph document = container.document index_entries = container.document.index_entries for paragraph in hande_level(index_entries): yield paragraph class IndexLabel(Paragraph): pass class IndexEntry(Paragraph): def __init__(self, text_or_items, level, target_ids=None, id=None, style=None, parent=None): if target_ids: refs = intersperse((Reference(id, 'page') for id in target_ids), ', ') entry_text = text_or_items + ', ' + MixedStyledText(refs) else: entry_text = text_or_items super().__init__(entry_text, id=id, style=style, parent=parent) self.index_level = level class IndexTerm(tuple): def __new__(cls, *levels): return super().__new__(cls, levels) def __repr__(self): return type(self).__name__ + super().__repr__() class IndexTargetBase(Styled): def __init__(self, index_terms, *args, **kwargs): super().__init__(*args, **kwargs) self.index_terms = index_terms def prepare(self, flowable_target): super().prepare(flowable_target) index_entries = flowable_target.document.index_entries for index_term in self.index_terms: level_entries = index_entries for term in index_term: term_str = (term.to_string(flowable_target) if isinstance(term, StyledText) else term) _, level_entries = level_entries.setdefault(term_str, (term, {})) level_entries.setdefault(None, []).append((index_term, self)) class InlineIndexTarget(IndexTargetBase, StyledText): def to_string(self, flowable_target): return '' def spans(self, container): self.create_destination(container) return iter([]) class IndexTarget(IndexTargetBase, DummyFlowable): category = 'Index' def __init__(self, index_terms, parent=None): super().__init__(index_terms, parent=parent) def flow(self, container, last_descender, state=None, **kwargs): self.create_destination(container) return super().flow(container, last_descender, state=state)
/rinohtype-reloaded-0.3.3.tar.gz/rinohtype-reloaded-0.3.3/src/rinoh/index.py
0.602296
0.219693
index.py
pypi
import os import re import struct from binascii import unhexlify from io import BytesIO from warnings import warn from . import Font, GlyphMetrics, LeafGetter, MissingGlyphException from .mapping import UNICODE_TO_GLYPH_NAME, ENCODINGS from ..font.style import FontVariant from ..util import cached from ..warnings import RinohWarning def string(string): return string.strip() def number(string): try: number = int(string) except ValueError: number = float(string) return number def boolean(string): return string.strip() == 'true' class AdobeFontMetricsParser(dict): SECTIONS = {'FontMetrics': string, 'CharMetrics': int} KEYWORDS = {'FontName': string, 'FullName': string, 'FamilyName': string, 'Weight': string, 'FontBBox': (number, number, number, number), 'Version': string, 'Notice': string, 'EncodingScheme': string, 'MappingScheme': int, 'EscChar': int, 'CharacterSet': string, 'Characters': int, 'IsBaseFont': boolean, 'VVector': (number, number), 'IsFixedV': boolean, 'CapHeight': number, 'XHeight': number, 'Ascender': number, 'Descender': number, 'StdHW': number, 'StdVW': number, 'UnderlinePosition': number, 'UnderlineThickness': number, 'ItalicAngle': number, 'CharWidth': (number, number), 'IsFixedPitch': boolean} HEX_NUMBER = re.compile(r'<([\da-f]+)>', re.I) def __init__(self, file): self._glyphs = {} self._ligatures = {} self._kerning_pairs = {} sections, section = [self], self section_names = [None] for line in file.readlines(): try: key, values = line.split(None, 1) except ValueError: key, values = line.strip(), [] if not key: continue if key == 'Comment': pass elif key.startswith('Start'): section_name = key[5:] section_names.append(section_name) section[section_name] = {} section = section[section_name] sections.append(section) elif key.startswith('End'): assert key[3:] == section_names.pop() sections.pop() section = sections[-1] elif section_names[-1] == 'CharMetrics': glyph_metrics = self._parse_character_metrics(line) self._glyphs[glyph_metrics.name] = glyph_metrics elif section_names[-1] == 'KernPairs': tokens = line.split() if tokens[0] == 'KPX': pair, kerning = (tokens[1], tokens[2]), tokens[-1] self._kerning_pairs[pair] = number(kerning) else: raise NotImplementedError elif section_names[-1] == 'Composites': warn('Composites in Type1 fonts are currently not supported.' '({})'.format(self.filename) if self.filename else '') elif key == chr(26): # EOF marker assert not file.read() else: funcs = self.KEYWORDS[key] try: values = [func(val) for func, val in zip(funcs, values.split())] except TypeError: values = funcs(values) section[key] = values def _parse_character_metrics(self, line): ligatures = {} for item in line.strip().split(';'): if not item: continue tokens = item.split() key = tokens[0] if key == 'C': code = int(tokens[1]) elif key == 'CH': code = int(self.HEX_NUMBER.match(tokens[1]).group(1), base=16) elif key in ('WX', 'W0X'): width = number(tokens[1]) elif key in ('WY', 'W0Y'): height = number(tokens[1]) elif key in ('W', 'W0'): width, height = number(tokens[1]), number(tokens[2]) elif key == 'N': name = tokens[1] elif key == 'B': bbox = tuple(number(num) for num in tokens[1:]) elif key == 'L': ligatures[tokens[1]] = tokens[2] else: raise NotImplementedError if ligatures: self._ligatures[name] = ligatures return GlyphMetrics(name, width, bbox, code) class AdobeFontMetrics(Font, AdobeFontMetricsParser): units_per_em = 1000 # encoding is set in __init__ name = LeafGetter('FontMetrics', 'FontName') bounding_box = LeafGetter('FontMetrics', 'FontBBox') fixed_pitch = LeafGetter('FontMetrics', 'IsFixedPitch') italic_angle = LeafGetter('FontMetrics', 'ItalicAngle') ascender = LeafGetter('FontMetrics', 'Ascender', default=750) descender = LeafGetter('FontMetrics', 'Descender', default=-250) line_gap = 200 cap_height = LeafGetter('FontMetrics', 'CapHeight', default=700) x_height = LeafGetter('FontMetrics', 'XHeight', default=500) stem_v = LeafGetter('FontMetrics', 'StdVW', default=50) def __init__(self, file_or_filename, weight='medium', slant='upright', width='normal', unicode_mapping=None): try: filename = file_or_filename file = open(file_or_filename, 'rt', encoding='ascii') close_file = True except TypeError: filename = None file = file_or_filename close_file = False self._suffixes = {FontVariant.NORMAL: ''} self._unicode_mapping = unicode_mapping AdobeFontMetricsParser.__init__(self, file) if close_file: file.close() if self.encoding_scheme == 'FontSpecific': self.encoding = {glyph.name: glyph.code for glyph in self._glyphs.values() if glyph.code > -1} else: self.encoding = ENCODINGS[self.encoding_scheme] super().__init__(filename, weight, slant, width) encoding_scheme = LeafGetter('FontMetrics', 'EncodingScheme') _SUFFIXES = {FontVariant.SMALL_CAPITAL: ('.smcp', '.sc', 'small'), FontVariant.OLDSTYLE_FIGURES: ('.oldstyle', )} def _find_suffix(self, char, variant, upper=False): try: return self._suffixes[variant] except KeyError: for suffix in self._SUFFIXES[variant]: for name in self._char_to_glyph_names(char, FontVariant.NORMAL): if name + suffix in self._glyphs: self._suffixes[variant] = suffix return suffix else: return '' ## if not upper: ## return self._find_suffix(self.char_to_name(char.upper()), ## possible_suffixes, True) def _unicode_to_glyph_names(self, unicode): if self._unicode_mapping: for name in self._unicode_mapping.get(unicode, []): yield name try: for name in UNICODE_TO_GLYPH_NAME[unicode]: yield name # TODO: map to uniXXXX or uXXXX names except KeyError: warn('Don\'t know how to map unicode index 0x{:04x} ({}) to a ' 'PostScript glyph name.'.format(unicode, chr(unicode), RinohWarning)) def _char_to_glyph_names(self, char, variant): suffix = self._find_suffix(char, variant) if char != ' ' else '' for name in self._unicode_to_glyph_names(ord(char)): yield name + suffix @cached def get_glyph(self, char, variant): for name in self._char_to_glyph_names(char, variant): if name in self._glyphs: return self._glyphs[name] if variant != FontVariant.NORMAL: warn('No {} variant found for unicode index 0x{:04x} ({}), falling ' 'back to the standard glyph.'.format(variant, ord(char), char), RinohWarning) return self.get_glyph(char, FontVariant.NORMAL) else: warn('{} does not contain glyph for unicode index 0x{:04x} ({}).' .format(self.name, ord(char), char), RinohWarning) raise MissingGlyphException def get_ligature(self, glyph, successor_glyph): try: ligature_name = self._ligatures[glyph.name][successor_glyph.name] return self._glyphs[ligature_name] except KeyError: return None def get_kerning(self, a, b): return self._kerning_pairs.get((a.name, b.name), 0.0) class PrinterFont(object): def __init__(self, header, body, trailer): self.header = header self.body = body self.trailer = trailer class PrinterFontASCII(PrinterFont): START_OF_BODY = re.compile(br'\s*currentfile\s+eexec\s*') def __init__(self, filename): with open(filename, 'rb') as file: header = self._parse_header(file) body, trailer = self._parse_body_and_trailer(file) super().__init__(header, body, trailer) @classmethod def _parse_header(cls, file): header = BytesIO() for line in file: # Adobe Reader can't handle carriage returns, so we remove them header.write(line.translate(None, b'\r')) if cls.START_OF_BODY.match(line.translate(None, b'\r\n')): break return header.getvalue() @staticmethod def _parse_body_and_trailer(file): body = BytesIO() trailer_lines = [] number_of_zeros = 0 lines = file.readlines() for line in reversed(lines): number_of_zeros += line.count(b'0') trailer_lines.append(lines.pop()) if number_of_zeros == 512: break elif number_of_zeros > 512: raise Type1ParseError for line in lines: cleaned = line.translate(None, b' \t\r\n') body.write(unhexlify(cleaned)) trailer = BytesIO() for line in reversed(trailer_lines): trailer.write(line.translate(None, b'\r')) return body.getvalue(), trailer.getvalue() class PrinterFontBinary(PrinterFont): SECTION_HEADER_FMT = '<BBI' SEGMENT_TYPES = {'header': 1, 'body': 2, 'trailer': 1} def __init__(self, filename): with open(filename, 'rb') as file: segments = [] for segment_name in ('header', 'body', 'trailer'): segment_type, segment = self._read_pfb_segment(file) if self.SEGMENT_TYPES[segment_name] != segment_type: raise Type1ParseError('Not a PFB file') segments.append(segment) check, eof_type = struct.unpack('<BB', file.read(2)) if check != 128 or eof_type != 3: raise Type1ParseError('Not a PFB file') super().__init__(*segments) @classmethod def _read_pfb_segment(cls, file): header_data = file.read(struct.calcsize(cls.SECTION_HEADER_FMT)) check, segment_type, length = struct.unpack(cls.SECTION_HEADER_FMT, header_data) if check != 128: raise Type1ParseError('Not a PFB file') return int(segment_type), file.read(length) class Type1Font(AdobeFontMetrics): def __init__(self, filename, weight='medium', slant='upright', width='normal', unicode_mapping=None, core=False): super().__init__(filename + '.afm', weight, slant, width, unicode_mapping) self.core = core if not core: if os.path.exists(filename + '.pfb'): self.font_program = PrinterFontBinary(filename + '.pfb') else: self.font_program = PrinterFontASCII(filename + '.pfa') class Type1ParseError(Exception): pass
/rinohtype-reloaded-0.3.3.tar.gz/rinohtype-reloaded-0.3.3/src/rinoh/font/type1.py
0.459319
0.207315
type1.py
pypi
import hashlib, math, io, struct from datetime import datetime, timedelta from collections import OrderedDict from ...util import all_subclasses def create_reader(data_format, process_struct=lambda data: data[0]): data_struct = struct.Struct('>' + data_format) def reader(file, **kwargs): data = data_struct.unpack(file.read(data_struct.size)) return process_struct(data) return reader # using the names and datatypes from the OpenType specification # http://www.microsoft.com/typography/otspec/ byte = create_reader('B') char = create_reader('b') ushort = create_reader('H') short = create_reader('h') ulong = create_reader('L') long = create_reader('l') fixed = create_reader('L', lambda data: data[0] / 2**16) int16 = fword = short uint16 = ufword = ushort uint24 = create_reader('3B', lambda data: sum([byte << (2 - i) for i, byte in enumerate(data)])) string = create_reader('4s', lambda data: data[0].decode('ascii').strip()) tag = string glyph_id = uint16 offset = uint16 longdatetime = create_reader('q', lambda data: datetime(1904, 1, 1) + timedelta(seconds=data[0])) class Packed(OrderedDict): reader = None fields = [] def __init__(self, file, **kwargs): super().__init__(self) self.value = self.__class__.reader(file) for name, mask, processor in self.fields: self[name] = processor(self.value & mask) def array(reader, length): def array_reader(file, **kwargs): return [reader(file, **kwargs) for _ in range(length)] return array_reader def context(reader, *indirect_args): def context_reader(file, base, table): args = [table[key] for key in indirect_args] return reader(file, *args) return context_reader def context_array(reader, count_key, *indirect_args, multiplier=1): def context_array_reader(file, table, **kwargs): length = int(table[count_key] * multiplier) args = [table[key] for key in indirect_args] return array(reader, length)(file, *args, table=table, **kwargs) return context_array_reader def indirect(reader, *indirect_args, offset_reader=offset): def indirect_reader(file, base, table, **kwargs): indirect_offset = offset_reader(file) restore_position = file.tell() args = [table[key] for key in indirect_args] result = reader(file, base + indirect_offset, *args, **kwargs) file.seek(restore_position) return result return indirect_reader def indirect_array(reader, count_key, *indirect_args): def indirect_array_reader(file, base, table): offsets = array(offset, table[count_key])(file) args = [table[key] for key in indirect_args] return [reader(file, base + entry_offset, *args) for entry_offset in offsets] return indirect_array_reader class OpenTypeTableBase(OrderedDict): entries = [] def __init__(self, file, file_offset=None, **kwargs): super().__init__() if file_offset is None: file_offset = kwargs.pop('base', None) self.parse(file, file_offset, self.entries, **kwargs) def parse(self, file, base, entries, **kwargs): kwargs.pop('table', None) for key, reader in entries: value = reader(file, base=base, table=self, **kwargs) if key is not None: self[key] = value class OpenTypeTable(OpenTypeTableBase): tag = None def __init__(self, file, file_offset=None, **kwargs): if file_offset is not None: file.seek(file_offset) super().__init__(file, file_offset, **kwargs) class MultiFormatTable(OpenTypeTable): formats = {} def __init__(self, file, file_offset=None, **kwargs): super().__init__(file, file_offset, **kwargs) table_format = self[self.entries[0][0]] if table_format in self.formats: self.parse(file, file_offset, self.formats[table_format]) class Record(OpenTypeTableBase): """The base offset for indirect entries in a `Record` is the parent table's base, not the `Record`'s base.""" def __init__(self, file, table=None, base=None): super().__init__(file, base) self._parent_table = table class OffsetTable(OpenTypeTable): entries = [('sfnt version', fixed), ('numTables', ushort), ('searchRange', ushort), ('entrySelector', ushort), ('rangeShift', ushort)] class TableRecord(OpenTypeTable): entries = [('tag', tag), ('checkSum', ulong), ('offset', ulong), ('length', ulong)] def check_sum(self, file): total = 0 table_offset = self['offset'] file.seek(table_offset) end_of_data = table_offset + 4 * math.ceil(self['length'] / 4) while file.tell() < end_of_data: value = ulong(file) if not (self['tag'] == 'head' and file.tell() == table_offset + 12): total += value checksum = total % 2**32 assert checksum == self['checkSum'] from .required import HmtxTable from .cff import CompactFontFormat from . import truetype, gpos, gsub, other class OpenTypeParser(dict): def __init__(self, filename): disk_file = open(filename, 'rb') file = io.BytesIO(disk_file.read()) disk_file.close() offset_table = OffsetTable(file) table_records = OrderedDict() for i in range(offset_table['numTables']): record = TableRecord(file) table_records[record['tag']] = record for tag, record in table_records.items(): record.check_sum(file) for tag in ('head', 'hhea', 'cmap', 'maxp', 'name', 'post', 'OS/2'): self[tag] = self._parse_table(file, table_records[tag]) self['hmtx'] = HmtxTable(file, table_records['hmtx']['offset'], self['hhea']['numberOfHMetrics'], self['maxp']['numGlyphs']) try: self['CFF'] = CompactFontFormat(file, table_records['CFF']['offset']) except KeyError: self['loca'] = truetype.LocaTable(file, table_records['loca']['offset'], self['head']['indexToLocFormat'], self['maxp']['numGlyphs']) self['glyf'] = truetype.GlyfTable(file, table_records['glyf']['offset'], self['loca']) for tag in ('kern', 'GPOS', 'GSUB'): if tag in table_records: self[tag] = self._parse_table(file, table_records[tag]) @staticmethod def _parse_table(file, table_record): for cls in all_subclasses(OpenTypeTable): if cls.tag == table_record['tag']: return cls(file, table_record['offset'])
/rinohtype-reloaded-0.3.3.tar.gz/rinohtype-reloaded-0.3.3/src/rinoh/font/opentype/parse.py
0.642096
0.335079
parse.py
pypi
import struct from binascii import hexlify from io import BytesIO def grab(file, data_format): data = file.read(struct.calcsize(data_format)) return struct.unpack('>' + data_format, data) card8 = lambda file: grab(file, 'B')[0] card16 = lambda file: grab(file, 'h')[0] offsize = card8 def offset(offset_size): return lambda file: grab(file, ('B', 'H', 'I', 'L')[offset_size - 1])[0] class Section(dict): def __init__(self, file, offset=None): if offset: file.seek(offset) for name, reader in self.entries: self[name] = reader(file) class Header(Section): entries = [('major', card8), ('minor', card8), ('hdrSize', card8), ('offSize', card8)] class OperatorExeption(Exception): def __init__(self, code): self.code = code class Operator(object): def __init__(self, name, type, default=None): self.name = name self.type = type self.default = default def __repr__(self): return "<Operator {}>".format(self.name) number = lambda array: array[0] sid = number boolean = lambda array: number(array) == 1 array = lambda array: array def delta(array): delta = [] last_value = 0 for item in array: delta.append(last_value + item) last_value = item class Dict(dict): # values (operands) - key (operator) pairs def __init__(self, file, length, offset=None): if offset is not None: file.seek(offset) else: offset = file.tell() operands = [] while file.tell() < offset + length: try: operands.append(self._next_token(file)) except OperatorExeption as e: operator = self.operators[e.code] self[operator.name] = operator.type(operands) operands = [] def _next_token(self, file): b0 = card8(file) if b0 == 12: raise OperatorExeption((12, card8(file))) elif b0 <= 22: raise OperatorExeption(b0) elif b0 == 28: return grab(file, 'h')[0] elif b0 == 29: return grab(file, 'i')[0] elif b0 == 30: # real real_string = '' while True: real_string += hexlify(file.read(1)).decode('ascii') if 'f' in real_string: real_string = (real_string.replace('a', '.') .replace('b', 'E') .replace('c', 'E-') .replace('e', '-') .rstrip('f')) return float(real_string) elif b0 < 32: raise NotImplementedError() elif b0 < 247: return b0 - 139 elif b0 < 251: b1 = card8(file) return (b0 - 247) * 256 + b1 + 108 elif b0 < 255: b1 = card8(file) return - (b0 - 251) * 256 - b1 - 108 else: raise NotImplementedError() class TopDict(Dict): operators = {0: Operator('version', sid), 1: Operator('Notice', sid), (12, 0): Operator('Copyright', sid), 2: Operator('FullName', sid), 3: Operator('FamilyName', sid), 4: Operator('Weight', sid), (12, 1): Operator('isFixedPitch', boolean, False), (12, 2): Operator('ItalicAngle', number, 0), (12, 3): Operator('UnderlinePosition', number, -100), (12, 4): Operator('UnderlineThickness', number, 50), (12, 5): Operator('PaintType', number, 0), (12, 6): Operator('CharstringType', number, 2), (12, 7): Operator('FontMatrix', array, [0.001, 0, 0, 0.001, 0, 0]), 13: Operator('UniqueID', number), 5: Operator('FontBBox', array, [0, 0, 0, 0]), (12, 8): Operator('StrokeWidth', number, 0), 14: Operator('XUID', array), 15: Operator('charset', number, 0), # charset offset (0) 16: Operator('Encoding', number, 0), # encoding offset (0) 17: Operator('CharStrings', number), # CharStrings offset (0) 18: Operator('Private', array), # Private DICT size # and offset (0) (12, 20): Operator('SyntheticBase', number), # synthetic base font index (12, 21): Operator('PostScript', sid), # embedded PostScript language code (12, 22): Operator('BaseFontName', sid), # (added as needed by Adobe-based technology) (12, 23): Operator('BaseFontBlend', delta)} # (added as needed by Adobe-based technology) class Index(list): """Array of variable-sized objects""" def __init__(self, file, offset_=None): if offset_ is not None: file.seek(offset_) count = card16(file) offset_size = card8(file) self.offsets = [] self.sizes = [] for i in range(count + 1): self.offsets.append(offset(offset_size)(file)) self.offset_reference = file.tell() - 1 for i in range(count): self.sizes.append(self.offsets[i + 1] - self.offsets[i]) class NameIndex(Index): def __init__(self, file, offset=None): super().__init__(file, offset) for name_offset, size in zip(self.offsets, self.sizes): file.seek(self.offset_reference + name_offset) name = file.read(size).decode('ascii') self.append(name) class TopDictIndex(Index): def __init__(self, file, offset=None): super().__init__(file, offset) for dict_offset, size in zip(self.offsets, self.sizes): self.append(TopDict(file, size, self.offset_reference + dict_offset)) class CompactFontFormat(object): def __init__(self, file, offset): if offset is not None: file.seek(offset) self.header = Header(file) assert self.header['major'] == 1 self.name = NameIndex(file, offset + self.header['hdrSize']) self.top_dicts = TopDictIndex(file) #String INDEX #Global Subr INDEX # ------------------- #Encodings #Charsets #FDSelect (CIDFonts only) #CharStrings INDEX (per-font) <========================================= #Font DICT INDEX (per-font, CIDFonts only) #Private DICT (per-font) #Local Subr INDEX (per-font or per-Private DICT for CIDFonts) #Copyright and Trademark Notices
/rinohtype-reloaded-0.3.3.tar.gz/rinohtype-reloaded-0.3.3/src/rinoh/font/opentype/cff.py
0.476092
0.307501
cff.py
pypi
import struct from .parse import OpenTypeTable, MultiFormatTable, Record from .parse import int16, uint16, ushort, ulong, Packed from .parse import array, context, context_array, indirect, indirect_array from .layout import LayoutTable, Coverage, ClassDefinition, Device from ...util import cached_property class ValueFormat(Packed): reader = uint16 fields = [('XPlacement', 0x0001, bool), ('YPlacement', 0x0002, bool), ('XAdvance', 0x0004, bool), ('YAdvance', 0x0008, bool), ('XPlaDevice', 0x0010, bool), ('YPlaDevice', 0x0020, bool), ('XAdvDevice', 0x0040, bool), ('YAdvDevice', 0x0080, bool)] formats = {'XPlacement': 'h', 'YPlacement': 'h', 'XAdvance': 'h', 'YAdvance': 'h', 'XPlaDevice': 'H', 'YPlaDevice': 'H', 'XAdvDevice': 'H', 'YAdvDevice': 'H'} @cached_property def data_format(self): data_format = '' for name, present in self.items(): if present: data_format += self.formats[name] return data_format @cached_property def present_keys(self): keys = [] for name, present in self.items(): if present: keys.append(name) return keys class ValueRecord(OpenTypeTable): formats = {'XPlacement': int16, 'YPlacement': int16, 'XAdvance': int16, 'YAdvance': int16, 'XPlaDevice': indirect(Device), 'YPlaDevice': indirect(Device), 'XAdvDevice': indirect(Device), 'YAdvDevice': indirect(Device)} def __init__(self, file, value_format): super().__init__(file) for name, present in value_format.items(): if present: self[name] = self.formats[name](file) class Anchor(MultiFormatTable): entries = [('AnchorFormat', uint16), ('XCoordinate', int16), ('YCoordinate', int16)] formats = {2: [('AnchorPoint', uint16)], 3: [('XDeviceTable', indirect(Device)), ('YDeviceTable', indirect(Device))]} class MarkRecord(Record): entries = [('Class', uint16), ('MarkAnchor', indirect(Anchor))] class MarkArray(OpenTypeTable): entries = [('MarkCount', uint16), ('MarkRecord', context_array(MarkRecord, 'MarkCount'))] class SingleAdjustmentSubtable(MultiFormatTable): entries = [('PosFormat', uint16), ('Coverage', indirect(Coverage)), ('ValueFormat', ValueFormat)] formats = {1: [('Value', context(ValueRecord, 'ValueFormat'))], 2: [('ValueCount', uint16), ('Value', context_array(ValueRecord, 'ValueCount', 'ValueFormat'))]} class PairSetTable(OpenTypeTable): entries = [('PairValueCount', uint16)] def __init__(self, file, file_offset, format_1, format_2): super().__init__(file, file_offset) record_format = format_1.data_format + format_2.data_format value_1_length = len(format_1) format_1_keys = format_1.present_keys format_2_keys = format_2.present_keys pvr_struct = struct.Struct('>H' + record_format) pvr_size = pvr_struct.size pvr_list = [] self.by_second_glyph_id = {} for i in range(self['PairValueCount']): record_data = pvr_struct.unpack(file.read(pvr_size)) second_glyph = record_data[0] value_1 = {} value_2 = {} for i, key in enumerate(format_1_keys): value_1[key] = record_data[1 + i] for i, key in enumerate(format_2_keys): value_2[key] = record_data[1 + value_1_length + i] pvr = {'Value1': value_1, 'Value2': value_2} pvr_list.append(pvr) self.by_second_glyph_id[second_glyph] = pvr self['PairValueRecord'] = pvr_list class PairAdjustmentSubtable(MultiFormatTable): entries = [('PosFormat', uint16), ('Coverage', indirect(Coverage)), ('ValueFormat1', ValueFormat), ('ValueFormat2', ValueFormat)] formats = {1: [('PairSetCount', uint16), ('PairSet', indirect_array(PairSetTable, 'PairSetCount', 'ValueFormat1', 'ValueFormat2'))], 2: [('ClassDef1', indirect(ClassDefinition)), ('ClassDef2', indirect(ClassDefinition)), ('Class1Count', uint16), ('Class2Count', uint16)]} def __init__(self, file, file_offset=None): super().__init__(file, file_offset) format_1, format_2 = self['ValueFormat1'], self['ValueFormat2'] if self['PosFormat'] == 2: record_format = format_1.data_format + format_2.data_format c2r_struct = struct.Struct('>' + record_format) c2r_size = c2r_struct.size value_1_length = len(format_1) format_1_keys = format_1.present_keys format_2_keys = format_2.present_keys class_1_record = [] for i in range(self['Class1Count']): class_2_record = [] for j in range(self['Class2Count']): record_data = c2r_struct.unpack(file.read(c2r_size)) value_1 = {} value_2 = {} for i, key in enumerate(format_1_keys): value_1[key] = record_data[i] for i, key in enumerate(format_2_keys): value_2[key] = record_data[value_1_length + i] class_2_record.append({'Value1': value_1, 'Value2': value_2}) class_1_record.append(class_2_record) self['Class1Record'] = class_1_record def lookup(self, a_id, b_id): if self['PosFormat'] == 1: try: index = self['Coverage'].index(a_id) except ValueError: raise KeyError pair_value_record = self['PairSet'][index].by_second_glyph_id[b_id] return pair_value_record['Value1']['XAdvance'] elif self['PosFormat'] == 2: a_class = self['ClassDef1'].class_number(a_id) b_class = self['ClassDef2'].class_number(b_id) class_2_record = self['Class1Record'][a_class][b_class] return class_2_record['Value1']['XAdvance'] class EntryExitRecord(OpenTypeTable): entries = [('EntryAnchor', indirect(Anchor)), ('ExitAnchor', indirect(Anchor))] class CursiveAttachmentSubtable(OpenTypeTable): entries = [('PosFormat', uint16), ('Coverage', indirect(Coverage)), ('EntryExitCount', uint16), ('EntryExitRecord', context_array(EntryExitRecord, 'EntryExitCount'))] def lookup(self, a_id, b_id): assert self['PosFormat'] == 1 try: a_index = self['Coverage'].index(a_id) b_index = self['Coverage'].index(b_id) except ValueError: raise KeyError a_entry_exit = self['EntryExitRecord'][a_index] b_entry_exit = self['EntryExitRecord'][b_index] raise NotImplementedError class MarkCoverage(OpenTypeTable): pass class BaseCoverage(OpenTypeTable): pass class Mark2Array(OpenTypeTable): pass class BaseRecord(OpenTypeTable): ## entries = [('BaseAnchor', indirect_array(Anchor, 'ClassCount'))] def __init__(self, file, file_offset, class_count): super().__init__(self, file, file_offset) ## self['BaseAnchor'] = indirect_array(Anchor, 'ClassCount'])(file) class BaseArray(OpenTypeTable): entries = [('BaseCount', uint16)] ## ('BaseRecord', context_array(BaseRecord, 'BaseCount'))] def __init__(self, file, file_offset, class_count): super().__init__(self, file, file_offset) self['BaseRecord'] = array(BaseRecord, self['BaseCount'], class_count=class_count)(file) class MarkToBaseAttachmentSubtable(OpenTypeTable): entries = [('PosFormat', uint16), ('MarkCoverage', indirect(MarkCoverage)), ('BaseCoverage', indirect(BaseCoverage)), ('ClassCount', uint16), ('MarkArray', indirect(MarkArray)), ('BaseArray', indirect(BaseArray, 'ClassCount'))] class MarkToMarkAttachmentSubtable(OpenTypeTable): entries = [('PosFormat', uint16), ('Mark1Coverage', indirect(MarkCoverage)), ('Mark1Coverage', indirect(MarkCoverage)), ('ClassCount', uint16), ('Mark1Array', indirect(MarkArray)), ('Mark1Array', indirect(Mark2Array))] class ExtensionPositioning(OpenTypeTable): entries = [('PosFormat', ushort), ('ExtensionLookupType', ushort), ('ExtensionOffset', ulong)] def __init__(self, file, file_offset=None): super().__init__(file, file_offset=file_offset) subtable_class = GposTable.lookup_types[self['ExtensionLookupType']] table_offset = file_offset + self['ExtensionOffset'] self.subtable = subtable_class(file, table_offset) def lookup(self, *args, **kwargs): return self.subtable.lookup(*args, **kwargs) class GposTable(LayoutTable): """Glyph positioning table""" tag = 'GPOS' lookup_types = {1: SingleAdjustmentSubtable, 2: PairAdjustmentSubtable, 3: CursiveAttachmentSubtable, 4: MarkToBaseAttachmentSubtable, 6: MarkToMarkAttachmentSubtable, 9: ExtensionPositioning}
/rinohtype-reloaded-0.3.3.tar.gz/rinohtype-reloaded-0.3.3/src/rinoh/font/opentype/gpos.py
0.527073
0.266753
gpos.py
pypi
from .parse import OpenTypeTable, MultiFormatTable from .parse import uint16, ushort, ulong, glyph_id, array, indirect from .parse import context_array, indirect_array from .layout import LayoutTable from .layout import Coverage # Single substitution (subtable format 1) class SingleSubTable(MultiFormatTable): entries = [('SubstFormat', uint16), ('Coverage', indirect(Coverage))] formats = {1: [('DeltaGlyphID', glyph_id)], 2: [('GlyphCount', uint16), ('Substitute', context_array(glyph_id, 'GlyphCount'))]} def lookup(self, glyph_id): try: index = self['Coverage'].index(glyph_id) except ValueError: raise KeyError if self['SubstFormat'] == 1: return index + self['DeltaGlyphID'] else: return self['Substitute'][index] # Multiple subtitution (subtable format 2) class Sequence(OpenTypeTable): entries = [('GlyphCount', uint16), ('Substitute', context_array(glyph_id, 'GlyphCount'))] class MultipleSubTable(OpenTypeTable): entries = [('SubstFormat', uint16), ('Coverage', indirect(Coverage)), ('SequenceCount', uint16), ('Sequence', context_array(Sequence, 'SequenceCount'))] def lookup(self, glyph_id): try: index = self['Coverage'].index(glyph_id) except ValueError: raise KeyError raise NotImplementedError # Alternate subtitution (subtable format 3) class AlternateSubTable(OpenTypeTable): pass # Ligature substitution (subtable format 4) class Ligature(OpenTypeTable): entries = [('LigGlyph', glyph_id), ('CompCount', uint16)] def __init__(self, file, file_offset): super().__init__(file, file_offset) self['Component'] = array(glyph_id, self['CompCount'] - 1)(file) class LigatureSet(OpenTypeTable): entries = [('LigatureCount', uint16), ('Ligature', indirect_array(Ligature, 'LigatureCount'))] class LigatureSubTable(OpenTypeTable): entries = [('SubstFormat', uint16), ('Coverage', indirect(Coverage)), ('LigSetCount', uint16), ('LigatureSet', indirect_array(LigatureSet, 'LigSetCount'))] def lookup(self, a_id, b_id): try: index = self['Coverage'].index(a_id) except ValueError: raise KeyError ligature_set = self['LigatureSet'][index] for ligature in ligature_set['Ligature']: if ligature['Component'] == [b_id]: return ligature['LigGlyph'] raise KeyError # Chaining contextual substitution (subtable format 6) class ChainSubRule(OpenTypeTable): pass ## entries = [('BacktrackGlyphCount', uint16), ## ('Backtrack', context_array(glyph_id, 'BacktrackGlyphCount')), ## ('InputGlyphCount', uint16), ## ('Input', context_array(glyph_id, 'InputGlyphCount', ## lambda count: count - 1)), ## ('LookaheadGlyphCount', uint16), ## ('LookAhead', context_array(glyph_id, 'LookaheadGlyphCount')), ## ('SubstCount', uint16), ## ('SubstLookupRecord', context_array(glyph_id, 'SubstCount'))] class ChainSubRuleSet(OpenTypeTable): entries = [('ChainSubRuleCount', uint16), ('ChainSubRule', indirect(ChainSubRule))] class ChainingContextSubtable(MultiFormatTable): entries = [('SubstFormat', uint16)] formats = {1: [('Coverage', indirect(Coverage)), ('ChainSubRuleSetCount', uint16), ('ChainSubRuleSet', indirect_array(ChainSubRuleSet, 'ChainSubRuleSetCount'))]} # Extension substitution (subtable format 7) class ExtensionSubstitution(OpenTypeTable): entries = [('SubstFormat', ushort), ('ExtensionLookupType', ushort), ('ExtensionOffset', ulong)] def __init__(self, file, file_offset=None): super().__init__(file, file_offset=file_offset) subtable_class = GsubTable.lookup_types[self['ExtensionLookupType']] table_offset = file_offset + self['ExtensionOffset'] self.subtable = subtable_class(file, table_offset) def lookup(self, *args, **kwargs): return self.subtable.lookup(*args, **kwargs) class GsubTable(LayoutTable): """Glyph substitution table""" tag = 'GSUB' lookup_types = {1: SingleSubTable, 2: MultipleSubTable, 3: AlternateSubTable, 4: LigatureSubTable, #6: ChainingContextSubtable} 7: ExtensionSubstitution}
/rinohtype-reloaded-0.3.3.tar.gz/rinohtype-reloaded-0.3.3/src/rinoh/font/opentype/gsub.py
0.593963
0.255547
gsub.py
pypi
import struct from .parse import OpenTypeTable, MultiFormatTable, Record from .parse import byte, ushort, short, ulong, fixed, fword, ufword, uint24 from .parse import longdatetime, string, array, indirect, context_array, Packed from .macglyphs import MAC_GLYPHS from . import ids class HeadTable(OpenTypeTable): """Font header""" tag = 'head' entries = [('version', fixed), ('fontRevision', fixed), ('checkSumAdjustment', ulong), ('magicNumber', ulong), ('flags', ushort), ('unitsPerEm', ushort), ('created', longdatetime), ('modified', longdatetime), ('xMin', short), ('yMin', short), ('xMax', short), ('yMax', short), ('macStyle', ushort), ('lowestRecPPEM', ushort), ('fontDirectionHint', short), ('indexToLocFormat', short), ('glyphDataFormat', short)] @property def bounding_box(self): return (self['xMin'], self['yMin'], self['xMax'], self['yMax']) class HheaTable(OpenTypeTable): """Horizontal header""" tag = 'hhea' entries = [('version', fixed), ('Ascender', fword), ('Descender', fword), ('LineGap', fword), ('advanceWidthMax', ufword), ('minLeftSideBearing', fword), ('minRightSideBearing', fword), ('xMaxExtent', fword), ('caretSlopeRise', short), ('caretSlopeRun', short), ('caretOffset', short), (None, short), (None, short), (None, short), (None, short), ('metricDataFormat', short), ('numberOfHMetrics', ushort)] class HmtxTable(OpenTypeTable): """Horizontal metrics""" tag = 'htmx' def __init__(self, file, file_offset, number_of_h_metrics, num_glyphs): super().__init__(file, file_offset) # TODO: rewrite using context_array ? file.seek(file_offset) advance_widths = [] left_side_bearings = [] for i in range(number_of_h_metrics): advance_width, lsb = ushort(file), short(file) advance_widths.append(advance_width) left_side_bearings.append(lsb) for i in range(num_glyphs - number_of_h_metrics): lsb = short(file) advance_widths.append(advance_width) left_side_bearings.append(lsb) self['advanceWidth'] = advance_widths self['leftSideBearing'] = left_side_bearings class MaxpTable(MultiFormatTable): """Maximum profile""" tag = 'maxp' entries = [('version', fixed), ('numGlyphs', ushort), ('maxPoints', ushort)] format_entries = {1.0: [('maxContours', ushort), ('maxCompositePoints', ushort), ('maxCompositeContours', ushort), ('maxZones', ushort), ('maxTwilightPoints', ushort), ('maxStorage', ushort), ('maxFunctionDefs', ushort), ('maxInstructionDefs', ushort), ('maxStackElements', ushort), ('maxSizeOfInstructions', ushort), ('maxComponentElements', ushort), ('maxComponentDepth', ushort)]} class OS2Table(OpenTypeTable): """OS/2 and Windows specific metrics""" tag = 'OS/2' entries = [('version', ushort), ('xAvgCharWidth', short), ('usWeightClass', ushort), ('usWidthClass', ushort), ('fsType', ushort), ('ySubscriptXSize', short), ('ySubscriptYSize', short), ('ySubscriptXOffset', short), ('ySubscriptYOffset', short), ('ySuperscriptXSize', short), ('ySuperscriptYSize', short), ('ySuperscriptXOffset', short), ('ySuperscriptYOffset', short), ('yStrikeoutSize', short), ('yStrikeoutPosition', short), ('sFamilyClass', short), ('panose', array(byte, 10)), ('ulUnicodeRange1', ulong), ('ulUnicodeRange2', ulong), ('ulUnicodeRange3', ulong), ('ulUnicodeRange4', ulong), ('achVendID', string), ('fsSelection', ushort), ('usFirstCharIndex', ushort), ('usLastCharIndex', ushort), ('sTypoAscender', short), ('sTypoDescender', short), ('sTypoLineGap', short), ('usWinAscent', ushort), ('usWinDescent', ushort), ('ulCodePageRange1', ulong), ('ulCodePageRange2', ulong), ('sxHeight', short), ('sCapHeight', short), ('usDefaultChar', ushort), ('usBreakChar', ushort), ('usMaxContext', ushort)] class PostTable(MultiFormatTable): """PostScript information""" tag = 'post' entries = [('version', fixed), ('italicAngle', fixed), ('underlinePosition', fword), ('underlineThickness', fword), ('isFixedPitch', ulong), ('minMemType42', ulong), ('maxMemType42', ulong), ('minMemType1', ulong), ('maxMemType1', ulong)] formats = {2.0: [('numberOfGlyphs', ushort), ('glyphNameIndex', context_array(ushort, 'numberOfGlyphs'))]} def __init__(self, file, file_offset): super().__init__(file, file_offset) self.names = [] if self['version'] == 2.0: num_new_glyphs = max(self['glyphNameIndex']) - 257 names = [] for i in range(num_new_glyphs): names.append(self._read_pascal_string(file)) for index in self['glyphNameIndex']: if index < 258: name = MAC_GLYPHS[index] else: name = names[index - 258] self.names.append(name) elif self['version'] != 3.0: raise NotImplementedError def _read_pascal_string(self, file): length = byte(file) return struct.unpack('>{}s'.format(length), file.read(length))[0].decode('ascii') class NameRecord(Record): entries = [('platformID', ushort), ('encodingID', ushort), ('languageID', ushort), ('nameID', ushort), ('length', ushort), ('offset', ushort)] class LangTagRecord(Record): entries = [('length', ushort), ('offset', ushort)] class NameTable(MultiFormatTable): """Naming table""" tag = 'name' entries = [('format', ushort), ('count', ushort), ('stringOffset', ushort), ('nameRecord', context_array(NameRecord, 'count'))] formats = {1: [('langTagCount', ushort), ('langTagRecord', context_array(LangTagRecord, 'langTagCount'))]} def __init__(self, file, file_offset): super().__init__(file, file_offset) if self['format'] == 1: raise NotImplementedError string_offset = file_offset + self['stringOffset'] self.strings = {} for record in self['nameRecord']: file.seek(string_offset + record['offset']) data = file.read(record['length']) if record['platformID'] in (ids.PLATFORM_UNICODE, ids.PLATFORM_WINDOWS): string = data.decode('utf_16_be') elif record['platformID'] == ids.PLATFORM_MACINTOSH: # TODO: properly decode according to the specified encoding string = data.decode('mac_roman') else: raise NotImplementedError name = self.strings.setdefault(record['nameID'], {}) platform = name.setdefault(record['platformID'], {}) platform[record['languageID']] = string class SubHeader(OpenTypeTable): entries = [('firstCode', ushort), ('entryCount', ushort), ('idDelta', short), ('idRangeOffset', ushort)] class CmapGroup(OpenTypeTable): entries = [('startCharCode', ulong), ('endCharCode', ulong), ('startGlyphID', ulong)] class VariationSelectorRecord(OpenTypeTable): entries = [('varSelector', uint24), ('defaultUVSOffset', ulong), ('nonDefaultUVSOffset', ulong)] class CmapSubtable(MultiFormatTable): entries = [('format', ushort)] formats = {0: # Byte encoding table [('length', ushort), ('language', ushort), ('glyphIdArray', array(byte, 256))], 2: # High-byte mapping through table [('length', ushort), ('language', ushort), ('subHeaderKeys', array(ushort, 256))], 4: # Segment mapping to delta values [('length', ushort), ('language', ushort), ('segCountX2', ushort), ('searchRange', ushort), ('entrySelector', ushort), ('rangeShift', ushort), ('endCount', context_array(ushort, 'segCountX2', multiplier=0.5)), (None, ushort), ('startCount', context_array(ushort, 'segCountX2', multiplier=0.5)), ('idDelta', context_array(short, 'segCountX2', multiplier=0.5)), ('idRangeOffset', context_array(ushort, 'segCountX2', multiplier=0.5))], 6: # Trimmed table mapping [('length', ushort), ('language', ushort), ('firstCode', ushort), ('entryCount', ushort), ('glyphIdArray', context_array(ushort, 'entryCount'))], 8: # Mixed 16-bit and 32-bit coverage [(None, ushort), ('length', ulong), ('language', ulong), ('is32', array(byte, 8192)), ('nGroups', ulong), ('group', context_array(CmapGroup, 'nGroups'))], 10: # Trimmed array [(None, ushort), ('length', ulong), ('language', ulong), ('startCharCode', ulong), ('numchars', ulong), ('glyphs', context_array(ushort, 'numChars'))], 12: # Segmented coverage [(None, ushort), ('length', ulong), ('language', ulong), ('nGroups', ulong), ('groups', context_array(CmapGroup, 'nGroups'))], 13: # Many-to-one range mappings [(None, ushort), ('length', ulong), ('language', ulong), ('nGroups', ulong), ('groups', context_array(CmapGroup, 'nGroups'))], 14: # Unicode Variation Sequences [('length', ulong), ('numVarSelectorRecords', ulong), ('varSelectorRecord', context_array(VariationSelectorRecord, 'numVarSelectorRecords'))]} # TODO ## formats[99] = [('bla', ushort)] ## def _format_99_init(self): ## pass def __init__(self, file, file_offset=None, **kwargs): # TODO: detect already-parsed table (?) super().__init__(file, file_offset) # TODO: create format-dependent lookup function instead of storing # everything in a dict (not efficient for format 13 subtables fe) if self['format'] == 0: indices = array(byte, 256)(file) out = {i: index for i, index in enumerate(self['glyphIdArray'])} elif self['format'] == 2: raise NotImplementedError elif self['format'] == 4: seg_count = self['segCountX2'] >> 1 self['glyphIdArray'] = array(ushort, self['length'])(file) segments = zip(self['startCount'], self['endCount'], self['idDelta'], self['idRangeOffset']) out = {} for i, (start, end, delta, range_offset) in enumerate(segments): if i == seg_count - 1: assert end == 0xFFFF break if range_offset > 0: for j, code in enumerate(range(start, end + 1)): index = (range_offset >> 1) - seg_count + i + j out[code] = self['glyphIdArray'][index] else: for code in range(start, end + 1): out[code] = (code + delta) % 2**16 elif self['format'] == 6: out = {code: index for code, index in zip(range(self['firstCode'], self['firstCode'] + self['entryCount']), self['glyphIdArray'])} elif self['format'] == 12: out = {} for group in self['groups']: codes = range(group['startCharCode'], group['endCharCode'] + 1) segment = {code: group['startGlyphID'] + index for index, code in enumerate(codes)} out.update(segment) elif self['format'] == 13: out = {} for group in self['groups']: codes = range(group['startCharCode'], group['endCharCode'] + 1) segment = {code: group['startGlyphID'] for code in codes} out.update(segment) else: raise NotImplementedError self.mapping = out class CmapRecord(Record): entries = [('platformID', ushort), ('encodingID', ushort), ('subtable', indirect(CmapSubtable, offset_reader=ulong))] class CmapTable(OpenTypeTable): tag = 'cmap' entries = [('version', ushort), ('numTables', ushort), ('encodingRecord', context_array(CmapRecord, 'numTables'))] def __init__(self, file, file_offset): super().__init__(file, file_offset) for record in self['encodingRecord']: key = (record['platformID'], record['encodingID']) self[key] = record['subtable']
/rinohtype-reloaded-0.3.3.tar.gz/rinohtype-reloaded-0.3.3/src/rinoh/font/opentype/required.py
0.608245
0.25097
required.py
pypi
from .parse import OpenTypeTable, MultiFormatTable, Record, context_array from .parse import fixed, array, uint16, tag, glyph_id, offset, indirect, Packed class ListRecord(Record): entries = [('Tag', tag), ('Offset', offset)] def parse_value(self, file, file_offset, entry_type): self['Value'] = entry_type(file, file_offset + self['Offset']) class ListTable(OpenTypeTable): entry_type = None entries = [('Count', uint16), ('Record', context_array(ListRecord, 'Count'))] def __init__(self, file, file_offset, **kwargs): super().__init__(file, file_offset) self.by_tag = {} for record in self['Record']: record.parse_value(file, file_offset, self.entry_type) tag_list = self.by_tag.setdefault(record['Tag'], []) tag_list.append(record['Value']) class LangSysTable(OpenTypeTable): entries = [('LookupOrder', offset), ('ReqFeatureIndex', uint16), ('FeatureCount', uint16), ('FeatureIndex', context_array(uint16, 'FeatureCount'))] class ScriptTable(ListTable): entry_type = LangSysTable entries = [('DefaultLangSys', indirect(LangSysTable))] + ListTable.entries class ScriptListTable(ListTable): entry_type = ScriptTable class FeatureTable(OpenTypeTable): entries = [('FeatureParams', offset), ('LookupCount', uint16), ('LookupListIndex', context_array(uint16, 'LookupCount'))] def __init__(self, file, offset): super().__init__(file, offset) if self['FeatureParams']: # TODO: parse Feature Parameters pass else: del self['FeatureParams'] class FeatureListTable(ListTable): entry_type = FeatureTable class LookupFlag(Packed): reader = uint16 fields = [('RightToLeft', 0x0001, bool), ('IgnoreBaseGlyphs', 0x0002, bool), ('IgnoreLigatures', 0x0004, bool), ('IgnoreMarks', 0x0008, bool), ('UseMarkFilteringSet', 0x010, bool), ('MarkAttachmentType', 0xFF00, int)] class RangeRecord(OpenTypeTable): entries = [('Start', glyph_id), ('End', glyph_id), ('StartCoverageIndex', uint16)] class Coverage(MultiFormatTable): entries = [('CoverageFormat', uint16)] formats = {1: [('GlyphCount', uint16), ('GlyphArray', context_array(glyph_id, 'GlyphCount'))], 2: [('RangeCount', uint16), ('RangeRecord', context_array(RangeRecord, 'RangeCount'))]} def index(self, glyph_id): if self['CoverageFormat'] == 1: return self['GlyphArray'].index(glyph_id) else: for record in self['RangeRecord']: if record['Start'] <= glyph_id <= record['End']: return (record['StartCoverageIndex'] + glyph_id - record['Start']) raise ValueError class ClassRangeRecord(OpenTypeTable): entries = [('Start', glyph_id), ('End', glyph_id), ('Class', uint16)] class ClassDefinition(MultiFormatTable): entries = [('ClassFormat', uint16)] formats = {1: [('StartGlyph', glyph_id), ('GlyphCount', uint16), ('ClassValueArray', context_array(uint16, 'GlyphCount'))], 2: [('ClassRangeCount', uint16), ('ClassRangeRecord', context_array(ClassRangeRecord, 'ClassRangeCount'))]} def class_number(self, glyph_id): if self['ClassFormat'] == 1: index = glyph_id - self['StartGlyph'] if 0 <= index < self['GlyphCount']: return self['ClassValueArray'][index] else: for record in self['ClassRangeRecord']: if record['Start'] <= glyph_id <= record['End']: return record['Class'] return 0 class LookupTable(OpenTypeTable): entries = [('LookupType', uint16), ('LookupFlag', LookupFlag), ('SubTableCount', uint16)] def __init__(self, file, file_offset, subtable_types): super().__init__(file, file_offset) offsets = array(uint16, self['SubTableCount'])(file) if self['LookupFlag']['UseMarkFilteringSet']: self['MarkFilteringSet'] = uint16(file) subtable_type = subtable_types[self['LookupType']] self['SubTable'] = [subtable_type(file, file_offset + subtable_offset) for subtable_offset in offsets] def lookup(self, *args, **kwargs): for subtable in self['SubTable']: try: return subtable.lookup(*args, **kwargs) except KeyError: pass raise KeyError class DelayedList(list): def __init__(self, reader, file, file_offset, item_offsets): super().__init__([None] * len(item_offsets)) self._reader = reader self._file = file self._offsets = [file_offset + item_offset for item_offset in item_offsets] def __getitem__(self, index): if super().__getitem__(index) is None: self[index] = self._reader(self._file, self._offsets[index]) return super().__getitem__(index) class LookupListTable(OpenTypeTable): entries = [('LookupCount', uint16)] def __init__(self, file, file_offset, types): super().__init__(file, file_offset) lookup_offsets = array(offset, self['LookupCount'])(file) lookup_reader = lambda file, file_offset: LookupTable(file, file_offset, types) self['Lookup'] = DelayedList(lookup_reader, file, file_offset, lookup_offsets) class LayoutTable(OpenTypeTable): entries = [('Version', fixed), ('ScriptList', indirect(ScriptListTable)), ('FeatureList', indirect(FeatureListTable))] def __init__(self, file, file_offset): super().__init__(file, file_offset) lookup_list_offset = offset(file) self['LookupList'] = LookupListTable(file, file_offset + lookup_list_offset, self.lookup_types) class Device(OpenTypeTable): entries = [('StartSize', uint16), ('EndSize', uint16), ('DeltaFormat', uint16), ('DeltaValue', uint16)]
/rinohtype-reloaded-0.3.3.tar.gz/rinohtype-reloaded-0.3.3/src/rinoh/font/opentype/layout.py
0.478773
0.301169
layout.py
pypi
from itertools import chain from ..attribute import AttributesDictionary from ..flowable import StaticGroupedFlowables from ..util import NotImplementedAttribute __all__ = ['TreeNode', 'InlineNode', 'BodyNode', 'BodySubNode', 'GroupingNode', 'DummyNode', 'TreeNodeMeta', 'Reader'] class TreeNode(object): node_name = None @classmethod def map_node(cls, node): node_name = cls.node_tag_name(node) try: return cls._mapping[node_name.replace('-', '_')](node) except KeyError: filename, line, node_name = cls.node_location(node) raise NotImplementedError("{}:{} the '{}' node is not yet supported " "({})" .format(filename, line, node_name, cls.__module__)) def __init__(self, doctree_node): self.node = doctree_node def __getattr__(self, name): for child in self.getchildren(): if child.tag_name == name: return child raise AttributeError('No such element: {} in {}'.format(name, self)) def __iter__(self): try: for child in self.parent.getchildren(): if child.tag_name == self.tag_name: yield child except AttributeError: # this is the root element yield self @property def tag_name(self): return self.node_tag_name(self.node) @property def parent(self): node_parent = self.node_parent(self.node) if node_parent is not None: return self.map_node(node_parent) def getchildren(self): return [self.map_node(child) for child in self.node_children(self.node)] @property def location(self): source_file, line, tag_name = self.node_location(self.node) return '{}:{} <{}>'.format(source_file, line, tag_name) @staticmethod def node_tag_name(node): raise NotImplementedError @staticmethod def node_parent(node): raise NotImplementedError @staticmethod def node_children(node): raise NotImplementedError @staticmethod def node_location(node): raise NotImplementedError @property def text(self): raise NotImplementedError @property def attributes(self): return NotImplementedError def get(self, key, default=None): raise NotImplementedError def __getitem__(self, name): raise NotImplementedError def process_content(self, style=None): raise NotImplementedError class InlineNode(TreeNode): style = None def styled_text(self, **kwargs): styled_text = self.build_styled_text(**kwargs) try: styled_text.source = self except AttributeError: # styled_text is None pass return styled_text def build_styled_text(self): return self.process_content(style=self.style) class BodyNodeBase(TreeNode): def children_flowables(self, skip_first=0): children = self.getchildren()[skip_first:] return list(chain(*(item.flowables() for item in children))) class BodyNode(BodyNodeBase): set_id = True def flowable(self): flowable, = self.flowables() return flowable def flowables(self): ids = iter(self._ids) for i, flowable in enumerate(self.build_flowables()): if self.set_id and i == 0 and self._ids: flowable.id = next(ids) for id in ids: flowable.secondary_ids.append(id) flowable.source = self yield flowable def build_flowables(self): yield self.build_flowable() def build_flowable(self): raise NotImplementedError('tag: %s' % self.tag_name) class BodySubNode(BodyNodeBase): def process(self): raise NotImplementedError('tag: %s' % self.tag_name) class GroupingNode(BodyNode): style = None grouped_flowables_class = StaticGroupedFlowables def build_flowable(self, style=None, **kwargs): return self.grouped_flowables_class(self.children_flowables(), style=style or self.style, **kwargs) class DummyNode(BodyNode, InlineNode): def flowables(self): # empty generator return yield def styled_text(self, preserve_space=False): return None class TreeNodeMeta(type): root = TreeNode bases = InlineNode, BodyNode, BodySubNode, GroupingNode, DummyNode def __new__(metaclass, name, bases, namespace): cls = super().__new__(metaclass, name, bases, namespace) node_name = cls.node_name or name.lower() if metaclass.root in bases: cls._mapping = {} cls._base_class = cls elif set(bases).isdisjoint(set(metaclass.bases)): cls._mapping[node_name] = cls return cls class Reader(AttributesDictionary): extensions = NotImplementedAttribute() def __getitem__(self, name): return getattr(self, name)
/rinohtype-reloaded-0.3.3.tar.gz/rinohtype-reloaded-0.3.3/src/rinoh/frontend/__init__.py
0.640523
0.253988
__init__.py
pypi
import re from ... import styleds from ...annotation import HyperLink, NamedDestination from . import EPubInlineNode, EPubBodyNode, EPubGroupingNode class Body(EPubBodyNode): pass class Section(EPubGroupingNode): grouped_flowables_class = styleds.Section class Div(EPubGroupingNode): grouped_flowables_class = styleds.Section RE_SECTION = re.compile(r'sect\d+') def build_flowables(self, **kwargs): div_class = self.get('class') if div_class and self.RE_SECTION.match(div_class): return super().build_flowables(**kwargs) else: return self.children_flowables() class Img(EPubBodyNode, EPubInlineNode): @property def image_path(self): return self.get('src') def build_flowable(self): return styleds.Image(self.image_path) def build_styled_text(self, strip_leading_whitespace=False): return styleds.InlineImage(self.image_path) class P(EPubBodyNode): def build_flowable(self): return styleds.Paragraph(super().process_content()) class H(EPubBodyNode): @property def in_section(self): parent = self.parent while not isinstance(parent, Body): if isinstance(parent, Section): return True parent = parent.parent return False def build_flowable(self): if self.in_section: try: kwargs = dict(custom_label=self.generated.build_styled_text()) except AttributeError: kwargs = dict() return styleds.Heading(self.process_content(), **kwargs) else: return styleds.Paragraph(self.process_content()) class H1(H): pass class H2(H): pass class H3(H): pass class H4(H): pass class Span(EPubInlineNode): def build_styled_text(self, strip_leading_whitespace): text = styleds.MixedStyledText(self.process_content()) text.classes = self.get('class').split(' ') return text class Em(EPubInlineNode): def build_styled_text(self, strip_leading_whitespace): return styleds.MixedStyledText(self.process_content(), style='emphasis') class Strong(EPubInlineNode): def build_styled_text(self, strip_leading_whitespace): return styleds.MixedStyledText(self.process_content(), style='strong') class Sup(EPubInlineNode): def build_styled_text(self, strip_leading_whitespace): return styleds.Superscript(self.process_content()) class Sub(EPubInlineNode): def build_styled_text(self, strip_leading_whitespace): return styleds.Subscript(self.process_content()) class Br(EPubBodyNode, EPubInlineNode): def build_flowables(self): return yield def build_styled_text(self, strip_leading_whitespace): return styleds.Newline() class Blockquote(EPubGroupingNode): style = 'block quote' class HR(EPubBodyNode): def build_flowable(self): return styleds.HorizontalRule() class A(EPubBodyNode, EPubInlineNode): def build_styled_text(self, strip_leading_whitespace): if self.get('href'): annotation = HyperLink(self.get('href')) style = 'external link' elif self.get('id'): annotation = NamedDestination(self.get('id')) style = None # else: # return styleds.MixedStyledText(self.process_content(), # style='broken link') return styleds.AnnotatedText(self.process_content(), annotation, style=style) def build_flowables(self): children = self.getchildren() assert len(children) == 0 return yield class OL(EPubBodyNode): def build_flowable(self): return styleds.List([item.flowable() for item in self.li], style='enumerated') class UL(EPubBodyNode): def build_flowable(self): return styleds.List([item.flowable() for item in self.li], style='bulleted') class LI(EPubGroupingNode): pass class DL(EPubBodyNode): def build_flowable(self): items = [(dt.flowable(), dd.flowable()) for dt, dd in zip(self.dt, self.dd)] return styleds.DefinitionList(items) class DT(EPubBodyNode): def build_flowable(self): term = styleds.Paragraph(self.process_content()) return styleds.DefinitionTerm([term]) class DD(EPubGroupingNode): grouped_flowables_class = styleds.Definition
/rinohtype-reloaded-0.3.3.tar.gz/rinohtype-reloaded-0.3.3/src/rinoh/frontend/epub/nodes.py
0.418935
0.365995
nodes.py
pypi
import os import re from urllib.parse import urljoin from urllib.request import pathname2url from ...styleds import Paragraph from ...text import MixedStyledText from ...util import NotImplementedAttribute from ... import DATA_PATH from .. import (TreeNode, InlineNode, BodyNode, BodySubNode, GroupingNode, DummyNode, TreeNodeMeta) __all__ = ['filter', 'strip_and_filter', 'ElementTreeNode', 'ElementTreeInlineNode', 'ElementTreeBodyNode', 'ElementTreeBodySubNode', 'ElementTreeGroupingNode', 'ElementTreeMixedContentNode', 'ElementTreeDummyNode', 'ElementTreeNodeMeta'] CATALOG_PATH = os.path.join(DATA_PATH, 'xml', 'catalog') CATALOG_URL = urljoin('file:', pathname2url(CATALOG_PATH)) CATALOG_NS = "urn:oasis:names:tc:entity:xmlns:xml:catalog" RE_WHITESPACE = re.compile('[\t\r\n ]+') def ends_with_space(node): while node.getchildren(): node = node.getchildren()[-1] if node.tail: text = node.tail break else: text = node.text or '' return text.endswith(' ') def filter_styled_text_node(node, strip_leading_ws): styled_text = node.styled_text(strip_leading_ws) if styled_text: yield styled_text, ends_with_space(node) def strip_and_filter(text, strip_leading_whitespace): if not text: return if strip_leading_whitespace: text = text.lstrip() if text: yield text, text.endswith(' ') def filter_whitespace(text, children, strip_leading_ws): for item, strip_leading_ws in strip_and_filter(text, strip_leading_ws): yield item for child in children: for result in filter_styled_text_node(child, strip_leading_ws): styled_text, strip_leading_ws = result yield styled_text for item, strip_leading_ws in strip_and_filter(child.tail, strip_leading_ws): yield item def process_content(text, children, strip_leading_whitespace=True, style=None): text_items = filter_whitespace(text, children, strip_leading_whitespace) return MixedStyledText([item for item in text_items], style=style) class ElementTreeNode(TreeNode): NAMESPACE = NotImplementedAttribute() @classmethod def strip_namespace(cls, tag): if '{' in tag: assert tag.startswith('{{{}}}'.format(cls.NAMESPACE)) return tag[tag.find('}') + 1:] else: return tag @classmethod def node_tag_name(cls, node): return cls.strip_namespace(node.tag) @staticmethod def node_parent(node): return node._parent @staticmethod def node_children(node): return node.getchildren() @staticmethod def node_location(node): return (node._root._filename, node.sourceline, __class__.node_tag_name(node)) @property def _id(self): return self.get('id') @property def _location(self): return self.node_location(self.node) @property def filename(self): return self.node._root._filename @property def text(self): if self.node.text: if self.get('xml:space') == 'preserve': return self.node.text else: return RE_WHITESPACE.sub(' ', self.node.text) else: return '' @property def tail(self): if self.node.tail: return RE_WHITESPACE.sub(' ', self.node.tail) else: return None @property def attributes(self): return self.node.attrib def get(self, key, default=None): return self.node.get(key, default) def __getitem__(self, name): return self.node[name] def process_content(self, strip_leading_whitespace=True, style=None): return process_content(self.text, self.getchildren(), strip_leading_whitespace, style=style) class ElementTreeInlineNode(ElementTreeNode, InlineNode): def styled_text(self, strip_leading_whitespace=False): return self.build_styled_text(strip_leading_whitespace) def build_styled_text(self, strip_leading_whitespace=False): return self.process_content(strip_leading_whitespace, style=self.style) class ElementTreeBodyNode(ElementTreeNode, BodyNode): def flowables(self): classes = self.get('classes') for flowable in super().flowables(): flowable.classes = classes yield flowable class ElementTreeBodySubNode(ElementTreeNode, BodySubNode): pass class ElementTreeGroupingNode(ElementTreeBodyNode, GroupingNode): pass class ElementTreeMixedContentNode(ElementTreeGroupingNode): def children_flowables(self): strip_leading_ws = True paragraph = [] for item, strip_leading_ws in strip_and_filter(self.text, strip_leading_ws): paragraph.append(item) for child in self.getchildren(): try: for result in filter_styled_text_node(child, strip_leading_ws): styled_text, strip_leading_ws = result paragraph.append(styled_text) except AttributeError: if paragraph and paragraph[0]: yield Paragraph(paragraph) paragraph = [] for flowable in child.flowables(): yield flowable for item, strip_leading_ws \ in strip_and_filter(child.tail, strip_leading_ws): paragraph.append(item) if paragraph and paragraph[0]: yield Paragraph(paragraph) class ElementTreeDummyNode(ElementTreeNode, DummyNode): pass class ElementTreeNodeMeta(TreeNodeMeta): root = ElementTreeNode bases = (ElementTreeInlineNode, ElementTreeBodyNode, ElementTreeBodySubNode, ElementTreeGroupingNode, ElementTreeDummyNode)
/rinohtype-reloaded-0.3.3.tar.gz/rinohtype-reloaded-0.3.3/src/rinoh/frontend/xml/__init__.py
0.509032
0.189859
__init__.py
pypi
from . import (DocBookNode, DocBookInlineNode, DocBookBodyNode, DocBookGroupingNode) from ...reference import TITLE, PAGE from ... import styleds class DocumentRoot(DocBookBodyNode): pass class Article(DocumentRoot): pass class Book(DocumentRoot): pass class Info(DocBookBodyNode): def build_flowable(self): doc_info = {field.key: field.value for field in self.getchildren()} return styleds.SetMetadataFlowable(**doc_info) class ArticleInfo(Info): pass class InfoField(DocBookNode): @property def key(self): return self.node.tag[self.node.tag.find('}') + 1:] class TextInfoField(InfoField): @property def value(self): return self.process_content() class GroupingInfoField(DocBookGroupingNode, InfoField): @property def value(self): return self.flowable() class Author(TextInfoField): pass class PersonName(DocBookInlineNode): pass class FirstName(DocBookInlineNode): pass class Surname(DocBookInlineNode): pass class Affiliation(DocBookInlineNode): pass class Address(DocBookInlineNode): pass class EMail(DocBookInlineNode): pass class Copyright(TextInfoField): pass class Year(DocBookInlineNode): pass class Holder(DocBookInlineNode): pass class Abstract(GroupingInfoField): pass class VolumeNum(TextInfoField): pass class Para(DocBookGroupingNode): pass class Emphasis(DocBookInlineNode): style = 'emphasis' class Acronym(DocBookInlineNode): style = 'acronym' class Title(DocBookBodyNode, TextInfoField): name = 'title' def build_flowable(self): if isinstance(self.parent, DocumentRoot): return styleds.SetMetadataFlowable(title=self.process_content()) elif isinstance(self.parent, ListBase): return styleds.Paragraph(self.process_content()) return styleds.Heading(self.process_content()) class Section(DocBookGroupingNode): grouped_flowables_class = styleds.Section class Chapter(Section): pass class Sect1(Section): pass class Sect2(Section): pass class Sect3(Section): pass class Sect4(Section): pass class Sect5(Section): pass class MediaObject(DocBookBodyNode): def build_flowables(self): for flowable in self.imageobject.flowables(): yield flowable class ImageObject(DocBookBodyNode): def build_flowable(self): return styleds.Image(self.imagedata.get('fileref')) class ImageData(DocBookNode): pass class TextObject(Para): pass class Phrase(DocBookInlineNode): pass class ListBase(DocBookBodyNode): style = None def build_flowables(self): for child in self.getchildren(): if isinstance(child, ListItem): break for flowable in child.flowables(): yield flowable yield styleds.List([item.flowable() for item in self.listitem], style=self.style) class OrderedList(ListBase): style = 'enumerated' class ItemizedList(ListBase): style = 'bulleted' class ListItem(DocBookGroupingNode): pass class XRef(DocBookBodyNode): def build_flowable(self): section_ref = styleds.Reference(self.get('linkend'), type=TITLE) page_ref = styleds.Reference(self.get('linkend'), type=PAGE) return styleds.Paragraph(section_ref + ' on page ' + page_ref)
/rinohtype-reloaded-0.3.3.tar.gz/rinohtype-reloaded-0.3.3/src/rinoh/frontend/docbook/nodes.py
0.544317
0.342187
nodes.py
pypi
import re from datetime import datetime import rinoh as rt from . import (DocutilsInlineNode, DocutilsNode, DocutilsBodyNode, DocutilsGroupingNode, DocutilsDummyNode) from ...dimension import DimensionUnit, INCH, CM, MM, PT, PICA, PERCENT from ...util import intersperse # Support for the following nodes is still missing # (http://docutils.sourceforge.net/docs/ref/doctree.html) # - abbreviation? (not exposed in default reStructuredText; Sphinx has :abbr:) # - acronym (not exposed in default reStructuredText?) # - math / math_block # - pending (should not appear in final doctree?) # - substitution_reference (should not appear in final doctree?) class Text(DocutilsInlineNode): node_name = '#text' def styled_text(self): return self.text class Inline(DocutilsInlineNode): style = None class_styles = {} @property def style_from_class(self): for cls in self.get('classes'): if cls in self.class_styles: return self.class_styles[cls] return self.style def build_styled_text(self): return self.process_content(style=self.style_from_class) class Document(DocutilsBodyNode): pass class DocInfo(DocutilsBodyNode): def build_flowable(self): doc_info = {field.name: field.value for field in self.getchildren()} return rt.SetMetadataFlowable(**doc_info) class Decoration(DocutilsGroupingNode): pass class Header(DocutilsBodyNode): def build_flowable(self): return rt.WarnFlowable('Docutils header nodes are ignored. Please ' 'configure your document template instead.') class Footer(DocutilsBodyNode): def build_flowable(self): return rt.WarnFlowable('Docutils footer nodes are ignored. Please ' 'configure your document template instead.') # bibliographic elements class DocInfoField(DocutilsInlineNode): @property def name(self): return self.tag_name @property def value(self): return self.styled_text() class Author(DocInfoField): pass class Authors(DocInfoField): @property def value(self): return [author.styled_text() for author in self.author] class Copyright(DocInfoField): pass class Address(DocInfoField): pass class Organization(DocInfoField): pass class Contact(DocInfoField): pass class Date(DocInfoField): @property def value(self): try: return datetime.strptime(self.node.astext(), '%Y-%m-%d') except ValueError: return super().value class Version(DocInfoField): pass class Revision(DocInfoField): pass class Status(DocInfoField): pass # FIXME: the meta elements are removed from the docutils doctree class Meta(DocutilsBodyNode): MAP = {'keywords': 'keywords', 'description': 'subject'} def build_flowable(self): metadata = {self.MAP[self.get('name')]: self.get('content')} return rt.SetMetadataFlowable(**metadata) # body elements class System_Message(DocutilsBodyNode): def build_flowable(self): return rt.WarnFlowable(self.text) class Comment(DocutilsDummyNode): pass class Topic(DocutilsGroupingNode): style = 'topic' def _process_topic(self, topic_type): topic = super().build_flowable(style=topic_type) del topic.children[0] return rt.SetMetadataFlowable(**{topic_type: topic}) @property def set_id(self): classes = self.get('classes') return not ('contents' in classes and 'local' not in classes) def build_flowable(self): classes = self.get('classes') if 'contents' in classes: if 'local' in classes: flowables = [rt.TableOfContents(local=True)] try: flowables.insert(0, self.title.flowable()) except AttributeError: pass return rt.StaticGroupedFlowables(flowables, style='table of contents') else: toc_id, = self.get('ids') return rt.SetMetadataFlowable(toc_id=toc_id) elif 'dedication' in classes: return self._process_topic('dedication') elif 'abstract' in classes: return self._process_topic('abstract') else: return super().build_flowable() class Rubric(DocutilsBodyNode): def build_flowable(self): return rt.Paragraph(self.process_content(), style='rubric') class Sidebar(DocutilsGroupingNode): style = 'sidebar' class Section(DocutilsGroupingNode): grouped_flowables_class = rt.Section class Paragraph(DocutilsBodyNode): style = None def build_flowable(self): return rt.Paragraph(self.process_content(), style=self.style) class Compound(DocutilsGroupingNode): pass class Title(DocutilsBodyNode, DocutilsInlineNode): def build_flowable(self): if isinstance(self.parent, Document): return rt.SetMetadataFlowable(title=self.process_content()) elif isinstance(self.parent, Section): try: kwargs = dict(custom_label=self.generated.build_styled_text()) except AttributeError: kwargs = dict() return rt.Heading(self.process_content(), **kwargs) else: return rt.Paragraph(self.process_content(), style='title') class Subtitle(DocutilsBodyNode): def build_flowable(self): return rt.SetMetadataFlowable(subtitle=self.process_content()) class Admonition(DocutilsGroupingNode): grouped_flowables_class = rt.Admonition def children_flowables(self, skip_first=0): try: self.title return super().children_flowables(skip_first=1) except AttributeError: return super().children_flowables() def build_flowable(self): admonition_type = self.__class__.__name__.lower() try: custom_title = self.title.styled_text() except AttributeError: custom_title = None return super().build_flowable(type=admonition_type, title=custom_title) class Attention(Admonition): pass class Caution(Admonition): pass class Danger(Admonition): pass class Error(Admonition): pass class Hint(Admonition): pass class Important(Admonition): pass class Note(Admonition): pass class Tip(Admonition): pass class Warning(Admonition): pass class Generated(DocutilsInlineNode): def styled_text(self): return None def build_styled_text(self): return self.process_content() class Emphasis(Inline): style = 'emphasis' class Strong(Inline): style = 'strong' class Title_Reference(DocutilsInlineNode): style = 'title reference' class Literal(Inline): style = 'monospaced' class Superscript(DocutilsInlineNode): def build_styled_text(self): return rt.Superscript(self.process_content()) class Subscript(DocutilsInlineNode): def build_styled_text(self): return rt.Subscript(self.process_content()) class Problematic(DocutilsBodyNode, DocutilsInlineNode): def build_styled_text(self): return rt.SingleStyledText(self.text, style='error') def build_flowable(self): return rt.DummyFlowable() class Literal_Block(DocutilsBodyNode): lexer_getter = None @property def language(self): classes = self.get('classes') if classes and classes[0] == 'code': # .. code:: return classes[1] return None # literal block (double colon) def build_flowable(self): return rt.CodeBlock(self.text, language=self.language, lexer_getter=self.lexer_getter) class Block_Quote(DocutilsGroupingNode): style = 'block quote' class Attribution(Paragraph): style = 'attribution' def process_content(self, style=None): return '\N{EM DASH}' + super().process_content(style) class Line_Block(Paragraph): style = 'line block' def _process_block(self, line_block): for child in line_block.getchildren(): try: yield child.styled_text() except AttributeError: for line in self._process_block(child): yield rt.Tab() + line def process_content(self, style=None): lines = self._process_block(self) return intersperse(lines, rt.Newline()) class Line(DocutilsInlineNode): pass class Doctest_Block(DocutilsBodyNode): def build_flowable(self): return rt.CodeBlock(self.text) class Reference(DocutilsBodyNode, DocutilsInlineNode): @property def annotation(self): if self.get('refid'): return rt.NamedDestinationLink(self.get('refid')) elif self.get('refuri'): return rt.HyperLink(self.get('refuri')) def build_styled_text(self): annotation = self.annotation content = self.process_content() if annotation is None: return rt.MixedStyledText(content, style='broken link') style = ('external link' if annotation.type == 'URI' else 'internal link') return rt.AnnotatedText(content, annotation, style=style) def build_flowable(self): children = self.getchildren() assert len(children) == 1 image = self.image.flowable() image.annotation = self.annotation return image class Footnote(DocutilsBodyNode): def flowables(self): note, = super().flowables() yield rt.RegisterNote(note) def build_flowable(self): return rt.Note(rt.StaticGroupedFlowables(self.children_flowables(1))) class Label(DocutilsBodyNode): def build_flowable(self): return rt.DummyFlowable() class Footnote_Reference(DocutilsInlineNode): style = 'footnote' def build_styled_text(self): return rt.NoteMarkerByID(self['refid'], custom_label=self.process_content(), style=self.style) class Citation(Footnote): pass class Citation_Reference(Footnote_Reference): style = 'citation' class Substitution_Definition(DocutilsBodyNode): def build_flowable(self): return rt.DummyFlowable() class Target(DocutilsBodyNode, DocutilsInlineNode): def build_styled_text(self): # TODO: what about refid? try: destination = rt.NamedDestination(*self._ids) return rt.AnnotatedText(self.process_content(), destination) except IndexError: return self.process_content() # TODO: use refname? def build_flowable(self): return rt.AnchorFlowable() class Enumerated_List(DocutilsBodyNode): def build_flowable(self): # TODO: handle different numbering styles return rt.List([item.flowable() for item in self.list_item], style='enumerated') class Bullet_List(DocutilsBodyNode): def build_flowable(self): try: return rt.List([item.flowable() for item in self.list_item], style='bulleted') except AttributeError: # empty list return rt.DummyFlowable() class List_Item(DocutilsGroupingNode): pass class Definition_List(DocutilsGroupingNode): grouped_flowables_class = rt.DefinitionList class Definition_List_Item(DocutilsBodyNode): def build_flowable(self): term_text = self.term.styled_text() try: for classifier in self.classifier: term_text += ' : ' + classifier.styled_text() except AttributeError: pass term = rt.StaticGroupedFlowables([rt.Paragraph(term_text)], style='definition term') return rt.LabeledFlowable(term, self.definition.flowable()) class Term(DocutilsInlineNode): def build_styled_text(self): content = self.process_content() if self._ids: destination = rt.NamedDestination(*self._ids) content = rt.AnnotatedText(content, destination) return content class Classifier(DocutilsInlineNode): def build_styled_text(self): return self.process_content('classifier') class Definition(DocutilsGroupingNode): style = 'definition' class Field_List(DocutilsGroupingNode): grouped_flowables_class = rt.DefinitionList style = 'field list' class Field(DocutilsBodyNode): @property def name(self): return str(self.field_name.styled_text()) @property def value(self): return self.field_body.flowable() def build_flowable(self): label = rt.Paragraph(self.field_name.styled_text(), style='field name') return rt.LabeledFlowable(label, self.field_body.flowable()) class Field_Name(DocutilsInlineNode): pass class Field_Body(DocutilsGroupingNode): pass class Option_List(DocutilsGroupingNode): grouped_flowables_class = rt.DefinitionList style = 'option list' class Option_List_Item(DocutilsBodyNode): def build_flowable(self): return rt.LabeledFlowable(self.option_group.flowable(), self.description.flowable(), style='option') class Option_Group(DocutilsBodyNode): def build_flowable(self): options = (option.styled_text() for option in self.option) return rt.Paragraph(intersperse(options, ', '), style='option_group') class Option(DocutilsInlineNode): def build_styled_text(self): text = self.option_string.styled_text() try: delimiter = rt.MixedStyledText(self.option_argument['delimiter'], style='option_string') text += delimiter + self.option_argument.styled_text() except AttributeError: pass return rt.MixedStyledText(text) class Option_String(DocutilsInlineNode): def build_styled_text(self): return rt.MixedStyledText(self.process_content(), style='option_string') class Option_Argument(DocutilsInlineNode): def build_styled_text(self): return rt.MixedStyledText(self.process_content(), style='option_arg') class Description(DocutilsGroupingNode): pass class Image(DocutilsBodyNode, DocutilsInlineNode): @property def image_path(self): return self.get('uri') def build_flowable(self): width_string = self.get('width') align = self.get('align') return rt.Image(self.image_path, scale=self.get('scale', 100) / 100, width=convert_quantity(width_string), align=align) ALIGN_TO_BASELINE = {'bottom': 0, 'middle': 50*PERCENT, 'top': 100*PERCENT} def build_styled_text(self): baseline = self.ALIGN_TO_BASELINE.get(self.get('align')) return rt.InlineImage(self.image_path, baseline=baseline) class Figure(DocutilsGroupingNode): grouped_flowables_class = rt.Figure class Caption(DocutilsBodyNode): def build_flowable(self): return rt.Caption(super().process_content()) class Legend(DocutilsGroupingNode): style = 'legend' class Transition(DocutilsBodyNode): def build_flowable(self): return rt.HorizontalRule() RE_LENGTH_PERCENT_UNITLESS = re.compile(r'^(?P<value>\d+)(?P<unit>[a-z%]*)$') # TODO: warn on px or when no unit is supplied DOCUTILS_UNIT_TO_DIMENSION = {'': PT, # assume points for unitless quantities 'in': INCH, 'cm': CM, 'mm': MM, 'pt': PT, 'pc': PICA, 'px': DimensionUnit(1 / 100 * INCH, 'px'), '%': PERCENT, 'em': None, 'ex': None} def convert_quantity(quantity_string): if quantity_string is None: return None value, unit = RE_LENGTH_PERCENT_UNITLESS.match(quantity_string).groups() return float(value) * DOCUTILS_UNIT_TO_DIMENSION[unit] class Table(DocutilsBodyNode): def build_flowable(self): tgroup = self.tgroup if 'colwidths-given' in self.get('classes'): column_widths = [int(colspec.get('colwidth')) for colspec in tgroup.colspec] else: column_widths = None try: head = tgroup.thead.get_table_section() except AttributeError: head = None body = tgroup.tbody.get_table_section() width_string = self.get('width') table = rt.Table(body, head=head, width=convert_quantity(width_string), column_widths=column_widths) try: caption = rt.Caption(self.title.process_content()) return rt.TableWithCaption([caption, table]) except AttributeError: return table class TGroup(DocutilsNode): pass class ColSpec(DocutilsNode): pass class TableRowGroup(DocutilsNode): section_cls = None def get_table_section(self): return self.section_cls([row.get_row() for row in self.row]) class THead(TableRowGroup): section_cls = rt.TableHead class TBody(TableRowGroup): section_cls = rt.TableBody class Row(DocutilsNode): def get_row(self): return rt.TableRow([entry.flowable() for entry in self.entry]) class Entry(DocutilsGroupingNode): grouped_flowables_class = rt.TableCell def build_flowable(self): rowspan = int(self.get('morerows', 0)) + 1 colspan = int(self.get('morecols', 0)) + 1 return super().build_flowable(rowspan=rowspan, colspan=colspan) class Raw(DocutilsBodyNode, DocutilsInlineNode): def build_styled_text(self): cls, = self['classes'] return rt.WarnInline('{}: raw interpreted text roles are not supported' .format(cls)) def build_flowable(self): if self['format'] == 'rinoh': # TODO: Flowable.from_text(self.text) if self.text.startswith('ListOfFiguresSection'): return rt.ListOfFiguresSection() elif self.text == 'ListOfTablesSection': return rt.ListOfTablesSection() elif self.text == 'ListOfFigures(local=True)': return rt.ListOfFigures(local=True) elif self.text == 'ListOfTables(local=True)': return rt.ListOfTables(local=True) return rt.WarnFlowable("Unsupported raw pdf option: '{}'" .format(self.text)) elif self['format'] == 'pdf': # rst2pdf if self.text == 'PageBreak': style = rt.PageBreakStyle(page_break=rt.Break.ANY) return rt.PageBreak(style=style) return rt.WarnFlowable("Unsupported raw pdf option: '{}'" .format(self.text)) return rt.DummyFlowable() class Container(DocutilsGroupingNode): pass
/rinohtype-reloaded-0.3.3.tar.gz/rinohtype-reloaded-0.3.3/src/rinoh/frontend/rst/nodes.py
0.503174
0.249596
nodes.py
pypi
from pathlib import Path from docutils.core import publish_doctree from docutils.io import FileInput from docutils.parsers.rst import Parser as ReStructuredTextParser from ...document import DocumentTree from ...text import MixedStyledText from .. import (TreeNode, TreeNodeMeta, InlineNode, BodyNode, BodySubNode, GroupingNode, DummyNode, Reader) __all__ = ['DocutilsNode', 'DocutilsInlineNode', 'DocutilsBodyNode', 'DocutilsBodySubNode', 'DocutilsGroupingNode', 'DocutilsDummyNode', 'ReStructuredTextReader'] class DocutilsNode(TreeNode, metaclass=TreeNodeMeta): @staticmethod def node_tag_name(node): return node.tagname @staticmethod def node_parent(node): return node.parent @staticmethod def node_children(node): return node.children @staticmethod def node_location(node): return node.source, node.line, node.tagname @property def _ids(self): return self.get('ids') @property def text(self): return self.node.astext() @property def attributes(self): return self.node.attributes def get(self, key, default=None): return self.node.get(key, default) def __getitem__(self, name): return self.node[name] def process_content(self, style=None): children_text = (child.styled_text() for child in self.getchildren()) return MixedStyledText([text for text in children_text if text], style=style) class DocutilsInlineNode(DocutilsNode, InlineNode): @property def text(self): return super().text.replace('\n', ' ') def styled_text(self): styled_text = super().styled_text() try: styled_text.classes.extend(self.get('classes')) except AttributeError: pass return styled_text class DocutilsBodyNode(DocutilsNode, BodyNode): def flowables(self): classes = self.get('classes') for flowable in super().flowables(): flowable.classes.extend(classes) yield flowable class DocutilsBodySubNode(DocutilsNode, BodySubNode): pass class DocutilsGroupingNode(DocutilsBodyNode, GroupingNode): pass class DocutilsDummyNode(DocutilsNode, DummyNode): pass from . import nodes class DocutilsReader(Reader): parser_class = None def parse(self, filename_or_file): try: filename = Path(filename_or_file) settings_overrides = dict(input_encoding='utf-8') doctree = publish_doctree(None, source_path=str(filename), source_class=FileInput, settings_overrides=settings_overrides, parser=self.parser_class()) except TypeError: filename = getattr(filename_or_file, 'name', None) doctree = publish_doctree(filename_or_file, source_class=FileInput, parser=self.parser_class()) return self.from_doctree(filename, doctree) def from_doctree(self, filename, doctree): mapped_tree = DocutilsNode.map_node(doctree.document) flowables = mapped_tree.children_flowables() return DocumentTree(flowables, source_file=Path(filename)) class ReStructuredTextReader(DocutilsReader): extensions = ('rst', ) parser_class = ReStructuredTextParser
/rinohtype-reloaded-0.3.3.tar.gz/rinohtype-reloaded-0.3.3/src/rinoh/frontend/rst/__init__.py
0.54359
0.22212
__init__.py
pypi
import codecs def search_function(encoding): if encoding == 'pdf_doc': return getregentry() codecs.register(search_function) ### Codec APIs class Codec(codecs.Codec): def encode(self, input, errors='strict'): return codecs.charmap_encode(input, errors, encoding_table) def decode(self, input, errors='strict'): return codecs.charmap_decode(input, errors, decoding_table) class IncrementalEncoder(codecs.IncrementalEncoder): def encode(self, input, final=False): return codecs.charmap_encode(input, self.errors, encoding_table)[0] class IncrementalDecoder(codecs.IncrementalDecoder): def decode(self, input, final=False): return codecs.charmap_decode(input, self.errors, decoding_table)[0] class StreamWriter(Codec, codecs.StreamWriter): pass class StreamReader(Codec, codecs.StreamReader): pass ### encodings module API def getregentry(): return codecs.CodecInfo( name='pdf-doc', encode=Codec().encode, decode=Codec().decode, incrementalencoder=IncrementalEncoder, incrementaldecoder=IncrementalDecoder, streamreader=StreamReader, streamwriter=StreamWriter, ) ### Decoding Table (from the PDF reference) decoding_table = ( '\ufffe' # 0x00 -> (NULL) '\ufffe' # 0x01 -> (START OF HEADING) '\ufffe' # 0x02 -> (START OF TEXT) '\ufffe' # 0x03 -> (END OF TEXT) '\ufffe' # 0x04 -> (END OF TEXT) '\ufffe' # 0x05 -> (END OF TRANSMISSION) '\ufffe' # 0x06 -> (ACKNOWLEDGE) '\ufffe' # 0x07 -> (BELL) '\ufffe' # 0x08 -> (BACKSPACE) '\ufffe' # 0x09 -> (CHARACTER TABULATION) '\ufffe' # 0x0A -> (LINE FEED) '\ufffe' # 0x0B -> (LINE TABULATION) '\ufffe' # 0x0C -> (FORM FEED) '\ufffe' # 0x0D -> (CARRIAGE RETURN) '\ufffe' # 0x0E -> (SHIFT OUT) '\ufffe' # 0x0F -> (SHIFT IN) '\ufffe' # 0x10 -> (DATA LINK ESCAPE) '\ufffe' # 0x11 -> (DEVICE CONTROL ONE) '\ufffe' # 0x12 -> (DEVICE CONTROL TWO) '\ufffe' # 0x13 -> (DEVICE CONTROL THREE) '\ufffe' # 0x14 -> (DEVICE CONTROL FOUR) '\ufffe' # 0x15 -> (NEGATIVE ACKNOWLEDGE) '\ufffe' # 0x16 -> (SYNCRONOUS IDLE) '\ufffe' # 0x17 -> (END OF TRANSMISSION BLOCK) '\u02d8' # 0x18 -> BREVE '\u02c7' # 0x19 -> CARON '\u02c6' # 0x1A -> MODIFIER LETTER CIRCUMFLEX ACCENT '\u02d9' # 0x1B -> DOT ABOVE '\u02dd' # 0x1C -> DOUBLE ACUTE ACCENT '\u02db' # 0x1D -> OGONEK '\u02da' # 0x1E -> RING ABOVE '\u02dc' # 0x1F -> SMALL TILDE ' ' # 0x20 -> SPACE (&#32;) '!' # 0x21 -> EXCLAMATION MARK '"' # 0x22 -> QUOTATION MARK (&quot;) '#' # 0x23 -> NUMBER SIGN '$' # 0x24 -> DOLLAR SIGN '%' # 0x25 -> PERCENT SIGN '&' # 0x26 -> AMPERSAND (&amp;) "'" # 0x27 -> APOSTROPHE (&apos;) '(' # 0x28 -> LEFT PARENTHESIS ')' # 0x29 -> RIGHT PARENTHESIS '*' # 0x2A -> ASTERISK '+' # 0x2B -> PLUS SIGN ',' # 0x2C -> COMMA '-' # 0x2D -> HYPHEN-MINUS '.' # 0x2E -> FULL STOP (period) '/' # 0x2F -> SOLIDUS (slash) '0' # 0x30 -> DIGIT ZERO '1' # 0x31 -> DIGIT ONE '2' # 0x32 -> DIGIT TWO '3' # 0x33 -> DIGIT THREE '4' # 0x34 -> DIGIT FOUR '5' # 0x35 -> DIGIT FIVE '6' # 0x36 -> DIGIT SIX '7' # 0x37 -> DIGIT SEVEN '8' # 0x38 -> DIGIT EIGJT '9' # 0x39 -> DIGIT NINE ':' # 0x3A -> COLON ';' # 0x3B -> SEMICOLON '<' # 0x3C -> LESS THAN SIGN (&lt;) '=' # 0x3D -> EQUALS SIGN '>' # 0x3E -> GREATER THAN SIGN (&gt;) '?' # 0x3F -> QUESTION MARK '@' # 0x40 -> COMMERCIAL AT 'A' # 0x41 -> 'B' # 0x42 -> 'C' # 0x43 -> 'D' # 0x44 -> 'E' # 0x45 -> 'F' # 0x46 -> 'G' # 0x47 -> 'H' # 0x48 -> 'I' # 0x49 -> 'J' # 0x4A -> 'K' # 0x4B -> 'L' # 0x4C -> 'M' # 0x4D -> 'N' # 0x4E -> 'O' # 0x4F -> 'P' # 0x50 -> 'Q' # 0x51 -> 'R' # 0x52 -> 'S' # 0x53 -> 'T' # 0x54 -> 'U' # 0x55 -> 'V' # 0x56 -> 'W' # 0x57 -> 'X' # 0x58 -> 'Y' # 0x59 -> 'Z' # 0x5A -> '[' # 0x5B -> LEFT SQUARE BRACKET '\\' # 0x5C -> REVERSE SOLIDUS (backslash) ']' # 0x5D -> RIGHT SQUARE BRACKET '^' # 0x5E -> CIRCUMFLEX ACCENT (hat) '_' # 0x5F -> LOW LINE (SPACING UNDERSCORE) '`' # 0x60 -> GRAVE ACCENT 'a' # 0x61 -> 'b' # 0x62 -> 'c' # 0x63 -> 'd' # 0x64 -> 'e' # 0x65 -> 'f' # 0x66 -> 'g' # 0x67 -> 'h' # 0x68 -> 'i' # 0x69 -> 'j' # 0x6A -> 'k' # 0x6B -> 'l' # 0x6C -> 'm' # 0x6D -> 'n' # 0x6E -> 'o' # 0x6F -> 'p' # 0x70 -> 'q' # 0x71 -> 'r' # 0x72 -> 's' # 0x73 -> 't' # 0x74 -> 'u' # 0x75 -> 'v' # 0x76 -> 'w' # 0x77 -> 'x' # 0x78 -> 'y' # 0x79 -> 'z' # 0x7A -> '{' # 0x7B -> LEFT CURLY BRACKET '|' # 0x7C -> VERTICAL LINE '}' # 0x7D -> RIGHT CURLY BRACKET '~' # 0x7E -> TILDE '\ufffe' # 0x7F -> Undefined '\u2022' # 0x80 -> BULLET '\u2020' # 0x81 -> DAGGER '\u2021' # 0x82 -> DOUBLE DAGGER '\u2026' # 0x83 -> HORIZONTAL ELLIPSIS '\u2014' # 0x84 -> EM DASH '\u2013' # 0x85 -> EN DASH '\u0192' # 0x86 -> '\u2044' # 0x87 -> FRACTION SLASH (solidus) '\u2039' # 0x88 -> SINGLE LEFT-POINTING ANGLE QUOTATION MARK '\u203a' # 0x89 -> SINGLE RIGHT-POINTING ANGLE QUOTATION MARK '\u2212' # 0x8A -> '\u2030' # 0x8B -> PER MILLE SIGN '\u201e' # 0x8C -> DOUBLE LOW-9 QUOTATION MARK (quotedblbase) '\u201c' # 0x8D -> LEFT DOUBLE QUOTATION MARK (double quote left) '\u201d' # 0x8E -> RIGHT DOUBLE QUOTATION MARK (quotedblright) '\u2018' # 0x8F -> LEFT SINGLE QUOTATION MARK (quoteleft) '\u2019' # 0x90 -> RIGHT SINGLE QUOTATION MARK (quoteright) '\u201a' # 0x91 -> SINGLE LOW-9 QUOTATION MARK (quotesinglbase) '\u2122' # 0x92 -> TRADE MARK SIGN '\ufb01' # 0x93 -> LATIN SMALL LIGATURE FI '\ufb02' # 0x94 -> LATIN SMALL LIGATURE FL '\u0141' # 0x95 -> LATIN CAPITAL LETTER L WITH STROKE '\u0152' # 0x96 -> LATIN CAPITAL LIGATURE OE '\u0160' # 0x97 -> LATIN CAPITAL LETTER S WITH CARON '\u0178' # 0x98 -> LATIN CAPITAL LETTER Y WITH DIAERESIS '\u017d' # 0x99 -> LATIN CAPITAL LETTER Z WITH CARON '\u0131' # 0x9A -> LATIN SMALL LETTER DOTLESS I '\u0142' # 0x9B -> LATIN SMALL LETTER L WITH STROKE '\u0153' # 0x9C -> LATIN SMALL LIGATURE OE '\u0161' # 0x9D -> LATIN SMALL LETTER S WITH CARON '\u017e' # 0x9E -> LATIN SMALL LETTER Z WITH CARON '\ufffe' # 0x9F -> Undefined '\u20ac' # 0xA0 -> EURO SIGN '\u00a1' # 0xA1 -> INVERTED EXCLAMATION MARK '\xa2' # 0xA2 -> CENT SIGN '\xa3' # 0xA3 -> POUND SIGN (sterling) '\xa4' # 0xA4 -> CURRENCY SIGN '\xa5' # 0xA5 -> YEN SIGN '\xa6' # 0xA6 -> BROKEN BAR '\xa7' # 0xA7 -> SECTION SIGN '\xa8' # 0xA8 -> DIAERESIS '\xa9' # 0xA9 -> COPYRIGHT SIGN '\xaa' # 0xAA -> FEMININE ORDINAL INDICATOR '\xab' # 0xAB -> LEFT-POINTING DOUBLE ANGLE QUOTATION MARK '\xac' # 0xAC -> NOT SIGN '\ufffe' # 0xAD -> Undefined '\xae' # 0xAE -> REGISTERED SIGN '\xaf' # 0xAF -> MACRON '\xb0' # 0xB0 -> DEGREE SIGN '\xb1' # 0xB1 -> PLUS-MINUS SIGN '\xb2' # 0xB2 -> SUPERSCRIPT TWO '\xb3' # 0xB3 -> SUPERSCRIPT THREE '\xb4' # 0xB4 -> ACUTE ACCENT '\xb5' # 0xB5 -> MICRO SIGN '\xb6' # 0xB6 -> PILCROW SIGN '\xb7' # 0xB7 -> MIDDLE DOT '\xb8' # 0xB8 -> CEDILLA '\xb9' # 0xB9 -> SUPERSCRIPT ONE '\xba' # 0xBA -> MASCULINE ORDINAL INDICATOR '\xbb' # 0xBB -> RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK '\xbc' # 0xBC -> VULGAR FRACTION ONE QUARTER '\xbd' # 0xBD -> VULGAR FRACTION ONE HALF '\xbe' # 0xBE -> VULGAR FRACTION THREE QUARTERS '\xbf' # 0xBF -> INVERTED QUESTION MARK '\xc0' # 0xC0 -> '\xc1' # 0xC1 -> '\xc2' # 0xC2 -> '\xc3' # 0xC3 -> '\xc4' # 0xC4 -> '\xc5' # 0xC5 -> '\xc6' # 0xC6 -> '\xc7' # 0xC7 -> '\xc8' # 0xC8 -> '\xc9' # 0xC9 -> '\xca' # 0xCA -> '\xcb' # 0xCB -> '\xcc' # 0xCC -> '\xcd' # 0xCD -> '\xce' # 0xCE -> '\xcf' # 0xCF -> '\xd0' # 0xD0 -> '\xd1' # 0xD1 -> '\xd2' # 0xD2 -> '\xd3' # 0xD3 -> '\xd4' # 0xD4 -> '\xd5' # 0xD5 -> '\xd6' # 0xD6 -> '\xd7' # 0xD7 -> '\xd8' # 0xD8 -> '\xd9' # 0xD9 -> '\xda' # 0xDA -> '\xdb' # 0xDB -> '\xdc' # 0xDC -> '\xdd' # 0xDD -> '\xde' # 0xDE -> '\xdf' # 0xDF -> '\xe0' # 0xE0 -> '\xe1' # 0xE1 -> '\xe2' # 0xE2 -> '\xe3' # 0xE3 -> '\xe4' # 0xE4 -> '\xe5' # 0xE5 -> '\xe6' # 0xE6 -> '\xe7' # 0xE7 -> '\xe8' # 0xE8 -> '\xe9' # 0xE9 -> '\xea' # 0xEA -> '\xeb' # 0xEB -> '\xec' # 0xEC -> '\xed' # 0xED -> '\xee' # 0xEE -> '\xef' # 0xEF -> '\xf0' # 0xF0 -> '\xf1' # 0xF1 -> '\xf2' # 0xF2 -> '\xf3' # 0xF3 -> '\xf4' # 0xF4 -> '\xf5' # 0xF5 -> '\xf6' # 0xF6 -> '\xf7' # 0xF7 -> '\xf8' # 0xF8 -> '\xf9' # 0xF9 -> '\xfa' # 0xFA -> '\xfb' # 0xFB -> '\xfc' # 0xFC -> '\xfd' # 0xFD -> '\xfe' # 0xFE -> '\xff' # 0xFF -> ) ### Encoding table encoding_table = codecs.charmap_build(decoding_table)
/rinohtype-reloaded-0.3.3.tar.gz/rinohtype-reloaded-0.3.3/src/rinoh/backend/pdf/pdfdoccodec.py
0.447943
0.171027
pdfdoccodec.py
pypi
from io import SEEK_CUR from pathlib import Path from struct import Struct, unpack, calcsize from warnings import warn from ..cos import Name, Array, Stream, Integer from ..filter import DCTDecode, FlateDecode from . import XObjectImage, DEVICE_GRAY, DEVICE_RGB, DEVICE_CMYK from .icc import SRGB, UNCALIBRATED, get_icc_stream __all__ = ['JPEGReader'] def create_reader(data_format, process_struct=lambda data: data[0], endian='>'): data_struct = Struct(endian + data_format) def reader(jpeg_reader): data = data_struct.unpack(jpeg_reader._file.read(data_struct.size)) return process_struct(data) return reader # useful resources # * http://fileformats.archiveteam.org/wiki/JPEG # * libjpeg.txt from the Independent JPEG Group's reference implementation # * http://www.ozhiker.com/electronics/pjmt/jpeg_info/app_segments.html # * http://www.w3.org/Graphics/JPEG/ # * http://www.cipa.jp/std/documents/e/DC-008-2012_E.pdf class JPEGReader(XObjectImage): COLOR_SPACE = {1: DEVICE_GRAY, 3: DEVICE_RGB, 4: DEVICE_CMYK} def __init__(self, file_or_filename): try: self.filename = Path(file_or_filename) self._file = self.filename.open('rb') except TypeError: self.filename = None self._file = file_or_filename (width, height, bits_per_component, num_components, exif_color_space, icc_profile, adobe_color_transform, dpi) = self._get_metadata() if bits_per_component != 8: raise ValueError('PDF only supports JPEG files with 8 bits ' 'per component') device_color_space = self.COLOR_SPACE[num_components] if icc_profile is None and exif_color_space is not UNCALIBRATED: icc_profile = get_icc_stream(exif_color_space) if icc_profile is not None: icc_profile['N'] = Integer(num_components) icc_profile['Alternate'] = device_color_space colorspace = Array([Name('ICCBased'), icc_profile]) else: colorspace = device_color_space super().__init__(width, height, colorspace, bits_per_component, dpi, filter=DCTDecode()) if adobe_color_transform and num_components == 4: # invert CMYK colors self['Decode'] = Array([Integer(1), Integer(0)] * 4) self._file.seek(0) while True: buffer = self._file.read(512 * 1024) # 512 KB if not buffer: break self._data.write(buffer) read_uchar = create_reader('B') read_ushort = create_reader('H') def _density(self, density): if density is None: return None x_density, y_density, unit = density if unit == DPI: dpi = x_density, y_density elif unit == DPCM: dpi = 2.54 * x_density, 2.54 * y_density else: # unit is None dpi = None return dpi def _get_metadata(self): dpi = None icc_profile = None exif_color_space = UNCALIBRATED next_icc_part_number = 1 num_icc_parts = 0 adobe_color_xform = None self._file.seek(0) prefix, marker = self.read_uchar(), self.read_uchar() if (prefix, marker) != (0xFF, 0xD8): raise ValueError('Not a JPEG file') while True: prefix, marker = self.read_uchar(), self.read_uchar() while marker == 0xFF: marker = self.read_uchar() if prefix != 0xFF or marker == 0x00: raise ValueError('Invalid or corrupt JPEG file') header_length = self.read_ushort() if marker == 0xE0: density = self._parse_jfif_segment(header_length) dpi = self._density(density) elif marker == 0xE1: result = self._parse_exif_segment(header_length) if result: density, exif_color_space = result dpi = self._density(density) elif marker == 0xE2: icc_part_number, num_icc_parts, icc_part_bytes = \ self._parse_icc_segment(header_length) assert icc_part_number == next_icc_part_number next_icc_part_number += 1 if icc_profile is None: assert icc_part_number == 1 icc_profile = Stream(filter=FlateDecode()) icc_profile.write(icc_part_bytes) elif marker == 0xEE: adobe_color_xform = self._parse_adobe_dct_segment(header_length) elif (marker & 0xF0) == 0xC0 and marker not in (0xC4, 0xC8, 0xCC): v_size, h_size, bits_per_component, num_components = \ self._parse_start_of_frame(header_length) break else: self._file.seek(header_length - 2, SEEK_CUR) assert next_icc_part_number == num_icc_parts + 1 return (h_size, v_size, bits_per_component, num_components, exif_color_space, icc_profile, adobe_color_xform, dpi) JFIF_HEADER = create_reader('5s 2s B H H B B', lambda tuple: tuple) def _parse_jfif_segment(self, header_length): (identifier, version, units, h_density, v_density, h_thumbnail, v_thumbnail) = self.JFIF_HEADER() assert identifier == b'JFIF\0' thumbnail_size = 3 * h_thumbnail * v_thumbnail assert header_length == 16 + thumbnail_size return h_density, v_density, JFIF_UNITS[units] EXIF_HEADER = create_reader('5s B', lambda tuple: tuple) EXIF_TIFF_HEADER = 'H I' EXIF_TAG_FORMAT = 'H H I 4s' def _parse_exif_segment(self, header_length): resume_position = self._file.tell() + header_length - 2 identifier, null = self.EXIF_HEADER() if identifier != b'Exif\0': self._file.seek(resume_position) return None assert null == 0 tiff_header_offset = self._file.tell() byte_order = self.read_ushort() endian = EXIF_ENDIAN[byte_order] tiff_header = create_reader(self.EXIF_TIFF_HEADER, lambda tuple: tuple, endian) fortytwo, ifd_offset = tiff_header(self) assert fortytwo == 42 self._file.seek(tiff_header_offset + ifd_offset) ifd_0th = self._parse_exif_ifd(endian, tiff_header_offset) color_space = UNCALIBRATED if EXIF_IFD_POINTER in ifd_0th: self._file.seek(tiff_header_offset + ifd_0th[EXIF_IFD_POINTER]) ifd_exif = self._parse_exif_ifd(endian, tiff_header_offset) try: exif_color_space = ifd_exif[EXIF_COLOR_SPACE] color_space = EXIF_COLOR_SPACES[exif_color_space] except KeyError: warn('The EXIF table in "{}" is missing color space information' .format(self.filename)) density = (ifd_0th.get(EXIF_X_RESOLUTION, 72), ifd_0th.get(EXIF_Y_RESOLUTION, 72), EXIF_UNITS[ifd_0th.get(EXIF_RESOLUTION_UNIT, 2)]) self._file.seek(resume_position) return density, color_space def _parse_exif_ifd(self, endian, tiff_header_offset): read_ushort = create_reader('H', endian=endian) tag_format = create_reader(self.EXIF_TAG_FORMAT, lambda tuple: tuple, endian) def get_value(type, count, value_or_offset): value_format = EXIF_TAG_TYPE[type] num_bytes = count * calcsize(value_format) if num_bytes > 4: # offset saved_offset = self._file.tell() offset, = unpack(endian + 'I', value_or_offset) self._file.seek(tiff_header_offset + offset) data = self._file.read(num_bytes) format = '{}{}'.format(endian, count * value_format) self._file.seek(saved_offset) else: format = endian + value_format data = value_or_offset[:calcsize(format)] raw_value = unpack(format, data) if type in (1, 3, 4, 9): try: value, = raw_value except ValueError: value = raw_value elif type == 2: value = raw_value[0].decode('ISO-8859-1') elif type in (5, 10): try: numerator, denomenator = raw_value value = numerator / denomenator except ValueError: pairs = zip(*(iter(raw_value), ) * 2) value = tuple(num / denom for num, denom in pairs) elif type == 7: value = raw_value return value num_tags = read_ushort(self) result = {} for i in range(num_tags): tag, type, count, value_or_offset = tag_format(self) result[tag] = get_value(type, count, value_or_offset) return result ICC_HEADER = create_reader('12s B B', lambda tuple: tuple) def _parse_icc_segment(self, header_length): resume_position = self._file.tell() + header_length - 2 identifier, part_number, num_parts = self.ICC_HEADER() if identifier != b'ICC_PROFILE\0': self._file.seek(resume_position) return None part_bytes = self._file.read(resume_position - self._file.tell()) return part_number, num_parts, part_bytes ADOBE_DCT_HEADER = create_reader('5s H H H B', lambda tuple: tuple) def _parse_adobe_dct_segment(self, header_length): assert header_length >= 14 resume_position = self._file.tell() + header_length - 2 identifier, version, flags1, flags2, color_transform = \ self.ADOBE_DCT_HEADER() if identifier != b'Adobe': self._file.seek(resume_position) return None self._file.seek(resume_position) return ADOBE_COLOR_TRANSFORM[color_transform] SOF_HEADER = create_reader('B H H B', lambda tuple: tuple) def _parse_start_of_frame(self, header_length): resume_position = self._file.tell() + header_length - 2 sample_precision, v_size, h_size, num_components = self.SOF_HEADER() self._file.seek(resume_position) return v_size, h_size, sample_precision, num_components DPCM = 'dpcm' DPI = 'dpi' JFIF_UNITS = {0: None, 1: DPI, 2: DPCM} EXIF_ENDIAN = {0x4949: '<', 0x4D4D: '>'} EXIF_TAG_TYPE = {1: 'B', 2: 's', 3: 'H', 4: 'I', 5: 'II', 7: 's', 9: 'i', 10: 'ii'} EXIF_UNITS = {2: DPI, 3: DPCM} EXIF_COLOR_SPACES = {1: SRGB, 0xFFFF: UNCALIBRATED} EXIF_X_RESOLUTION = 0x11A EXIF_Y_RESOLUTION = 0x11B EXIF_RESOLUTION_UNIT = 0x128 EXIF_IFD_POINTER = 0x8769 EXIF_COLOR_SPACE = 0xA001 UNKNOWN = 'RGB or CMYK' YCC = 'YCbCr' YCCK = 'YCCK' ADOBE_COLOR_TRANSFORM = {0: UNKNOWN, 1: YCC, 2: YCCK}
/rinohtype-reloaded-0.3.3.tar.gz/rinohtype-reloaded-0.3.3/src/rinoh/backend/pdf/xobject/jpeg.py
0.605216
0.244667
jpeg.py
pypi
CommonMark ========== CommonMark is a rationalized version of Markdown syntax, with a [spec][the spec] and BSD-licensed reference implementations in C and JavaScript. [Try it now!](http://try.commonmark.org/) [the spec]: http://spec.commonmark.org/ For more details, see <http://commonmark.org>. This repository contains the spec itself, along with tools for running tests against the spec, and for creating HTML and PDF versions of the spec. The reference implementations live in separate repositories: - <https://github.com/jgm/cmark> (C) - <https://github.com/jgm/commonmark.js> (JavaScript) There is a list of third-party libraries in a dozen different languages [here](https://github.com/jgm/CommonMark/wiki/List-of-CommonMark-Implementations). Running tests against the spec ------------------------------ [The spec] contains over 500 embedded examples which serve as conformance tests. To run the tests using an executable `$PROG`: python3 test/spec_tests.py --program $PROG If you want to extract the raw test data from the spec without actually running the tests, you can do: python3 test/spec_tests.py --dump-tests and you'll get all the tests in JSON format. The spec -------- The source of [the spec] is `spec.txt`. This is basically a Markdown file, with code examples written in a shorthand form: . Markdown source . expected HTML output . To build an HTML version of the spec, do `make spec.html`. To build a PDF version, do `make spec.pdf`. (Creating the HTML version requires that [cmark](https://github.com/jgm/cmark) and `python3` be installed and in your path. Creating a PDF also requires [pandoc] and LaTeX.) The spec is written from the point of view of the human writer, not the computer reader. It is not an algorithm---an English translation of a computer program---but a declarative description of what counts as a block quote, a code block, and each of the other structural elements that can make up a Markdown document. Because John Gruber's [canonical syntax description](http://daringfireball.net/projects/markdown/syntax) leaves many aspects of the syntax undetermined, writing a precise spec requires making a large number of decisions, many of them somewhat arbitrary. In making them, we have appealed to existing conventions and considerations of simplicity, readability, expressive power, and consistency. We have tried to ensure that "normal" documents in the many incompatible existing implementations of Markdown will render, as far as possible, as their authors intended. And we have tried to make the rules for different elements work together harmoniously. In places where different decisions could have been made (for example, the rules governing list indentation), we have explained the rationale for our choices. In a few cases, we have departed slightly from the canonical syntax description, in ways that we think further the goals of Markdown as stated in that description. For the most part, we have limited ourselves to the basic elements described in Gruber's canonical syntax description, eschewing extensions like footnotes and definition lists. It is important to get the core right before considering such things. However, we have included a visible syntax for line breaks and fenced code blocks. Differences from original Markdown ---------------------------------- There are only a few places where this spec says things that contradict the canonical syntax description: - It allows all punctuation symbols to be backslash-escaped, not just the symbols with special meanings in Markdown. We found that it was just too hard to remember which symbols could be escaped. - It introduces an alternative syntax for hard line breaks, a backslash at the end of the line, supplementing the two-spaces-at-the-end-of-line rule. This is motivated by persistent complaints about the “invisible” nature of the two-space rule. - Link syntax has been made a bit more predictable (in a backwards-compatible way). For example, `Markdown.pl` allows single quotes around a title in inline links, but not in reference links. This kind of difference is really hard for users to remember, so the spec allows single quotes in both contexts. - The rule for HTML blocks differs, though in most real cases it shouldn't make a difference. (See the section on HTML Blocks for details.) The spec's proposal makes it easy to include Markdown inside HTML block-level tags, if you want to, but also allows you to exclude this. It is also makes parsing much easier, avoiding expensive backtracking. - It does not collapse adjacent bird-track blocks into a single blockquote: > this is two > blockquotes > this is a single > > blockquote with two paragraphs - Rules for content in lists differ in a few respects, though (as with HTML blocks), most lists in existing documents should render as intended. There is some discussion of the choice points and differences in the subsection of List Items entitled Motivation. We think that the spec's proposal does better than any existing implementation in rendering lists the way a human writer or reader would intuitively understand them. (We could give numerous examples of perfectly natural looking lists that nearly every existing implementation flubs up.) - The spec stipulates that two blank lines break out of all list contexts. This is an attempt to deal with issues that often come up when someone wants to have two adjacent lists, or a list followed by an indented code block. - Changing bullet characters, or changing from bullets to numbers or vice versa, starts a new list. We think that is almost always going to be the writer's intent. - The number that begins an ordered list item may be followed by either `.` or `)`. Changing the delimiter style starts a new list. - The start number of an ordered list is significant. - Fenced code blocks are supported, delimited by either backticks (```` ``` ```` or tildes (` ~~~ `). Contributing ------------ There is a [forum for discussing CommonMark](http://talk.commonmark.org); you should use it instead of github issues for questions and possibly open-ended discussions. Use the [github issue tracker](http://github.com/jgm/CommonMark/issues) only for simple, clear, actionable issues. Authors ------- The spec was written by John MacFarlane, drawing on - his experience writing and maintaining Markdown implementations in several languages, including the first Markdown parser not based on regular expression substitutions ([pandoc](http://github.com/jgm/pandoc)) and the first markdown parsers based on PEG grammars ([peg-markdown](http://github.com/jgm/peg-markdown), [lunamark](http://github.com/jgm/lunamark)) - a detailed examination of the differences between existing Markdown implementations using [BabelMark 2](http://johnmacfarlane.net/babelmark2/), and - extensive discussions with David Greenspan, Jeff Atwood, Vicent Marti, Neil Williams, and Benjamin Dumke-von der Ehe. Since the first announcement, many people have contributed ideas. Kārlis Gaņģis was especially helpful in refining the rules for emphasis, strong emphasis, links, and images.
/rinohtype-reloaded-0.3.3.tar.gz/rinohtype-reloaded-0.3.3/examples/commonmark/README.md
0.812942
0.832237
README.md
pypi
.. _styling: Element Styling =============== This section describes how styles defined in a style sheet are applied to document elements. Understanding how this works will help you when designing a custom style sheet. rinohtype's style sheets are heavily inspired by CSS_, but add some additional functionality. Similar to CSS, rinohtype makes use of so-called *selectors* to select document elements in the *document tree* to style. Unlike CSS however, these selectors are not directly specified in a style sheet. Instead, all selectors are collected in a *matcher* where they are mapped to descriptive labels for the selected elements. A *style sheet* assigns style properties to these labels. Besides the usefulness of having these labels instead of the more cryptic selectors, a matcher can be reused by multiple style sheets, avoiding duplication. .. note:: This section currently assumes some Python or general object-oriented programming knowledge. A future update will move Python-specific details to another section, making things more accessible for non-programmers. .. _CSS: https://en.wikipedia.org/wiki/Cascading_Style_Sheets Document Tree ------------- A :class:`.Flowable` is a document element that is placed on a page. It is usually a part of a document tree. Flowables at one level in a document tree are rendered one below the other. Here is schematic representation of an example document tree:: |- Section | |- Paragraph | \- Paragraph \- Section |- Paragraph |- List | |- ListItem | | |- Paragraph (item label; a number or bullet symbol) | | \- StaticGroupedFlowables (item body) | | \- Paragraph | \- ListItem | \- Paragraph | | \- StaticGroupedFlowables | | \- List | | |- ListItem | | | \- ... | | \- ... \- Paragraph This represents a document consisting of two sections. The first section contains two paragraphs. The second section contains a paragraph followed by a list and another paragraph. All of the elements in this tree are instances of :class:`.Flowable` subclasses. :class:`.Section` and :class:`List` are subclasses of :class:`.GroupedFlowables`; they group a number of flowables. In the case of :class:`.List`, these are always of the :class:`.ListItem` type. Each list item contains an item number (ordered list) or a bullet symbol (unordered list) and an item body. For simple lists, the item body is typically a single :class:`.Paragraph`. The second list item contains a nested :class:`.List`. A :class:`.Paragraph` does not have any :class:`.Flowable` children. It is however the root node of a tree of *inline elements*. This is an example paragraph in which several text styles are combined:: Paragraph |- SingleStyledText('Text with ') |- MixedStyledText(style='emphasis') | |- SingleStyledText('multiple ') | \- MixedStyledText(style='strong') | |- SingleStyledText('nested ') | \- SingleStyledText('styles', style='small caps') \- SingleStyledText('.') The visual representation of the words in this paragraph is determined by the applied style sheet. Read more about how this works in the next section. Besides :class:`.SingleStyledText` and :class:`.MixedStyledText` elements (subclasses of :class:`.StyledText`), paragraphs can also contain :class:`.InlineFlowable`\ s. Currently, the only inline flowable is :class:`.InlineImage`. The common superclass for flowable and inline elements is :class:`.Styled`, which indicates that these elements can be styled using the style sheets. Selectors --------- Selectors in rinohtype select elements of a particular type. The *class* of a document element serves as a selector for all instances of the class (and its subclasses). The :class:`.Paragraph` class is a selector that matches all paragraphs in the document, for example:: Paragraph As with `CSS selectors`_, elements can also be matched based on their context. For example, the following matches any paragraph that is a direct child of a list item or in other words, a list item label:: ListItem / Paragraph Python's :ref:`ellipsis <python:bltin-ellipsis-object>` can be used to match any number of levels of elements in the document tree. The following selector matches paragraphs at any level inside a table cell:: TableCell / ... / Paragraph To help avoid duplicating selector definitions, context selectors can reference other selectors defined in the same :ref:`matcher <matchers>` using :class:`SelectorByName`:: SelectorByName('definition term') / ... / Paragraph Selectors can select all instances of :class:`.Styled` subclasses. These include :class:`.Flowable` and :class:`.StyledText`, but also :class:`.TableSection`, :class:`.TableRow`, :class:`.Line` and :class:`.Shape`. Elements of some of the latter classes only appear as children of other flowables (such as :class:`.Table`). Similar to a HTML element's *class* attribute, :class:`.Styled` elements can have an optional *style* attribute which can be used when constructing a selector. This one selects all styled text elements with the *emphasis* style, for example:: StyledText.like('emphasis') The :meth:`.Styled.like` method can also match **arbitrary attributes** of elements by passing them as keyword arguments. This can be used to do more advanced things such as selecting the background objects on all odd rows of a table, limited to the cells not spanning multiple rows:: TableCell.like(row_index=slice(0, None, 2), rowspan=1) / TableCellBackground The argument passed as *row_index* is a slice object that is used for extended indexing\ [#slice]_. To make this work, :attr:`.TableCell.row_index` is an object with a custom :meth:`__eq__` that allows comparison to a slice. Rinohtype borrows CSS's concept of `specificity`_ to determine the "winning" selector when multiple selectors match a given document element. Each part of a selector adds to the specificity of a selector. Roughly stated, the more specific selector will win. For example:: ListItem / Paragraph # specificity (0, 0, 0, 0, 2) wins over:: Paragraph # specificity (0, 0, 0, 0, 1) since it matches two elements instead of just one. Specificity is represented as a 5-tuple. The last four elements represent the number of *location* (currently not used), *style*, *attribute* and *class* matches. Here are some selectors along with their specificity:: StyledText.like('emphasis') # specificity (0, 0, 1, 0, 1) TableCell / ... / Paragraph # specificity (0, 0, 0, 0, 2) TableCell.like(row_index=2, rowspan=1) # specificity (0, 0, 0, 2, 1) Specificity ordering is the same as tuple ordering, so (0, 0, 1, 0, 0) wins over (0, 0, 0, 5, 0) and (0, 0, 0, 0, 3) for example. Only when the number of style matches are equal, the attributes match count is compared and so on. In practice, the class match count is dependent on the element being matched. If the class of the element exactly matches the selector, the right-most specificity value is increased by 2. If the element's class is a subclass of the selector, it is only increased by 1. The first element of the specificity tuple is the *priority* of the selector. For most selectors, the priority will have the default value of 0. The priority of a selector only needs to be set in some cases. For example, we want the :class:`.CodeBlock` selector to match a :class:`.CodeBlock` instance. However, because :class:`.CodeBlock` is a :class:`.Paragraph` subclass, another selector with a higher specificity will also match it:: CodeBlock # specificity (0, 0, 0, 0, 2) DefinitionList / Definition / Paragraph # specificity (0, 0, 0, 0, 3) To make sure the :class:`.CodeBlock` selector wins, we increase the priority of the :class:`.CodeBlock` selector by prepending it with a ``+`` sign:: +CodeBlock # specificity (1, 0, 0, 0, 2) In general, you can use multiple ``+`` or ``-`` signs to adjust the priority:: ++CodeBlock # specificity (2, 0, 0, 0, 2) ---CodeBlock # specificity (-3, 0, 0, 0, 2) .. _CSS selectors: https://en.wikipedia.org/wiki/Cascading_Style_Sheets#Selector .. _specificity: https://en.wikipedia.org/wiki/Cascading_St174yle_Sheets#Specificity .. _matchers: Matchers -------- At the most basic level, a :class:`.StyledMatcher` is a dictionary that maps labels to selectors:: matcher = StyledMatcher() ... matcher['emphasis'] = StyledText.like('emphasis') matcher['chapter'] = Section.like(level=1) matcher['list item number'] = ListItem / Paragraph matcher['nested line block'] = (GroupedFlowables.like('line block') / GroupedFlowables.like('line block')) ... Rinohtype currently includes one matcher which defines labels for all common elements in documents:: from rinoh.stylesheets import matcher Style Sheets ------------ A :class:`.StyleSheet` takes a :class:`.StyledMatcher` to provide element labels to assign style properties to:: styles = StyleSheet('IEEE', matcher=matcher) ... styles['strong'] = TextStyle(font_weight=BOLD) styles('emphasis', font_slant=ITALIC) styles('nested line block', margin_left=0.5*CM) ... Each :class:`.Styled` has a :class:`.Style` class associated with it. For :class:`.Paragraph`, this is :class:`.ParagraphStyle`. These style classes determine which style attributes are accepted for the styled element. Because the style class can automatically be determined from the selector, it is possible to simply pass the style properties to the style sheet by calling the :class:`.StyleSheet` instance as shown above. Style sheets are usually loaded from a `.rts` file using :class:`.StyleSheetFile`. An example style sheet file is shown in :ref:`basics_stylesheets`. A style sheet file contains a number of sections, denoted by a section title enclosed in square brackets. There are two special sections: - ``[STYLESHEET]`` describes global style sheet information (see :class:`.StyleSheetFile` for details) - ``[VARIABLES]`` collects variables that can be referenced elsewhere in the style sheet Other sections define the style for a document elements. The section titles correspond to the labels associated with selectors in the :class:`.StyledMatcher`. Each entry in a section sets a value for a style attribute. The style for enumerated lists is defined like this, for example: .. code-block:: ini [enumerated list] margin_left=8pt space_above=5pt space_below=5pt ordered=true flowable_spacing=5pt number_format=NUMBER label_suffix=')' Since this is an enumerated list, *ordered* is set to ``true``. *number_format* and *label_suffix* are set to produce list items labels of the style *1)*, *2)*, .... Other entries control margins and spacing. See :class:`.ListStyle` for the full list of accepted style attributes. .. todo:: base stylesheets are specified by name ... entry points Base Styles ~~~~~~~~~~~ It is possible to define styles which are not linked to a selector. These can be useful to collect common attributes in a base style for a set of style definitions. For example, the Sphinx style sheet defines the *header_footer* style to serve as a base for the *header* and *footer* styles: .. code-block:: ini [header_footer : Paragraph] base=default typeface=$(sans_typeface) font_size=10pt font_weight=BOLD indent_first=0pt tab_stops=50% CENTER, 100% RIGHT [header] base=header_footer padding_bottom=2pt border_bottom=$(thin_black_stroke) space_below=24pt [footer] base=header_footer padding_top=4pt border_top=$(thin_black_stroke) space_above=18pt Because there is no selector associated with *header_footer*, the element type needs to be specified manually. This is done by adding the name of the relevant :class:`.Styled` subclass to the section name, using a colon (``:``) to separate it from the style name, optionally surrounded by spaces. Custom Selectors ~~~~~~~~~~~~~~~~ It is also possible to define new selectors directly in a style sheet file. This allows making tweaks to an existing style sheet without having to create a new :class:`.StyledMatcher`. However, this should be used sparingly. If a great number of custom selectors are required, it is better to create a new :class:`.StyledMatcher` The syntax for specifying a selector for a style is similar to that when constructing selectors in a Python source code (see `Matchers`_), but with a number of important differences. A :class:`.Styled` subclass name followed by parentheses represents a simple class selector (without context). Arguments to be passed to :meth:`.Styled.like()` can be included within the parentheses. .. code-block:: ini [special text : StyledText('special')] font_color=#FF00FF [accept button : InlineImage(filename='images/ok_button.png')] baseline=20% Even if no arguments are passed to the class selector, it is important that the class name is followed by parentheses. If the parentheses are omitted, the selector is not registered with the matcher and the style can only be used as a base style for other style definitions (see `Base Styles`_). As in Python source code, context selectors are constructed using forward slashes (``/``) and the ellipsis (``...``). Another selector can be referenced in a context selector by enclosing its name in single or double quotes. .. code-block:: ini [admonition title colon : Admonition / ... / StyledText('colon')] font_size=10pt [chapter title : LabeledFlowable('chapter title')] label_spacing=1cm align_baselines=false [chapter title number : 'chapter title' / Paragraph('number')] font_size=96pt text_align=right Variables ~~~~~~~~~ Variables can be used for values that are used in multiple style definitions. This example declares a number of typefaces to allow easily replacing the fonts in a style sheet: .. code-block:: ini [VARIABLES] mono_typeface=TeX Gyre Cursor serif_typeface=TeX Gyre Pagella sans_typeface=Tex Gyre Heros thin_black_stroke=0.5pt,#000 blue=#20435c It also defines the *thin_black_stroke* line style for use in table and frame styles, and a specific color labelled *blue*. These variables can be referenced in style definitions as follows: .. code-block:: ini [code block] typeface=$(mono_typeface) font_size=9pt text_align=LEFT indent_first=0 space_above=6pt space_below=4pt border=$(thin_black_stroke) padding_left=5pt padding_top=1pt padding_bottom=3pt Another stylesheet can inherit (see below) from this one and easily replace fonts in the document by overriding the variables. .. _attribute-resolution: Style Attribute Resolution ~~~~~~~~~~~~~~~~~~~~~~~~~~ The element styling system makes a distinction between text (inline) elements and flowables with respect to how attribute values are resolved. **Text elements** by default inherit the properties from their parent. Take for example the *emphasis* style definition from the example above. The value for style properties other than *font_slant* (which is defined in the *emphasis* style itself) will be looked up in the style definition corresponding to the parent element, which can be either another :class:`.StyledText` instance, or a :class:`.Paragraph`. If the parent element is a :class:`.StyledText` that neither defines the style attribute, lookup proceeds recursively, moving up in the document tree. For **flowables**, there is no fall-back to the parent element's style by default. Style definitions for both types of elements accept a *base* attribute. When set, attribute lookup is first attempted in the referenced style before fallback to the parent element's style or default style (described above). This can help avoid duplication of style information and the resulting maintenance difficulties. In the following example, the *unnumbered heading level 1* style inherits all properties from *heading level 1*, overriding only the *number_format* attribute: .. code-block:: ini [heading level 1] typeface=$(sans_typeface) font_weight=BOLD font_size=16pt font_color=$(blue) line_spacing=SINGLE space_above=18pt space_below=12pt number_format=NUMBER label_suffix=' ' [unnumbered heading level 1] base=heading level 1 number_format=None In addition to the names of other styles, the *base* attribute accepts two special values: ``NEXT_STYLE`` If a style attribute is not set for the style, lookup will continue in the next style matching the element (with a lower specificity). This is similar to how CSS works. You can use this together with the ``+`` priority modifier to override some attributes for a set of elements that match different styles. ``PARENT_STYLE`` This enables fallback to the parent element's style for flowables. Note that this requires that the current element type is the same or a subclass of the parent type, so it cannot be used for all styles. When a value for a particular style attribute is set nowhere in the style definition lookup hierarchy, its default value is returned. The default values for all style properties are defined in the class definition for each of the :class:`.Style` subclasses. Style Logs ---------- When rendering a document, rinohtype will create a :index:`style log`. It is written to disk using the same base name as the output file, but with a `.stylelog` extension. The information logged in the style log is invaluable when developing a style sheet. It tells you which style maps to each element in the document. The style log lists the document elements that have been rendered to each page as a tree. The corresponding location of each document element in the source document is displayed on the same line, if the frontend provides this information. This typically includes the filename, line number and possibly other information such as a node name. For each document element, all matching styles are listed together with their specificity, ordered from high to low specificity. No styles are listed when there aren't any selectors matching the element; the default attribute value is used (for flowables) or looked up in the parent element(s) (for text/inline elements). See attribute-resolution_ for specifics. The winning style is indicated with a ``>`` symbol in front of it. Styles that are not defined in the style sheet or its base(s) are marked with an ``x``. Each style name is followed by the (file)name of the top-most stylesheet where it is defined (within brackets) and the name of its base style (after ``>``). Here is an example excerpt from a style log: .. code-block:: text ... Paragraph('January 03, 2012', style='title page date') > (0,0,1,0,2) title page date [Sphinx] > DEFAULT (0,0,0,0,2) body [Sphinx] > default SingleStyledText('January 03, 2012') ---------------------------------- page 3 ---------------------------------- #### FootnoteContainer('footnotes') StaticGroupedFlowables() #### DownExpandingContainer('floats') StaticGroupedFlowables() #### ChainedContainer('column1') DocumentTree(id='restructuredtext-demonstration') Section(id='structural-elements') demo.txt:62 <section> > (0,0,0,1,4) content chapter [Sphinx] > chapter (0,0,0,1,2) chapter [Sphinx] > DEFAULT Heading('1 Structural Elements') demo.txt:62 <title> > (0,0,0,1,2) heading level 1 [Sphinx] > DEFAULT (0,0,0,0,2) other heading levels [Sphinx] > heading level 5 MixedStyledText('1 ') SingleStyledText('1') SingleStyledText(' ') SingleStyledText('Structural Elements') Paragraph('A paragraph.') demo.txt:64 <paragraph> > (0,0,0,0,2) body MixedStyledText('A paragraph.') SingleStyledText('A paragraph.') List(style='bulleted') demo.txt:124 <bullet_list> > (0,0,1,0,2) bulleted list [Sphinx] > enumerated list ListItem() None:None <list_item> x (0,0,1,0,4) bulleted list item ListItemLabel('•') > (0,0,1,0,6) bulleted list item label [Sphinx] > list item label (0,0,0,0,2) list item label [Sphinx] > default SingleStyledText('•') StaticGroupedFlowables() > (0,0,0,0,3) list item body [Sphinx] > DEFAULT Paragraph('A bullet list') demo.txt:124 <paragraph> > (0,0,0,0,5) list item paragraph [Sphinx] > default (0,0,0,0,2) body [Sphinx] > default MixedStyledText('A bullet list') MixedStyledText('A bullet list') SingleStyledText('A bullet list') List(style='bulleted') demo.txt:126 <bullet_list> > (0,0,1,0,5) nested bulleted list [Sphinx] > bulleted list (0,0,1,0,2) bulleted list [Sphinx] > enumerated list ListItem() None:None <list_item> x (0,0,1,0,4) bulleted list item ListItemLabel('•') > (0,0,1,0,6) bulleted list item label [Sphinx] > list item label (0,0,0,0,2) list item label [Sphinx] > default SingleStyledText('•') StaticGroupedFlowables() > (0,0,0,0,3) list item body [Sphinx] > DEFAULT ... .. [#slice] Indexing a list like this ``lst[slice(0, None, 2)]`` is equivalent to ``lst[0::2]``.
/rinohtype-0.5.4.tar.gz/rinohtype-0.5.4/doc/elementstyling.rst
0.945083
0.785761
elementstyling.rst
pypi
.. _basic_styling: Basic Document Styling ====================== rinohtype allows for fine-grained control over the style of its output. Most aspects of a document's style can be controlled by style sheet files and template configuration files which are being introduced in this chapter. These files are plain text files that are easy to create, read and modify. .. _basics_stylesheets: Style Sheets ~~~~~~~~~~~~ .. currentmodule:: rinoh.style A style sheet defines the look of each element in a document. For each type of document element, the style sheet assign values to the style properties available for that element. Style sheets are stored in plain text files using the Windows INI\ [#ini]_ format with the ``.rts`` extension. Below is an excerpt from the :doc:`sphinx_stylesheet` included with rinohtype. .. _base style sheet: .. literalinclude:: /../src/rinoh/data/stylesheets/sphinx.rts :language: ini :end-before: [italic] Except for ``[STYLESHEET]`` and ``[VARIABLES]``, each configuration section in a style sheet determines the style of a particular type of document element. The ``emphasis`` style, for example, determines the look of emphasized text, which is displayed in an italic font. This is similar to how HTML's cascading style sheets work. In rinohtype however, document elements are identified by means of a descriptive label (such as *emphasis*) instead of a cryptic selector. rinohtype also makes use of selectors, but these are collected in a :ref:`matcher <matchers>` which maps them to descriptive names to be used by many style sheets. Unless you are using rinohtype as a PDF library to create custom documents, the :ref:`default matcher <default_matcher>` should cover your needs. The following two subsections illustrate how to extend an existing style sheet and how to create a new, independent style sheet. For more in-depth information on style sheets, please refer to :ref:`styling`. Extending an Existing Style Sheet --------------------------------- Starting from an existing style sheet, it is easy to make small changes to the style of individual document elements. The following style sheet file is based on the Sphinx stylesheet included with rinohtype. .. code-block:: ini [STYLESHEET] name=My Style Sheet description=Small tweaks made to the Sphinx style sheet base=sphinx [VARIABLES] mono_typeface=Courier [emphasis] font_color=#00a [strong] base=DEFAULT_STYLE font_color=#a00 By default, styles defined in a style sheet *extend* the corresponding style from the base style sheet. In this example, emphasized text will be set in an italic font (as configured in the `base style sheet`_) and colored blue (``#00a``). It is also possible to completely override a style definition. This can be done by setting the ``base`` of a style definition to ``DEFAULT_STYLE`` as illustrated by the `strong` style. This causes strongly emphasised text to be displayed in red (#a00) but **not** in a bold font as was defined in the `base style sheet`_ (the default for ``font_weight`` is `Medium`; see :class:`~rinoh.text.TextStyle`). Refer to :ref:`default_matcher` to find out which style attributes are accepted by each style (by following the hyperlink to the style class's documentation). The style sheet also redefines the ``mono_typeface`` variable. This variable is used in the `base style sheet`_ in all style definitions where a monospaced font is desired. Redefining the variable in the derived style sheet affects all of these style definitions. Starting from Scratch --------------------- If you don't specify a base style sheet in the ``[STYLESHEET]`` section, you create an independent style sheet. You should do this if you want to create a document style that is not based on an existing style sheet. If the style definition for a particular document element is not included in the style sheet, the default values for its style properties are used. .. todo:: specifying a custom matcher for an INI style sheet Unless a custom :class:`StyledMatcher` is passed to :class:`StyleSheetFile`, the :ref:`default matcher <default_matcher>` is used. Providing your own matcher offers even more customizability, but it is unlikely you will need this. See :ref:`matchers`. .. note:: In the future, rinohtype will be able to generate an empty INI style sheet, listing all styles defined in the matcher with the supported style attributes along with the default values as comments. This generated style sheet can serve as a good starting point for developing a custom style sheet from scratch. .. _basics_templates: Document Templates ~~~~~~~~~~~~~~~~~~ As with style sheets, you can choose to make use of a template provided by rinohtype and optionally customize it or you can create a custom template from scratch. This section discusses how you can configure an existing template. See :ref:`templates` on how to create a custom template. .. _configure_templates: Configuring a Template ---------------------- rinohtype provides a number of :ref:`standard_templates`. These can be customized by means of a template configuration file; a plain text file in the INI\ [#ini]_ format with the ``.rtt`` extension. Here is an example configuration for the article template: .. literalinclude:: /my_article.rtt :language: ini The ``TEMPLATE_CONFIGURATION`` sections collects global template options. Set *name* to provide a short label for your template configuration. *template* identifies the :ref:`document template <standard_templates>` to configure. All document templates consist of a number of document parts. The :class:`.Article` template defines three parts: :attr:`~.Article.title`, :attr:`~.Article.front_matter` and :attr:`~.Article.contents`. The order of these parts can be changed (although that makes little sense for the article template), and individual parts can optionally be hidden by setting the :attr:`~.DocumentTemplate.parts` configuration option. The configuration above hides the front matter part (commented out using a semicolon), for example. The template configuration also specifies which style sheet is used for styling document elements. The :class:`.DocumentTemplate.stylesheet` option takes the name of an installed style sheet (see :option:`rinoh --list-stylesheets`) or the filename of a stylesheet file (``.rts``). The :class:`~.DocumentTemplate.language` option sets the default language for the document. It determines which language is used for standard document strings such as section and admonition titles. The :class:`.Article` template defines two custom template options. The :class:`~.Article.abstract_location` option determines where the (optional) article abstract is placed, on the title page or in the front matter part. :class:`~.Article.table_of_contents` allows hiding the table of contents section. Empty document parts will not be included in the document. When the table of contents section is suppressed and there is no abstract in the input document or :class:`~.Article.abstract_location` is set to title, the front matter document part will not appear in the PDF. The standard document strings configured by the :class:`~.DocumentTemplate.language` option described above can be overridden by user-defined strings in the :class:`SectionTitles` and :class:`AdmonitionTitles` sections of the configuration file. For example, the default title for the table of contents section (*Table of Contents*) is replaced with *Contents*. The configuration also sets custom titles for the caution and warning admonitions. The others sections in the configuration file are the ``VARIABLES`` section, followed by document part and page template sections. Similar to style sheets, the variables can be referenced in the template configuration sections. Here, the ``paper_size`` variable is set, which is being referenced by by all page templates in :class:`Article` (although indirectly through the :class:`~.Article.page` base page template). For document part templates, :class:`~.DocumentPartTemplate.page_number_format` determines how page numbers are formatted. When a document part uses the same page number format as the preceding part, the numbering is continued. The :class:`.DocumentPartTemplate.end_at_page` option controls at which page the document part ends. This is set to ``left`` for the title part in the example configuration to make the contents part start on a right page. Each document part finds page templates by name. They will first look for specific left/right page templates by appending ``_left_page`` or ``_right_page`` to the document part name. If these page templates have not been defined in the template, it will look for the more general ``<document part name>_page`` template. Note that, if left and right page templates have been defined by the template (such as the book template), the configuration will need to override these, as they will have priority over the general page template defined in the configuration. The example configuration only adjusts the top margin for the :class:`TitlePageTemplate`, but many more aspects of the page templates are configurable. Refer to :ref:`standard_templates` for details. .. todo:: base for part template? Using a Template Configuration File ----------------------------------- A template configuration file can be specified when rendering using the command-line :program:`rinoh` tool by passing it to the :option:`--template <rinoh --template>` command-line option. When using the :ref:`Sphinx_builder`, you can set the :confval:`rinoh_template` option in ``conf.py``. To render a document using this template configuration programatically, load the template file using :class:`.TemplateConfigurationFile`: .. include:: testcode.rst .. testcode:: my_document import sys from pathlib import Path from rinoh.frontend.rst import ReStructuredTextReader from rinoh.template import TemplateConfigurationFile # the parser builds a rinohtype document tree parser = ReStructuredTextReader() with open('my_document.rst') as file: document_tree = parser.parse(file) # load the article template configuration file script_path = Path(sys.path[0]).resolve() config = TemplateConfigurationFile(script_path / 'my_article.rtt') # render the document to 'my_document.pdf' document = config.document(document_tree) document.render('my_document') .. testoutput:: my_document :hide: ... Writing output: my_document.pdf The :meth:`.TemplateConfigurationFile.document` method creates a document instance with the template configuration applied. So if you want to render your document using a different template configuration, it suffices to load the new configuration file. Refer to the :class:`.Article` documentation to discover all of the options accepted by it and the document part and page templates. .. footnotes .. [#ini] see *Supported INI File Structure* in :mod:`python:configparser`
/rinohtype-0.5.4.tar.gz/rinohtype-0.5.4/doc/basicstyling.rst
0.91153
0.806205
basicstyling.rst
pypi
from copy import copy from .attribute import Attribute, OptionSet, Bool, ParseError from .style import Style from .text import StyledText __all__ = ['NumberFormat', 'Label', 'LabelStyle', 'NumberStyle', 'format_number'] # number: plain arabic numbers (1, 2, 3, ...) # lowercase character: lowercase letters (a, b, c, ..., aa, ab, ...) # uppercase character: uppercase letters (A, B, C, ..., AA, AB, ...) # lowercase roman: lowercase Roman numerals (i, ii, iii, iv, v, vi, ...) # uppercase roman: uppercase Roman numerals (I, II, III, IV, V, VI, ...) # symbol: symbols (*, †, ‡, §, ‖, ¶, #, **, *†, ...) class NumberFormatBase(OptionSet): values = (None, 'number', 'symbol', 'lowercase character', 'uppercase character', 'lowercase roman', 'uppercase roman') class NumberFormat(NumberFormatBase): """How (or if) numbers are displayed Instead of a numbering format, it's possible to supply a custom label (:class:`~.StyledText`) to show instead of the number. """ @classmethod def check_type(cls, value): return super().check_type(value) or StyledText.check_type(value) @classmethod def from_tokens(cls, tokens, source): tokens.push_state() try: return super().from_tokens(tokens, source) except ParseError: tokens.pop_state(discard=False) return StyledText.from_tokens(tokens, source) class LabelStyle(Style): label_prefix = Attribute(StyledText, None, 'Text to prepend to the label') label_suffix = Attribute(StyledText, None, 'Text to append to the label') custom_label = Attribute(Bool, False, 'Use a custom label if specified') class Label(object): """Mixin class that formats a label Args: custom_label (StyledText): a frontend can supply a custom label to use instead of an automatically determined label (typically a number) """ def __init__(self, custom_label=None): self.custom_label = custom_label def format_label(self, label, container): prefix = self.get_style('label_prefix', container) or '' suffix = self.get_style('label_suffix', container) or '' return copy(prefix) + copy(label) + copy(suffix) class NumberStyle(LabelStyle): number_format = Attribute(NumberFormat, 'number', 'How numbers are formatted') def format_number(number, format): """Format `number` according the given `format` (:class:`NumberFormat`)""" try: return FORMAT_NUMBER[format](number) except TypeError: # 'number' is a custom label (StyledText) return format def characterize(number): string = '' while number > 0: number, ordinal = divmod(number, 26) if ordinal == 0: ordinal = 26 number -= 1 string = chr(ord('a') - 1 + ordinal) + string return string # romanize by Kay Schluehr - from http://billmill.org/python_roman.html NUMERALS = (('M', 1000), ('CM', 900), ('D', 500), ('CD', 400), ('C', 100), ('XC', 90), ('L', 50), ('XL', 40), ('X', 10), ('IX', 9), ('V', 5), ('IV', 4), ('I', 1)) def romanize(number): """Convert `number` to a Roman numeral.""" roman = [] for numeral, value in NUMERALS: times, number = divmod(number, value) roman.append(times * numeral) return ''.join(roman) SYMBOLS = ('*', '†', '‡', '§', '‖', '¶', '#') def symbolize(number): """Convert `number` to a foot/endnote symbol.""" repeat, index = divmod(number - 1, len(SYMBOLS)) return SYMBOLS[index] * (1 + repeat) FORMAT_NUMBER = { NumberFormat.NUMBER: str, NumberFormat.LOWERCASE_CHARACTER: characterize, NumberFormat.UPPERCASE_CHARACTER: lambda num: characterize(num).upper(), NumberFormat.LOWERCASE_ROMAN: lambda number: romanize(number).lower(), NumberFormat.UPPERCASE_ROMAN: romanize, NumberFormat.SYMBOL: symbolize, NumberFormat.NONE: lambda number: '' }
/rinohtype-0.5.4.tar.gz/rinohtype-0.5.4/src/rinoh/number.py
0.793146
0.231484
number.py
pypi
import binascii import struct from itertools import repeat from .attribute import AcceptNoneAttributeType, ParseError __all__ = ['Color', 'HexColor', 'BLACK', 'WHITE', 'RED', 'GREEN', 'BLUE', 'Gray', 'GRAY10', 'GRAY25', 'GRAY50', 'GRAY75', 'GRAY90'] class Color(AcceptNoneAttributeType): """Color defined by component values Args: red (float): red component (0 .. 1) blue (float): blue component (0 .. 1) green (float): green component (0 .. 1) alpha (float): opacity (0 .. 1) """ def __init__(self, red, green, blue, alpha=1): for value in (red, green, blue, alpha): if not 0 <= value <= 1: raise ValueError('Color component values can range from 0 to 1') self.r = red self.g = green self.b = blue self.a = alpha def __str__(self): rgba_bytes = struct.pack(4 * 'B', *(int(c * 255) for c in self.rgba)) string = binascii.hexlify(rgba_bytes).decode('ascii') if string.endswith('ff'): string = string[:-2] if string[::2] == string[1::2]: string = string[::2] return '#' + string def __repr__(self): return '{}({}, {}, {}, {})'.format(type(self).__name__, *self.rgba) @property def rgba(self): return self.r, self.g, self.b, self.a @classmethod def parse_string(cls, string, source): try: return HexColor(string) except ValueError: raise ParseError("'{}' is not a valid {}. Must be a HEX string." .format(string, cls.__name__)) @classmethod def doc_format(cls): return ('HEX string with optional alpha component ' '(``#RRGGBB``, ``#RRGGBBAA``, ``#RGB`` or ``#RGBA``)') class HexColor(Color): """Color defined as a hexadecimal string Args: string (str): ``#RGBA`` or ``#RRGGBBAA`` (``#`` and ``A`` are optional) """ def __init__(self, string): if string.startswith('#'): string = string[1:] if len(string) in (3, 4): string = ''.join(repeated for char in string for repeated in repeat(char, 2)) string = string.encode('ascii') try: r, g, b = struct.unpack('BBB', binascii.unhexlify(string[:6])) if string[6:]: a, = struct.unpack('B', binascii.unhexlify(string[6:])) else: a = 255 except (struct.error, binascii.Error): raise ValueError('Bad color string passed to ' + self.__class__.__name__) super().__init__(*(value / 255 for value in (r, g, b, a))) class Gray(Color): """Shade of gray Args: luminance (float): brightness (0 .. 1) alpha (float): opacity (0 .. 1) """ def __init__(self, luminance, alpha=1): super().__init__(luminance, luminance, luminance, alpha) BLACK = Color(0, 0, 0) WHITE = Color(1, 1, 1) GRAY10 = Gray(0.10) GRAY25 = Gray(0.25) GRAY50 = Gray(0.50) GRAY75 = Gray(0.75) GRAY90 = Gray(0.90) RED = Color(1, 0, 0) GREEN = Color(0, 1, 0) BLUE = Color(0, 0, 1)
/rinohtype-0.5.4.tar.gz/rinohtype-0.5.4/src/rinoh/color.py
0.816589
0.369059
color.py
pypi
from .attribute import AttributeType, ParseError from .dimension import Dimension, INCH, MM __all__ = ['Paper', 'A0', 'A1', 'A2', 'A3', 'A4', 'A5', 'A6', 'A7', 'A8', 'A9', 'A10', 'LETTER', 'LEGAL', 'JUNIOR_LEGAL', 'LEDGER', 'TABLOID'] class Paper(AttributeType): """Defines a paper size. Args: name (str): the name of this paper type width (Dimension): the (portrait) width of this paper type height (Dimension): the (portrait) height of this paper type """ def __init__(self, name, width, height): self.name = name self.width = width self.height = height def __repr__(self): return ("{}('{}', width={}, height={})" .format(type(self).__name__, self.name, repr(self.width), repr(self.height))) def __str__(self): return self.name @classmethod def parse_string(cls, string, source): try: return PAPER_BY_NAME[string.lower()] except KeyError: try: width, height = (Dimension.from_string(part.strip()) for part in string.split('*')) except ValueError: raise ParseError("'{}' is not a valid {} format" .format(string, cls.__name__)) return cls(string, width, height) @classmethod def doc_format(cls): return ('the name of a :ref:`predefined paper format <paper>` ' 'or ``<width> * <height>`` where ``width`` and ``height`` are ' ':class:`.Dimension`\\ s') # International (DIN 476 / ISO 216) A0 = Paper('A0', 841*MM, 1189*MM) #: A1 = Paper('A1', 594*MM, 841*MM) #: A2 = Paper('A2', 420*MM, 594*MM) #: A3 = Paper('A3', 297*MM, 420*MM) #: A4 = Paper('A4', 210*MM, 297*MM) #: A5 = Paper('A5', 148*MM, 210*MM) #: A6 = Paper('A6', 105*MM, 148*MM) #: A7 = Paper('A7', 74*MM, 105*MM) #: A8 = Paper('A8', 52*MM, 74*MM) #: A9 = Paper('A9', 37*MM, 52*MM) #: A10 = Paper('A10', 26*MM, 37*MM) #: # North America LETTER = Paper('letter', 8.5*INCH, 11*INCH) #: LEGAL = Paper('legal', 8.5*INCH, 14*INCH) #: JUNIOR_LEGAL = Paper('junior legal', 8*INCH, 5*INCH) #: LEDGER = Paper('ledger', 17*INCH, 11*INCH) #: TABLOID = Paper('tabloid', 11*INCH, 17*INCH) #: PAPER_BY_NAME = {paper.name.lower(): paper for paper in globals().values() if isinstance(paper, Paper)}
/rinohtype-0.5.4.tar.gz/rinohtype-0.5.4/src/rinoh/paper.py
0.741955
0.308841
paper.py
pypi
import string from ast import literal_eval from collections import OrderedDict, namedtuple from contextlib import suppress from itertools import chain from pathlib import Path from .attribute import (WithAttributes, AttributesDictionary, RuleSet, RuleSetFile, Configurable, DefaultValueException, Attribute, Bool) from .element import DocumentElement from .resource import Resource, ResourceNotFound from .util import (cached, all_subclasses, NotImplementedAttribute, class_property) from .warnings import warn __all__ = ['Style', 'Styled', 'StyledMeta', 'StyledMatcher', 'StyleSheet', 'StyleSheetFile', 'ClassSelector', 'ContextSelector', 'PARENT_STYLE'] class StyleMeta(WithAttributes): def __new__(mcls, classname, bases, cls_dict): if '__doc__' not in cls_dict: styled_class_name = classname.replace('Style', '') cls_dict['__doc__'] = ('Style class for :class:`.{}`' .format(styled_class_name)) return super().__new__(mcls, classname, bases, cls_dict) class Style(AttributesDictionary, metaclass=StyleMeta): """Dictionary storing style attributes. The style attributes associated with this :class:`Style` are specified as class attributes of type :class:`Attribute`. Style attributes can also be accessed as object attributes. """ hide = Attribute(Bool, False, 'Suppress rendering this element') def __init__(self, base=None, **attributes): """Style attributes are as passed as keyword arguments. Supported attributes are the :class:`Attribute` class attributes of this style class and those defined in style classes this one inherits from. Optionally, a `base` (:class:`Style`) is passed, where attributes are looked up when they have not been specified in this style. Alternatively, if `base` is :class:`PARENT_STYLE`, the attribute lookup is forwarded to the parent of the element the lookup originates from. If `base` is a :class:`str`, it is used to look up the base style in the :class:`StyleSheet` this style is defined in.""" super().__init__(base, **attributes) self.name = None def __repr__(self): """Return a textual representation of this style.""" return '{0}({1}) > {2}'.format(self.__class__.__name__, self.name or '', self.base) def __copy__(self): copy = self.__class__(base=self.base, **self) if self.name is not None: copy.name = self.name + ' (copy)' return copy def __getattr__(self, attribute): if attribute in self._supported_attributes: return self[attribute] else: return super().__getattr__(attribute) @classmethod def get_ruleset(self, document): return document.stylesheet class ExceptionalStyle(Style): """Style that raises an exception on item access""" string = None exception = NotImplementedError def __str__(self): return self.string def __getitem__(self, item): raise self.exception class ParentStyleException(Exception): pass class ParentStyle(ExceptionalStyle): """Style that forwards attribute lookups to the parent of the :class:`Styled` from which the lookup originates.""" string = 'PARENT_STYLE' exception = ParentStyleException class NextMatchException(Exception): pass class NextStyle(ExceptionalStyle): """Style that forwards attribute lookups to the next style in the style sheet that matches the :class:`Styled` from which the lookup originates.""" string = 'NEXT_STYLE' exception = NextMatchException PARENT_STYLE = ParentStyle() NEXT_STYLE = NextStyle() EXCEPTIONAL_STYLES = {PARENT_STYLE.string: PARENT_STYLE, NEXT_STYLE.string: NEXT_STYLE} class Selector(object): cls = NotImplementedAttribute def __truediv__(self, other): try: selectors = self.selectors + other.selectors except AttributeError: if isinstance(other, str): selectors = self.selectors + (SelectorByName(other), ) else: assert other == Ellipsis selectors = self.selectors + (EllipsisSelector(), ) return ContextSelector(*selectors) def __rtruediv__(self, other): assert isinstance(other, str) return SelectorByName(other) / self def __pos__(self): return self.pri(1) def __neg__(self): return self.pri(-1) def __eq__(self, other): return type(self) == type(other) and self.__dict__ == other.__dict__ def pri(self, priority): return SelectorWithPriority(self, priority) def get_styled_class(self, stylesheet_or_matcher): raise NotImplementedError def get_style_name(self, matcher): raise NotImplementedError @property def referenced_selectors(self): raise NotImplementedError def flatten(self, stylesheet): raise NotImplementedError def match(self, styled, stylesheet, document): raise NotImplementedError class SelectorWithPriority(Selector): def __init__(self, selector, priority): self.selector = selector self.priority = priority def pri(self, priority): return SelectorWithPriority(self.selector, self.priority + priority) def get_styled_class(self, stylesheet_or_matcher): return self.selector.get_styled_class(stylesheet_or_matcher) def get_style_name(self, matcher): return self.selector.get_style_name(matcher) @property def selectors(self): return (self, ) @property def referenced_selectors(self): return self.selector.referenced_selectors def flatten(self, stylesheet): flattened_selector = self.selector.flatten(stylesheet) return flattened_selector.pri(self.priority) def match(self, styled, stylesheet, document): score = self.selector.match(styled, stylesheet, document) if score: score = Specificity(self.priority, 0, 0, 0, 0) + score return score class EllipsisSelector(Selector): @property def selectors(self): return (self, ) @property def referenced_selectors(self): return yield def flatten(self, stylesheet): return self class SingleSelector(Selector): @property def selectors(self): return (self, ) class SelectorByName(SingleSelector): def __init__(self, name): self.name = name @property def referenced_selectors(self): yield self.name def flatten(self, stylesheet): return stylesheet.get_selector(self.name) def get_styled_class(self, stylesheet_or_matcher): selector = stylesheet_or_matcher.get_selector(self.name) return selector.get_styled_class(stylesheet_or_matcher) def get_style_name(self, matcher): selector = matcher.by_name[self.name] return selector.get_style_name(matcher) def match(self, styled, stylesheet, document): selector = stylesheet.get_selector(self.name) return selector.match(styled, stylesheet, document) class ClassSelectorBase(SingleSelector): def get_styled_class(self, stylesheet_or_matcher): return self.cls @property def referenced_selectors(self): return yield def flatten(self, stylesheet): return self def get_style_name(self, matcher): return self.style_name def match(self, styled, stylesheet, document): if not isinstance(styled, self.cls): return None class_match = 2 if type(styled) == self.cls else 1 style_match = 0 if self.style_name is not None: if styled.style != self.style_name: return None style_match = 1 attributes_match = 0 for attr, value in self.attributes.items(): if not hasattr(styled, attr): return None attr = getattr(styled, attr) if callable(attr): attr = attr(document) if attr != value: return None attributes_match += 1 return Specificity(0, 0, style_match, attributes_match, class_match) class ClassSelector(ClassSelectorBase): def __init__(self, cls, style_name=None, **attributes): super().__init__() self.cls = cls self.style_name = style_name self.attributes = attributes class ContextSelector(Selector): def __init__(self, *selectors): super().__init__() self.selectors = selectors @property def referenced_selectors(self): for selector in self.selectors: for name in selector.referenced_selectors: yield name def flatten(self, stylesheet): return type(self)(*(child_selector for selector in self.selectors for child_selector in selector.flatten(stylesheet).selectors)) def get_styled_class(self, stylesheet_or_matcher): return self.selectors[-1].get_styled_class(stylesheet_or_matcher) def get_style_name(self, matcher): return self.selectors[-1].get_style_name(matcher) def match(self, styled, stylesheet, document): def styled_and_parents(element): while element is not None: yield element element = element.parent raise NoMoreParentElement total_score = ZERO_SPECIFICITY selectors = reversed(self.selectors) elements = styled_and_parents(styled) for selector in selectors: try: element = next(elements) # NoMoreParentElement if isinstance(selector, EllipsisSelector): selector = next(selectors) # StopIteration while not selector.match(element, stylesheet, document): element = next(elements) # NoMoreParentElement except NoMoreParentElement: return None except StopIteration: break score = selector.match(element, stylesheet, document) if not score: return None total_score += score return total_score class NoMoreParentElement(Exception): """The top-level element in the document element tree has been reached""" class DocumentLocationType(type): def __gt__(cls, selector): return DocumentLocationSelector(cls, selector) def match(self, styled, container): raise NotImplementedError class DocumentLocationSelector(object): def __init__(self, location_class, selector): self.location_class = location_class self.selector = selector @property def referenced_selectors(self): return yield def get_styled_class(self, matcher): return self.selector.get_styled_class(matcher) def get_style_name(self, matcher): return self.selector.get_style_name(matcher) def match(self, styled, stylesheet): location_match = self.location_class.match(styled, stylesheet) if location_match: match = self.selector.match(styled, stylesheet) if match: return location_match + match return None class StyledMeta(type, ClassSelectorBase): attributes = {} style_name = None def __hash__(self): return hash(id(self)) @property def cls(cls): return cls def like(cls, style_name=None, **attributes): return ClassSelector(cls, style_name, **attributes) class Styled(DocumentElement, Configurable, metaclass=StyledMeta): """A document element who's style can be configured. Args: style (str, Style): the style to associate with this element. If `style` is a string, the corresponding style is lookup up in the document's style sheet by means of selectors. """ @class_property def configuration_class(cls): return cls.style_class style_class = None """The :class:`Style` subclass that corresponds to this :class:`Styled` subclass.""" def __init__(self, id=None, style=None, parent=None, source=None): """Associates `style` with this element. If `style` is `None`, an empty :class:`Style` is create, effectively using the defaults defined for the associated :class:`Style` class). A `parent` can be passed on object initialization, or later by assignment to the `parent` attribute.""" super().__init__(id=id, parent=parent, source=source) if (isinstance(style, Style) and not isinstance(style, (self.style_class, ParentStyle))): raise TypeError('the style passed to {} should be of type {} ' '(a {} was passed instead)' .format(self.__class__.__name__, self.style_class.__name__, style.__class__.__name__)) self.style = style self.annotation = None self.classes = [] def __eq__(self, other): return type(self) == type(other) and self.__dict__ == other.__dict__ def __ne__(self, other): return not self == other def short_repr(self, flowable_target): args = ', '.join(chain(self._short_repr_args(flowable_target), self._short_repr_kwargs(flowable_target))) return '{}({})'.format(type(self).__name__, args) def _short_repr_args(self, flowable_target): return () def _short_repr_kwargs(self, flowable_target): if self.id: yield "id='{}'".format(self.id) if isinstance(self.style, str): yield "style='{}'".format(self.style) elif isinstance(self.style, Style): yield 'style={}'.format(type(self.style).__name__) SHORT_REPR_STRING_LENGTH = 32 def _short_repr_string(self, flowable_target): text = self.to_string(flowable_target) if len(text) > self.SHORT_REPR_STRING_LENGTH: text = text[:self.SHORT_REPR_STRING_LENGTH] + '...' return "'{}'".format(text).replace('\n', '\\n') @property def path(self): parent = self.parent.path + ' > ' if self.parent else '' style = '[{}]'.format(self.style) if self.style else '' return parent + self.__class__.__name__ + style @property def nesting_level(self): try: return self.parent.nesting_level + 1 except AttributeError: return 0 def fallback_to_parent(self, attribute): return isinstance(self.style, ParentStyle) def get_annotation(self, container): return self.annotation @cached def get_style(self, attribute, container): if isinstance(self.style, Style): # FIXME: properly handle this try: # handling a PARENT_STYLE return self.style[attribute] # base (and other cases?) except KeyError: pass return self.get_config_value(attribute, container.document) @property def has_id(self): """Filter selection on an ID of this :class:`Styled`""" return HasID(self) @property def has_class(self): """Filter selection on a class of this :class:`Styled`""" return HasClass(self) @property def has_classes(self): """Filter selection on a set of classes of this :class:`Styled`""" return HasClasses(self) def before_placing(self, container, preallocate=False): if self.parent: self.parent.before_placing(container, preallocate) class HasID(object): def __init__(self, styled): self.styled = styled def __eq__(self, id): return id == self.styled.id or id in self.styled.secondary_ids class HasClass(object): def __init__(self, styled): self.styled = styled def __eq__(self, class_name): return class_name in self.styled.classes class HasClasses(object): def __init__(self, styled): self.styled = styled def __eq__(self, class_names): return set(class_names).issubset(self.styled.classes) class InvalidStyledMatcher(Exception): """The :class:`StyledMatcher` includes selectors which reference selectors which are not defined.""" def __init__(self, missing_selectors): self.missing_selectors = missing_selectors class StyledMatcher(dict): """Dictionary mapping labels to selectors. This matcher can be initialized in the same way as a :class:`python:dict` by passing a mapping, an interable and/or keyword arguments. """ def __init__(self, mapping_or_iterable=None, **kwargs): super().__init__() self.by_name = OrderedDict() self._pending = {} self.update(mapping_or_iterable, **kwargs) def __call__(self, name, selector): self[name] = selector return SelectorByName(name) def __setitem__(self, name, selector): assert name not in self is_pending = False for referenced_name in set(selector.referenced_selectors): if referenced_name not in self.by_name: pending_selectors = self._pending.setdefault(referenced_name, {}) pending_selectors[name] = selector is_pending = True if not is_pending: cls_selectors = self.setdefault(selector.get_styled_class(self), {}) style_name = selector.get_style_name(self) style_selectors = cls_selectors.setdefault(style_name, {}) self.by_name[name] = style_selectors[name] = selector self._process_pending(name) def _process_pending(self, newly_defined_name): if newly_defined_name in self._pending: self.update(self._pending.pop(newly_defined_name)) def get_selector(self, name): return self.by_name[name] def check_validity(self): if self._pending: raise InvalidStyledMatcher(list(self._pending.keys())) def update(self, iterable=None, **kwargs): for name, selector in dict(iterable or (), **kwargs).items(): self[name] = selector def match(self, styled, stylesheet, document): for cls in type(styled).__mro__: if cls not in self: continue style_str = styled.style if isinstance(styled.style, str) else None for style in set((style_str, None)): for name, selector in self[cls].get(style, {}).items(): selector = selector.flatten(stylesheet) specificity = selector.match(styled, stylesheet, document) if specificity: yield Match(name, specificity) class StyleSheet(RuleSet, Resource): """Dictionary storing a collection of related styles by name. :class:`Style`\\ s stored in a :class:`StyleSheet` can refer to their base style by name. Args: name (str): a label for this style sheet matcher (StyledMatcher): the matcher providing the selectors the styles contained in this style sheet map to. If no matcher is given and `base` is specified, the `base`\\ 's matcher is used. If `base` is not set, the default matcher is used. base (StyleSheet or str): the style sheet to extend description (str): a short string describing this style sheet pygments_style (str): the Pygments style to use for styling code blocks """ resource_type = 'stylesheet' main_section = 'STYLESHEET' extension = '.rts' def __init__(self, name, matcher=None, base=None, source=None, description=None, pygments_style=None, **user_options): from .highlight import pygments_style_to_stylesheet from .stylesheets import matcher as default_matcher base = self.from_string(base, self) if isinstance(base, str) else base if matcher is None: matcher = default_matcher if base is None else StyledMatcher() if matcher is not None: matcher.check_validity() if pygments_style: base = pygments_style_to_stylesheet(pygments_style, base) super().__init__(name, base=base, source=source) self.description = description self.matcher = matcher if user_options: warn('Unsupported options passed to stylesheet: {}' .format(', '.join(user_options.keys()))) self.user_options = user_options def __str__(self): for name, entry_point in self.installed_resources: if self is entry_point.load(): return name raise NotImplementedError @classmethod def parse_string(cls, string, source): with suppress(ResourceNotFound): return super().parse_string(string, source) return StyleSheetFile(string, source=source) @classmethod def doc_repr(cls, value): for name, ep in cls.installed_resources: if value is ep.load(): return ('``{}`` (= :data:`{}.{}`)' .format(name, *ep.value.split(':'))) raise NotImplementedError @classmethod def doc_format(cls): return ('the name of an :ref:`installed style sheet <included_style_' 'sheets>` or the filename of a stylesheet file (with the ' '``{}`` extension)'.format(cls.extension)) def _get_value_lookup(self, styled, attribute, document): try: for match in document.get_matches(styled): if match.stylesheet: # style is defined with suppress(NextMatchException): return self.get_value(match.style_name, attribute) raise DefaultValueException # no matching styles define attribute except DefaultValueException: # fallback to default style if not styled.fallback_to_parent(attribute): raise except ParentStyleException: # fallback to parent's style pass return self._get_value_lookup(styled.parent, attribute, document) def get_styled(self, name): return self.get_selector(name).get_styled_class(self) def get_entry_class(self, name): return self.get_styled(name).style_class def get_selector(self, name): """Find a selector mapped to a style in this or a base style sheet. Args: name (str): a style name Returns: :class:`.Selector`: the selector mapped to the style `name` Raises: KeyError: if the style `name` was not found in this or a base style sheet """ try: return self.matcher.by_name[name] except (AttributeError, KeyError): if self.base is not None: return self.base.get_selector(name) else: raise KeyError("No selector found for style '{}'".format(name)) def find_matches(self, styled, document): for match in self.matcher.match(styled, self, document): yield match if self.base is not None: yield from self.base.find_matches(styled, document) def write(self, base_filename): from configparser import ConfigParser config = ConfigParser(interpolation=None) config.add_section(self.main_section) main = config[self.main_section] main['name'] = self.name main['description'] = self.description or '' config.add_section('VARIABLES') variables = config['VARIABLES'] for name, value in self.variables.items(): variables[name] = str(value) for style_name, style in self.items(): classifier = ('' if style_name in self.matcher.by_name else ':' + type(style).__name__.replace('Style', '')) config.add_section(style_name + classifier) section = config[style_name + classifier] section['base'] = str(style.base) for name in type(style).supported_attributes: try: section[name] = str(style[name]) except KeyError: # default section[';' + name] = str(style._get_default(name)) with open(base_filename + self.extension, 'w') as file: config.write(file, space_around_delimiters=True) print(';Undefined styles:', file=file) for style_name, selector in self.matcher.by_name.items(): if style_name in self: continue print(';[{}]'.format(style_name), file=file) class StyleSheetFile(RuleSetFile, StyleSheet): """Loads styles defined in a `.rts` file (INI format). Args: filename (str): the path to the style sheet file :class:`StyleSheetFile` takes the same optional arguments as :class:`StyleSheet`. These can also be specified in the ``[STYLESHEET]`` section of the style sheet file. If an argument is specified in both places, the one passed as an argument overrides the one specified in the style sheet file. """ def process_section(self, style_name, selector, items): if selector: selector = parse_selector(selector) styled_class = selector.get_styled_class(self) if not isinstance(selector, StyledMeta): self.matcher[style_name] = selector try: matcher_styled = self.get_styled(style_name) if styled_class is not matcher_styled: raise TypeError("The type '{}' specified for style " "'{}' does not match the type '{}' " "returned by the matcher. Note that " "you do not have to specify the type " "in this case!" .format(selector.__name__, style_name, matcher_styled.__name__)) except KeyError: pass style_cls = styled_class.style_class else: try: style_cls = self.get_entry_class(style_name) except KeyError: warn("The style definition '{}' will be ignored since there" " is no selector defined for it in the matcher." .format(style_name)) return kwargs = dict(items) base = kwargs.pop('base', None) if base in EXCEPTIONAL_STYLES: base = EXCEPTIONAL_STYLES[base] self[style_name] = style_cls(base=base, **kwargs) class StyleParseError(Exception): pass def parse_selector(string): chars = CharIterator(string) selectors = [] while True: eat_whitespace(chars) first_char = chars.peek() if first_char in ("'", '"'): selector_name = parse_string(chars) selector = SelectorByName(selector_name) elif first_char == '.': assert next(chars) + next(chars) + next(chars) == '...' selector = EllipsisSelector() else: priority = 0 while chars.peek() in '+-': priority += 1 if next(chars) == '+' else -1 selector = parse_class_selector(chars) if priority != 0: selector = selector.pri(priority) selectors.append(selector) eat_whitespace(chars) try: next(chars) == '/' except StopIteration: break if len(selectors) == 1: return selectors[0] else: return ContextSelector(*selectors) def parse_class_selector(chars): styled_chars = [] eat_whitespace(chars) while chars.peek() and chars.peek() in string.ascii_letters: styled_chars.append(next(chars)) has_args = chars.peek() == '(' styled_name = ''.join(styled_chars) for selector in all_subclasses(Styled): if selector.__name__ == styled_name: break else: raise TypeError("Invalid styled class '{}'".format(styled_name)) if has_args: args, kwargs = parse_selector_args(chars) selector = selector.like(*args, **kwargs) return selector def parse_selector_args(chars): args, kwargs = [], {} if next(chars) != '(': raise StyleParseError('Expecting an opening brace') eat_whitespace(chars) while chars.peek() not in (None, ')'): argument, unknown_keyword = parse_value(chars) eat_whitespace(chars) if chars.peek() == '=': next(chars) keyword = argument if not unknown_keyword: raise StyleParseError("'{}' is not a valid keyword argument" .format(keyword)) eat_whitespace(chars) argument, unknown_keyword = parse_value(chars) kwargs[keyword] = argument elif kwargs: raise StyleParseError('Non-keyword argument cannot follow a ' 'keyword argument') else: args.append(argument) if unknown_keyword: raise StyleParseError("Unknown keyword '{}'".format(argument)) eat_whitespace(chars) if chars.peek() == ',': next(chars) eat_whitespace(chars) if chars.peek() is None or next(chars) != ')': raise StyleParseError('Expecting a closing brace') return args, kwargs def eat_whitespace(chars): while chars.peek() and chars.peek() in ' \t': next(chars) class CharIterator(str): def __init__(self, string): self.next_index = 0 def __iter__(self): return self def __next__(self): index = self.next_index self.next_index += 1 try: return self[index] except IndexError: raise StopIteration def match(self, chars): """Return all next characters that are listed in `chars` as a string""" start_index = self.next_index for char in self: if char not in chars: self.next_index -= 1 break return self[start_index:self.next_index] def peek(self): try: return self[self.next_index] except IndexError: return None def parse_value(chars): unknown_keyword = False first_char = chars.peek() if first_char in ("'", '"'): value = parse_string(chars) elif first_char.isnumeric() or first_char in '+-': value = parse_number(chars) else: value, unknown_keyword = parse_keyword(chars) return value, unknown_keyword def parse_string(chars): open_quote = next(chars) assert open_quote in '"\'' string_chars = [open_quote] escape_next = False for char in chars: string_chars.append(char) if char == '\\': escape_next = True continue elif not escape_next and char == open_quote: break escape_next = False else: raise StyleParseError('Did not encounter a closing ' 'quote while parsing string') return literal_eval(''.join(string_chars)) def parse_number(chars): return literal_eval(chars.match('0123456789.e+-')) def parse_keyword(chars): keyword = chars.match(string.ascii_letters + string.digits + '_') try: return KEYWORDS[keyword.lower()], False except KeyError: return keyword, True KEYWORDS = dict(true=True, false=False, none=None) class Specificity(namedtuple('Specificity', ['priority', 'location', 'style', 'attributes', 'klass'])): def __add__(self, other): return self.__class__(*(a + b for a, b in zip(self, other))) def __bool__(self): return any(self) class Match(object): def __init__(self, style_name, specificity): self.style_name = style_name self.specificity = specificity self.stylesheet = None def __gt__(self, other): return self.specificity > other.specificity def __bool__(self): return bool(self.specificity) ZERO_SPECIFICITY = Specificity(0, 0, 0, 0, 0) NO_MATCH = Match(None, ZERO_SPECIFICITY) class StyleLogEntry(object): def __init__(self, styled, container, matches, continued, custom_message=None): self.styled = styled self.container = container self.matches = matches self.continued = continued self.custom_message = custom_message @property def page_number(self): return self.container.page.formatted_number class StyleLog(object): def __init__(self, stylesheet): self.stylesheet = stylesheet self.entries = [] def log_styled(self, styled, container, continued, custom_message=None): matches = container.document.get_matches(styled) log_entry = StyleLogEntry(styled, container, matches, continued, custom_message) self.entries.append(log_entry) def log_out_of_line(self): raise NotImplementedError def write_log(self, document_source_root, filename_root): log_path = filename_root.parent / (filename_root.name + '.stylelog') with log_path.open('w', encoding='utf-8') as log: current_page = None current_container = None for entry in self.entries: if entry.page_number != current_page: current_page = entry.page_number log.write('{line} page {} {line}\n'.format(current_page, line='-' * 34)) container = entry.container if container.top_level_container is not current_container: current_container = container.top_level_container log.write("#### {}('{}')\n" .format(type(current_container).__name__, current_container.name)) styled = entry.styled level = styled.nesting_level attrs = OrderedDict() style = None indent = ' ' * level loc = '' if styled.source: try: filename, line, tag_name = styled.source.location except ValueError: loc = f' {styled.source.location}' else: if filename: try: filename, extra = filename.split(':') except ValueError: extra = None file_path = Path(filename) if file_path.is_absolute(): try: file_path = file_path.relative_to( document_source_root) except ValueError: pass loc = f' {file_path}' if line: loc += f':{line}' if extra: loc += f' ({extra})' if tag_name: loc += f' <{tag_name}>' continued_text = '(continued) ' if entry.continued else '' log.write(' {}{}{}{}' .format(indent, continued_text, styled.short_repr(container), loc)) if entry.custom_message: log.write('\n {} ! {}\n'.format(indent, entry.custom_message)) continue first = True if style is not None: first = False style_attrs = ', '.join(key + '=' + value for key, value in style.items()) log.write('\n {} > {}({})' .format(indent, attrs['style'], style_attrs)) if entry: for match in entry.matches: base = '' stylesheet = match.stylesheet if stylesheet: if first: label = '>' first = False else: label = ' ' name = match.style_name style = self.stylesheet.get_configuration(name) base_name = ("DEFAULT" if style.base is None else str(style.base)) base = f' > {base_name}' stylesheet_path = Path(stylesheet) if stylesheet_path.is_absolute(): stylesheet = stylesheet_path.relative_to( document_source_root) else: label = 'x' specificity = ','.join(str(score) for score in match.specificity) log.write('\n {} {} ({}) {}{}{}' .format(indent, label, specificity, match.style_name, f' [{stylesheet}]' if stylesheet else '', base)) log.write('\n')
/rinohtype-0.5.4.tar.gz/rinohtype-0.5.4/src/rinoh/style.py
0.825519
0.153771
style.py
pypi
import re from itertools import chain, zip_longest from .annotation import NamedDestinationLink from .attribute import Attribute, Bool, OptionSet, OverrideDefault from .flowable import (Flowable, LabeledFlowable, DummyFlowable, LabeledFlowableStyle) from .layout import ContainerOverflow from .number import NumberStyle, Label, format_number from .paragraph import Paragraph, ParagraphStyle, ParagraphBase from .strings import StringCollection, StringField from .style import HasClass, HasClasses, Styled from .text import (StyledText, TextStyle, SingleStyledText, MixedStyledTextBase, MixedStyledText, ErrorText) from .util import NotImplementedAttribute __all__ = ['Reference', 'ReferenceField', 'ReferenceText', 'ReferenceType', 'ReferencingParagraph', 'ReferencingParagraphStyle', 'Note', 'NoteMarkerBase', 'NoteMarkerByID', 'NoteMarkerWithNote', 'NoteMarkerStyle', 'Field', 'PAGE_NUMBER', 'NUMBER_OF_PAGES', 'SECTION_NUMBER', 'SECTION_TITLE', 'DOCUMENT_TITLE', 'DOCUMENT_SUBTITLE'] class ReferenceType(OptionSet): values = 'reference', 'number', 'title', 'page', 'custom' # examples for section "3.2 Some Title" # reference: Section 3.2 # number: 3.2 # title: Some Title # page: <number of the page on which section 3.2 starts> class ReferenceStyle(TextStyle, NumberStyle): type = Attribute(ReferenceType, ReferenceType.REFERENCE, 'How the reference should be displayed') link = Attribute(Bool, True, 'Create a hyperlink to the reference target') quiet = Attribute(Bool, False, 'If the given reference type does not exist' 'for the target, resolve to an empty string' 'instead of making a fuss about it') class ReferenceBase(MixedStyledTextBase): style_class = ReferenceStyle def __init__(self, type=None, custom_title=None, style=None, parent=None, source=None): super().__init__(style=style, parent=parent, source=source) self.type = type self.custom_title = custom_title if custom_title: custom_title.parent = self def __str__(self): result = "'{{{}}}'".format((self.type or 'none').upper()) if self.style is not None: result += ' ({})'.format(self.style) return result def copy(self, parent=None): return type(self)(self.type, self.custom_title, style=self.style, parent=parent, source=self.source) def target_id(self, document): raise NotImplementedError def is_title_reference(self, container): reference_type = self.type or self.get_style('type', container) return reference_type == ReferenceType.TITLE def children(self, container, type=None): document = container.document type = type or self.type or self.get_style('type', container) if container is None: return '$REF({})'.format(type) target_id = self.target_id(document) if type == ReferenceType.CUSTOM: yield self.custom_title return try: text = document.get_reference(target_id, type) except KeyError: if self.custom_title: text = self.custom_title elif self.get_style('quiet', container): text = '' else: self.warn(f"Target '{target_id}' has no '{type}' reference", container) text = ErrorText('??', parent=self) if type == ReferenceType.TITLE: # prevent infinite recursion document.title_targets.update(self.referenceable_ids) if target_id in document.title_targets: self.warn("Circular 'title' reference replaced with " "'reference' reference", container) yield from self.children(container, type='reference') return document.title_targets.add(target_id) yield (text.copy(parent=self) if isinstance(text, Styled) else SingleStyledText(text, parent=self)) document.title_targets.clear() def get_annotation(self, container): assert self.annotation is None if self.get_style('link', container): target_id = self.target_id(container.document) return NamedDestinationLink(str(target_id)) class Reference(ReferenceBase): def __init__(self, target_id, *args, **kwargs): super().__init__(*args, **kwargs) self._target_id = target_id def copy(self, parent=None): return type(self)(self._target_id, self.type, self.custom_title, style=self.style, parent=parent, source=self.source) def target_id(self, document): return self._target_id class DirectReference(ReferenceBase): def __init__(self, referenceable, type='number', **kwargs): super().__init__(type=type, **kwargs) self.referenceable = referenceable def target_id(self, document): return self.referenceable.get_id(document) class ReferenceField(ReferenceBase): def target_id(self, document): target_id_or_flowable = self.paragraph.target_id_or_flowable return (target_id_or_flowable.get_id(document) if isinstance(target_id_or_flowable, Flowable) else target_id_or_flowable) class ReferenceText(StyledText): RE_TYPES = re.compile('{(' + '|'.join(ReferenceType.values) + ')}', re.I) @classmethod def check_type(cls, value): return isinstance(value, (str, type(None), StyledText)) @classmethod def _substitute_variables(cls, text, style): return substitute_variables(text, cls.RE_TYPES, create_reference_field, super()._substitute_variables, style) def create_reference_field(key, style=None): return ReferenceField(key.lower(), style=style) class ReferencingParagraphStyle(ParagraphStyle): text = Attribute(ReferenceText, ReferenceField('title'), 'The text content of this paragraph') class ReferencingParagraph(ParagraphBase): style_class = ReferencingParagraphStyle def __init__(self, target_id_or_flowable, id=None, style=None, parent=None): super().__init__(id=id, style=style, parent=parent) self.target_id_or_flowable = target_id_or_flowable def text(self, container): return self.get_style('text', container).copy(parent=self) def _target_id(self, document): target_id_or_flowable = self.target_id_or_flowable return (target_id_or_flowable.get_id(document) if isinstance(target_id_or_flowable, Flowable) else target_id_or_flowable) def _target_flowable(self, document): return document.elements[self._target_id(document)] def target_style(self, document): """Filter selection on the ``style`` attribute of the target flowable""" return self._target_flowable(document).style def target_has_class(self, document): """Filter selection on a class of the target flowable""" return HasClass(self._target_flowable(document)) def target_has_classes(self, document): """Filter selection on a set of classes of the target flowable""" return HasClasses(self._target_flowable(document)) def target_is_of_type(self, document): """Filter selection on the type of the target flowable""" return IsOfType(self._target_flowable(document)) class IsOfType: def __init__(self, styled): self.styled = styled def __eq__(self, type_name): return type_name == type(self.styled).__name__ class NoteLocation(OptionSet): """Where a :class:`.Note` is placed""" values = 'in-place', 'footer' class NoteStyle(LabeledFlowableStyle): location = Attribute(NoteLocation, 'footer', 'Where to place the note') class Note(LabeledFlowable): category = 'Note' style_class = NoteStyle def __init__(self, flowable, id=None, style=None, parent=None): label = Paragraph(DirectReference(self)) super().__init__(label, flowable, id=id, style=style, parent=parent) def flow(self, container, last_descender, state=None, footnote=False, **kwargs): location = self.get_style('location', container) if not footnote and location == NoteLocation.FOOTER: return 0, 0, last_descender return super().flow(container, last_descender, state, **kwargs) class NoteMarkerStyle(ReferenceStyle): type = OverrideDefault(ReferenceType.NUMBER) class NoteMarkerBase(ReferenceBase, Label): style_class = NoteMarkerStyle def __init__(self, custom_label=None, **kwargs): super().__init__(**kwargs) Label.__init__(self, custom_label=custom_label) def prepare(self, flowable_target): document = flowable_target.document target_id = self.target_id(document) try: # set reference only once (notes can be referenced multiple times) document.get_reference(target_id, 'number') except KeyError: if self.get_style('custom_label', flowable_target): assert self.custom_label is not None label = self.custom_label else: number_format = self.get_style('number_format', flowable_target) counter = document.counters.setdefault(Note.category, []) counter.append(self) label = format_number(len(counter), number_format) formatted_label = self.format_label(label, flowable_target) document.set_reference(target_id, 'number', formatted_label) def before_placing(self, container, preallocate=False): note = container.document.elements[self.target_id(container.document)] if note.get_style('location', container) == NoteLocation.FOOTER: if not container._footnote_space.add_footnote(note, preallocate): raise ContainerOverflow super().before_placing(container, preallocate) class NoteMarkerByID(Reference, NoteMarkerBase): pass class NoteMarkerWithNote(DirectReference, NoteMarkerBase): def prepare(self, flowable_target): self.referenceable.prepare(flowable_target) super().prepare(flowable_target) class FieldTypeBase(object): name = NotImplementedAttribute() def __str__(self): return '{{{}}}'.format(self.key) @property def key(self): return self.name.upper().replace(' ', '_') class FieldType(FieldTypeBase): all = {} def __init__(self, name): super().__init__() self.name = name self.all[self.key] = self def __repr__(self): return "{}('{}')".format(self.__class__.__name__, self.name) @classmethod def from_string(cls, string): return cls.all[string.upper()] PAGE_NUMBER = FieldType('page number') NUMBER_OF_PAGES = FieldType('number of pages') DOCUMENT_TITLE = FieldType('document title') DOCUMENT_SUBTITLE = FieldType('document subtitle') DOCUMENT_AUTHOR = FieldType('document author') class SectionFieldTypeMeta(type): def __new__(metacls, classname, bases, cls_dict): cls = super().__new__(metacls, classname, bases, cls_dict) try: SectionFieldType.all[classname] = cls except NameError: pass return cls @property def key(cls): return cls.__name__ class SectionFieldType(FieldTypeBase, metaclass=SectionFieldTypeMeta): reference_type = None all = {} def __init__(self, level): super().__init__() self.level = level def __eq__(self, other): return type(self) == type(other) and self.__dict__ == other.__dict__ def __str__(self): return '{{{key}({level})}}'.format(key=self.key, level=self.level) def __repr__(self): return "{}({})".format(type(self).__name__, self.level) REGEX = re.compile(r'(?P<name>[a-z_]+)\((?P<level>\d+)\)', re.IGNORECASE) @classmethod def from_string(cls, string): m = cls.REGEX.match(string) section_field, level = m.group('name', 'level') return cls.all[section_field.upper()](int(level)) class SECTION_NUMBER(SectionFieldType): name = 'section number' reference_type = 'number' class SECTION_TITLE(SectionFieldType): name = 'section title' reference_type = 'title' from . import structure # fills StringCollection.subclasses RE_STRINGFIELD = ('|'.join(r'{}\.(?:[a-z_][a-z0-9_]*)' .format(collection_name) for collection_name in StringCollection.subclasses)) class Field(MixedStyledTextBase): def __init__(self, type, id=None, style=None, parent=None, source=None): super().__init__(id=id, style=style, parent=parent, source=source) self.type = type def __str__(self): result = "'{}'".format(self.type) if self.style is not None: result += ' ({})'.format(self.style) return result def __repr__(self): return "{0}({1})".format(self.__class__.__name__, repr(self.type)) @classmethod def parse_string(cls, string, style=None): try: field = FieldType.from_string(string) except KeyError: field = SectionFieldType.from_string(string) return cls(field, style=style) def copy(self, parent=None): return type(self)(self.type, style=self.style, parent=parent, source=self.source) def children(self, container): if container is None: text = '${}'.format(self.type) elif self.type == PAGE_NUMBER: text = container.page.formatted_number elif self.type == NUMBER_OF_PAGES: part = container.document_part text = format_number(part.number_of_pages, part.page_number_format) elif self.type == DOCUMENT_TITLE: text = container.document.get_metadata('title') elif self.type == DOCUMENT_SUBTITLE: text = container.document.get_metadata('subtitle') elif self.type == DOCUMENT_AUTHOR: text = container.document.get_metadata('author') elif isinstance(self.type, SectionFieldType): doc = container.document section = container.page.get_current_section(self.type.level) section_id = section.get_id(doc) if section else None if section_id: text = doc.get_reference(section_id, self.type.reference_type, '\N{ZERO WIDTH SPACE}') else: text = '\N{ZERO WIDTH SPACE}' else: text = '?' if text is None: return elif isinstance(text, Styled): yield text.copy(parent=self) else: yield SingleStyledText(text, parent=self) RE_FIELD = re.compile('{(' + '|'.join(chain(FieldType.all, (r'{}\(\d+\)'.format(name) for name in SectionFieldType.all))) + '|' + RE_STRINGFIELD + ')}', re.IGNORECASE) @classmethod def substitute(cls, text, substitute_others, style): def create_variable(key, style=None): try: return cls.parse_string(key.lower(), style=style) except AttributeError: return StringField.parse_string(key, style=style) return substitute_variables(text, cls.RE_FIELD, create_variable, substitute_others, style) def substitute_variables(text, split_regex, create_variable, substitute_others, style): def sub(parts): iter_parts = iter(parts) for other_text, variable_type in zip_longest(iter_parts, iter_parts): if other_text: yield substitute_others(other_text, style=None) if variable_type: yield create_variable(variable_type) parts = split_regex.split(text) if len(parts) == 1: # no variables return substitute_others(text, style=style) elif sum(1 for part in parts if part) == 1: # only a single variable variable_type, = (part for part in parts if part) return create_variable(variable_type, style=style) else: # variable(s) and text return MixedStyledText(sub(parts), style=style)
/rinohtype-0.5.4.tar.gz/rinohtype-0.5.4/src/rinoh/reference.py
0.604516
0.164148
reference.py
pypi
from contextlib import suppress from itertools import chain, takewhile from .attribute import Attribute, Bool, Integer, OverrideDefault from .draw import Line, LineStyle from .element import create_destination from .flowable import GroupedFlowables, StaticGroupedFlowables, WarnFlowable from .flowable import LabeledFlowable, GroupedLabeledFlowables from .flowable import Flowable, FlowableStyle, GroupedFlowablesStyle from .layout import PageBreakException from .number import NumberStyle, Label, LabelStyle, format_number from .paragraph import (ParagraphBase, StaticParagraph, Paragraph, ParagraphStyle) from .reference import (ReferenceField, ReferencingParagraph, ReferencingParagraphStyle) from .text import StyledText, SingleStyledText, MixedStyledText, Tab from .style import PARENT_STYLE from .strings import StringCollection, String, StringField from .util import NotImplementedAttribute, itemcount __all__ = ['Section', 'Heading', 'ListStyle', 'List', 'ListItem', 'ListItemLabel', 'DefinitionList', 'Header', 'Footer', 'TableOfContentsSection', 'TableOfContentsStyle', 'TableOfContents', 'ListOfStyle', 'TableOfContentsEntry', 'Admonition', 'AdmonitionStyle', 'AdmonitionTitleParagraph', 'HorizontalRule', 'HorizontalRuleStyle', 'OutOfLineFlowables'] class SectionTitles(StringCollection): """Collection of localized titles for common sections""" contents = String('Title for the table of contents section') list_of_figures = String('Title for the list of figures section') list_of_tables = String('Title for the list of tables section') chapter = String('Label for top-level sections') index = String('Title for the index section') class SectionStyle(GroupedFlowablesStyle): show_in_toc = Attribute(Bool, True, 'List this section in the table of ' 'contents') class NewChapterException(PageBreakException): pass class SectionBase(GroupedFlowables): style_class = SectionStyle break_exception = NewChapterException @property def category(self): return 'Chapter' if self.level == 1 else 'Section' @property def level(self): try: return self.parent.level + 1 except AttributeError: return 1 @property def section(self): return self def show_in_toc(self, container): parent_show_in_toc = (self.parent is None or self.parent.section is None or self.parent.section.show_in_toc(container)) return (self.get_style('show_in_toc', container) and not self.is_hidden(container) and parent_show_in_toc) def create_destination(self, container, at_top_of_container=False): pass # destination is set by the section's Heading class Section(StaticGroupedFlowables, SectionBase): """A subdivision of a document A section usually has a heading associated with it, which is optionally numbered. """ class HeadingStyle(ParagraphStyle): keep_with_next = OverrideDefault(True) numbering_level = OverrideDefault(-1) class Heading(StaticParagraph): """The title for a section Args: title (StyledText): this heading's text """ style_class = HeadingStyle has_title = True @property def referenceable(self): return self.section def prepare(self, container): super().prepare(container) container.document._sections.append(self.section) def flow(self, container, last_descender, state=None, **kwargs): if self.level == 1 and container.page.chapter_title: container.page.create_chapter_title(self) result = 0, 0, None else: result = super().flow(container, last_descender, state, **kwargs) return result def flow_inner(self, container, descender, state=None, **kwargs): result = super().flow_inner(container, descender, state=state, **kwargs) if not state.initial: create_destination(self.section, container, True) return result class ListStyle(GroupedFlowablesStyle, NumberStyle): ordered = Attribute(Bool, False, 'This list is ordered or unordered') bullet = Attribute(StyledText, SingleStyledText('\N{BULLET}'), 'Bullet to use in unordered lists') class List(GroupedLabeledFlowables, StaticGroupedFlowables): style_class = ListStyle def __init__(self, list_items, start_index=1, id=None, style=None, parent=None): super().__init__(list_items, id=id, style=style, parent=parent) self.start_index = start_index def index(self, item, container): items = filter(lambda itm: not itm.label.get_style('hide', container), takewhile(lambda li: li != item, self.children)) return self.start_index + itemcount(items) class ListItem(LabeledFlowable): def __init__(self, flowable, id=None, style=None, parent=None): label = ListItemLabel() super().__init__(label, flowable, id=id, style=style, parent=parent) class ListItemLabelStyle(ParagraphStyle, LabelStyle): pass class ListItemLabel(ParagraphBase, Label): style_class = ListItemLabelStyle def text(self, container): list_item = self.parent list = list_item.parent if list.get_style('ordered', container): index = list.index(list_item, container) number_format = list.get_style('number_format', container) label = format_number(index, number_format) else: label = list.get_style('bullet', container) return MixedStyledText(self.format_label(label, container), parent=self) class DefinitionList(GroupedLabeledFlowables, StaticGroupedFlowables): pass class Header(StaticParagraph): pass class Footer(StaticParagraph): pass class TableOfContentsStyle(GroupedFlowablesStyle, ParagraphStyle): depth = Attribute(Integer, 3, 'The number of section levels to include in ' 'the table of contents') def __init__(self, base=None, **attributes): super().__init__(base=base, **attributes) class TableOfContentsSection(Section): def __init__(self): section_title = StringField(SectionTitles, 'contents') super().__init__([Heading(section_title, style='unnumbered'), TableOfContents()], style='table of contents') def __repr__(self): return '{}()'.format(type(self).__name__) def get_id(self, document, create=True): try: return document.metadata['toc_ids'][0] except KeyError: return super().get_id(document, create) def get_ids(self, document): yield self.get_id(document) yield from document.metadata.get('toc_ids', [])[1:] class TableOfContents(GroupedFlowables): style_class = TableOfContentsStyle location = 'table of contents' def __init__(self, local=False, id=None, style=None, parent=None): super().__init__(id=id, style=style, parent=parent) self.local = local self.source = self def __repr__(self): args = ''.join(', {}={}'.format(name, repr(getattr(self, name))) for name in ('id', 'style') if getattr(self, name) is not None) return '{}(local={}{})'.format(type(self).__name__, self.local, args) def flowables(self, container): def limit_items(items, section): while next(items) is not section: # fast-forward `items` to the pass # first sub-section of `section` for item in items: if item.level <= section.level: break yield item depth = self.get_style('depth', container) if self.local and self.section: depth += self.level - 1 items = (section for section in container.document._sections if section.show_in_toc(container) and section.level <= depth) if self.local and self.section: items = limit_items(items, self.section) for section in items: yield TableOfContentsEntry(section, parent=self) class TableOfContentsEntryStyle(ReferencingParagraphStyle): text = OverrideDefault(ReferenceField('number') + Tab() + ReferenceField('title') + Tab() + ReferenceField('page')) class TableOfContentsEntry(ReferencingParagraph): style_class = TableOfContentsEntryStyle def __init__(self, flowable, id=None, style=None, parent=None): super().__init__(flowable, id=id, style=style, parent=parent) @property def depth(self): return self.target_id_or_flowable.level class ListOfSection(Section): list_class = NotImplementedAttribute() def __init__(self): key = 'list_of_{}s'.format(self.list_class.category.lower()) section_title = StringField(SectionTitles, key) self.list_of = self.list_class() super().__init__([Heading(section_title, style='unnumbered'), self.list_of], style='list of {}'.format(self.category)) def __repr__(self): return '{}()'.format(type(self).__name__) def is_hidden(self, container): return (super().is_hidden(container) or self.list_of.is_hidden(container)) class ListOfStyle(GroupedFlowablesStyle, ParagraphStyle): pass class ListOf(GroupedFlowables): category = NotImplementedAttribute() style_class = ListOfStyle def __init__(self, local=False, id=None, style=None, parent=None): super().__init__(id=id, style=style, parent=parent) self.local = local self.source = self def __repr__(self): args = ''.join(', {}={}'.format(name, repr(getattr(self, name))) for name in ('id', 'style') if getattr(self, name) is not None) return '{}(local={}{})'.format(type(self).__name__, self.local, args) @property def location(self): return 'List of {}s'.format(self.category) def is_hidden(self, container): try: next(self.flowables(container)) except StopIteration: return True return False def flowables(self, container): document = container.document category_counters = document.counters.get(self.category, {}) def limit_items(items, section): for item in items: # fast-forward `items` to the if item.section is section: # first sub-section of `section` yield item break for item in items: if not (item.section.level > section.level or item.section is section): break yield item def items_in_section(section): section_id = (section.get_id(document, create=False) if section else None) yield from category_counters.get(section_id, []) items = chain(items_in_section(None), *(items_in_section(section) for section in document._sections)) if self.local and self.section: items = limit_items(items, self.section) for caption in items: yield ListOfEntry(caption.referenceable, parent=self) class ListOfEntryStyle(ReferencingParagraphStyle): text = OverrideDefault(ReferenceField('reference') + ': ' + ReferenceField('title') + Tab() + ReferenceField('page')) class ListOfEntry(ReferencingParagraph): style_class = ListOfEntryStyle class AdmonitionStyle(GroupedFlowablesStyle): inline_title = Attribute(Bool, True, "Show the admonition's title inline " "with the body text, if possible") class AdmonitionTitles(StringCollection): """Collection of localized titles for common admonitions""" attention = String('Title for attention admonitions') caution = String('Title for caution admonitions') danger = String('Title for danger admonitions') error = String('Title for error admonitions') hint = String('Title for hint admonitions') important = String('Title for important admonitions') note = String('Title for note admonitions') tip = String('Title for tip admonitions') warning = String('Title for warning admonitions') seealso = String('Title for see-also admonitions') class Admonition(StaticGroupedFlowables): style_class = AdmonitionStyle def __init__(self, flowables, title=None, type=None, id=None, style=None, parent=None): super().__init__(flowables, id=id, style=style, parent=parent) self.custom_title = title self.admonition_type = type def title(self, document): return (self.custom_title or document.get_string(AdmonitionTitles, self.admonition_type)) def flowables(self, container): title = self.title(container.document) with suppress(AttributeError): title = title.copy() flowables = super().flowables(container) first_flowable = next(flowables) inline_title = self.get_style('inline_title', container) if inline_title and isinstance(first_flowable, Paragraph): title = MixedStyledText(title, style='inline title') kwargs = dict(id=first_flowable.id, style=first_flowable.style, source=first_flowable.source, parent=self) title_plus_content = title + first_flowable.content paragraph = AdmonitionTitleParagraph(title_plus_content, **kwargs) paragraph.secondary_ids = first_flowable.secondary_ids yield paragraph else: yield Paragraph(title, style='title', parent=self) yield first_flowable yield from flowables class AdmonitionTitleParagraph(Paragraph): pass class HorizontalRuleStyle(FlowableStyle, LineStyle): pass class HorizontalRule(Flowable): style_class = HorizontalRuleStyle def render(self, container, descender, state, **kwargs): width = float(container.width) line = Line((0, 0), (width, 0), parent=self) line.render(container) return width, 0, 0 class OutOfLineFlowables(GroupedFlowables): def __init__(self, name, align=None, width=None, id=None, style=None, parent=None): super().__init__(align=align, width=width, id=id, style=style, parent=parent) self.name = name def prepare(self, container): with suppress(KeyError): for flowable in container.document.supporting_matter[self.name]: flowable.parent = self def flowables(self, container): try: yield from container.document.supporting_matter[self.name] except KeyError: yield WarnFlowable("No out-of-line content is registered for " f"'{self.name}'", self)
/rinohtype-0.5.4.tar.gz/rinohtype-0.5.4/src/rinoh/structure.py
0.7586
0.22396
structure.py
pypi
from token import LPAR, RPAR from .attribute import Attribute, ParseError from .dimension import Dimension, PT from .element import DocumentElement from .flowable import Flowable, FlowableStyle from .layout import VirtualContainer from .style import StyledMeta from .text import InlineStyle, InlineStyled from .util import NotImplementedAttribute __all__ = ['InlineFlowableException', 'InlineFlowable', 'InlineFlowableStyle'] class InlineFlowableException(Exception): pass class InlineFlowableStyle(FlowableStyle, InlineStyle): baseline = Attribute(Dimension, 0*PT, "The location of the flowable's " "baseline relative to the bottom " "edge") class InlineFlowableMeta(StyledMeta): def __new__(mcls, classname, bases, cls_dict): cls = super().__new__(mcls, classname, bases, cls_dict) if classname == 'InlineFlowable': cls.directives = {} else: InlineFlowable.directives[cls.directive] = cls return cls class InlineFlowable(Flowable, InlineStyled, metaclass=InlineFlowableMeta): directive = None style_class = InlineFlowableStyle arguments = NotImplementedAttribute() def __init__(self, baseline=None, id=None, style=None, parent=None, source=None): super().__init__(id=id, style=style, parent=parent, source=source) self.baseline = baseline def to_string(self, flowable_target): return type(self).__name__ def font(self, document): raise InlineFlowableException def y_offset(self, document): return 0 @property def items(self): return [self] @classmethod def from_tokens(cls, tokens, source): directive = next(tokens).string.lower() try: inline_flowable_class = InlineFlowable.directives[directive] except KeyError: raise ParseError(f"Unknown inline flowable type '{directive}'") if next(tokens).exact_type != LPAR: raise ParseError('Expecting an opening parenthesis.') args, kwargs = inline_flowable_class.arguments.parse_arguments(tokens, source) if next(tokens).exact_type != RPAR: raise ParseError('Expecting a closing parenthesis.') return inline_flowable_class(*args, source=source, **kwargs) def spans(self, document): yield self def flow_inline(self, container, last_descender, state=None): baseline = self.baseline or self.get_style('baseline', container) virtual_container = VirtualContainer(container) width, _, _ = self.flow(virtual_container, last_descender, state=state) return InlineFlowableSpan(width, baseline, virtual_container) class InlineFlowableSpan(DocumentElement): number_of_spaces = 0 ends_with_space = False def __init__(self, width, baseline, virtual_container): super().__init__() self.width = width self.baseline = baseline self.virtual_container = virtual_container def font(self, document): raise InlineFlowableException @property def span(self): return self def height(self, document): return self.ascender(document) - self.descender(document) def ascender(self, document): baseline = self.baseline.to_points(self.virtual_container.height) if baseline > self.virtual_container.height: return 0 else: return self.virtual_container.height - baseline def descender(self, document): return min(0, - self.baseline.to_points(self.virtual_container.height)) def line_gap(self, document): return 0 def before_placing(self, container, preallocate=False): pass # TODO: get_style and word_to_glyphs may need proper implementations def get_style(self, attribute, document=None): pass def chars_to_glyphs(self, chars): return chars
/rinohtype-0.5.4.tar.gz/rinohtype-0.5.4/src/rinoh/inline.py
0.642769
0.236296
inline.py
pypi
from .attribute import Attribute, AcceptNoneAttributeType, ParseError from .color import Color, BLACK, GRAY90 from .style import Style, Styled from .dimension import Dimension, PT __all__ = ['Stroke', 'LineStyle', 'Line', 'ShapeStyle', 'Shape', 'Polygon', 'Rectangle'] class Stroke(AcceptNoneAttributeType): """The display properties of a line Args: width (Dimension): the width of the line color (Color): the color of the line """ def __init__(self, width, color): self.width = width self.color = color def __str__(self): return '{}, {}'.format(self.width, self.color) def __repr__(self): return '{}({}, {})'.format(type(self).__name__, repr(self.width), repr(self.color)) @classmethod def check_type(cls, value): if value and not (Dimension.check_type(value.width) and Color.check_type(value.color)): return False return super().check_type(value) @classmethod def parse_string(cls, string, source): try: width_str, color_str = (part.strip() for part in string.split(',')) except ValueError: raise ParseError('Expecting stroke width and color separated by a ' 'comma') width = Dimension.from_string(width_str) color = Color.from_string(color_str) return cls(width, color) @classmethod def doc_format(cls): return ('the width (:class:`.Dimension`) and color (:class:`.Color`) ' 'of the stroke, separated by a comma (``,``)') class LineStyle(Style): stroke = Attribute(Stroke, Stroke(1*PT, BLACK), 'Width and color used to ' 'draw the line') class Line(Styled): """Draws a line Args: start (2-tuple): coordinates for the start point of the line end (2-tuple): coordinates for the end point of the line """ style_class = LineStyle def __init__(self, start, end, style=None, parent=None): super().__init__(style=style, parent=parent) self.start = start self.end = end def render(self, container, offset=0): canvas, document = container.canvas, container.document stroke = self.get_style('stroke', container) if not stroke: return with canvas.save_state(): points = self.start, self.end canvas.line_path(points) canvas.stroke(stroke.width, stroke.color) class ShapeStyle(LineStyle): fill_color = Attribute(Color, GRAY90, 'Color to fill the shape') class Shape(Styled): """Base class for closed shapes""" style_class = ShapeStyle def __init__(self, style=None, parent=None): super().__init__(style=style, parent=parent) def render(self, canvas, offset=0): raise NotImplementedError class Polygon(Shape): def __init__(self, points, style=None, parent=None): super().__init__(style=style, parent=parent) self.points = points def render(self, container, offset=0): canvas = container.canvas stroke = self.get_style('stroke', container) fill_color = self.get_style('fill_color', container) if not (stroke or fill_color): return with canvas.save_state(): canvas.line_path(self.points) canvas.close_path() if stroke and fill_color: canvas.stroke_and_fill(stroke.width, stroke.color, fill_color) elif stroke: canvas.stroke(stroke.width, stroke.color) elif fill_color: canvas.fill(fill_color) class Rectangle(Polygon): def __init__(self, bottom_left, width, height, style=None, parent=None): bottom_right = (bottom_left[0] + width, bottom_left[1]) top_right = (bottom_left[0] + width, bottom_left[1] + height) top_left = (bottom_left[0], bottom_left[1] + height) points = bottom_left, bottom_right, top_right, top_left super().__init__(points, style=style, parent=parent)
/rinohtype-0.5.4.tar.gz/rinohtype-0.5.4/src/rinoh/draw.py
0.896984
0.301253
draw.py
pypi
import inspect import re import sys from .attribute import AcceptNoneAttributeType, ParseError from collections import OrderedDict from token import PLUS, MINUS, NUMBER, NAME, OP __all__ = ['Dimension', 'PT', 'PICA', 'INCH', 'MM', 'CM', 'PERCENT', 'QUARTERS'] class DimensionType(type): """Maps comparison operators to their equivalents in :class:`float`""" def __new__(mcs, name, bases, cls_dict): """Return a new class with predefined comparison operators""" for method_name in ('__lt__', '__le__', '__gt__', '__ge__'): if method_name not in cls_dict: cls_dict[method_name] = mcs._make_operator(method_name) return type.__new__(mcs, name, bases, cls_dict) @staticmethod def _make_operator(method_name): """Return an operator method that takes parameters of type :class:`Dimension`, evaluates them, and delegates to the :class:`float` operator with name `method_name`""" def operator(self, other): """Operator delegating to the :class:`float` method `method_name`""" float_operator = getattr(float, method_name) return float_operator(float(self), float(other)) return operator class DimensionBase(AcceptNoneAttributeType, metaclass=DimensionType): """Late-evaluated dimension The result of mathematical operations on dimension objects is not a statically evaluated version, but rather stores references to the operator arguments. The result is only evaluated to a number on conversion to a :class:`float`. The internal representation is in terms of PostScript points. A PostScript point is equal to one 72nd of an inch. """ def __neg__(self): return DimensionMultiplication(self, -1) def __add__(self, other): """Return the sum of this dimension and `other`.""" return DimensionAddition(self, other) __radd__ = __add__ def __sub__(self, other): """Return the difference of this dimension and `other`.""" return DimensionSubtraction(self, other) def __rsub__(self, other): """Return the difference of `other` and this dimension.""" return DimensionSubtraction(other, self) def __mul__(self, factor): """Return the product of this dimension and `factor`.""" return DimensionMultiplication(self, factor) __rmul__ = __mul__ def __truediv__(self, divisor): """Return the quotient of this dimension and `divisor`.""" return DimensionMultiplication(self, 1.0 / divisor) def __abs__(self): """Return the absolute value of this dimension (in points).""" return abs(float(self)) def __float__(self): """Evaluate the value of this dimension in points.""" raise NotImplementedError def __eq__(self, other): try: return float(self) == float(other) except (ValueError, TypeError): return False @classmethod def check_type(cls, value): return (super().check_type(value) or isinstance(value, Fraction) or value == 0) REGEX = re.compile(r"""(?P<value> [+-]? # optional sign \d*\.?\d+ # integer or float value ) \s* # optional space between value & unit (?P<unit> [a-z%/0-9]* # unit (can be an empty string) ) """, re.IGNORECASE | re.VERBOSE) @classmethod def from_tokens(cls, tokens, source): sign = 1 if tokens.next.exact_type in (PLUS, MINUS): sign = -1 if next(tokens).exact_type == MINUS else 1 token = next(tokens) if token.type != NUMBER: raise ParseError('Expecting a number') try: value = int(token.string) except ValueError: value = float(token.string) if tokens.next and tokens.next.type in (NAME, OP): unit_string = next(tokens).string elif value == 0: return Dimension(0) else: raise ParseError('Expecting a dimension unit') if unit_string == '/': unit_string += next(tokens).string try: unit = DimensionUnitBase.all[unit_string.lower()] except KeyError: raise ParseError("'{}' is not a valid dimension unit" .format(unit_string)) return sign * value * unit @classmethod def doc_format(cls): return ('a numeric value followed by a unit ({})' .format(', '.join('``{}``'.format(unit) for unit in DimensionUnitBase.all))) def to_points(self, total_dimension): """Convert this dimension to PostScript points If this dimension is context-sensitive, it will be evaluated relative to ``total_dimension``. This can be the total width available to a flowable, for example. Args: total_dimension (int, float or Dimension): the dimension providing context to a context-sensitive dimension. If int or float, it is assumed to have a unit of PostScript points. Returns: float: this dimension in PostScript points """ return float(self) class Dimension(DimensionBase): """A simple dimension Args: value (int or float): the magnitude of the dimension unit (DimensionUnit): the unit this dimension is expressed in. Default: :data:`PT`. """ # TODO: em, ex? (depends on context) def __init__(self, value=0, unit=None): self._value = value self._unit = unit or PT def __str__(self): number = '{:.2f}'.format(self._value).rstrip('0').rstrip('.') return '{}{}'.format(number, self._unit.label) def __repr__(self): for name, obj in inspect.getmembers(sys.modules[__name__]): if obj is self._unit: return '{}*{}'.format(self._value, name) else: raise ValueError def __float__(self): return float(self._value) * self._unit.points_per_unit def grow(self, value): """Grow this dimension (in-place) The ``value`` is interpreted as a magnitude expressed in the same unit as this dimension. Args: value (int or float): the amount to add to the magnitude of this dimension Returns: :class:`Dimension`: this (growed) dimension itself """ self._value += float(value) return self class DimensionAddition(DimensionBase): """The sum of a set of dimensions Args: addends (`Dimension`\\ s): """ def __init__(self, *addends): self.addends = list(addends) def __float__(self): return sum(map(float, self.addends or (0.0, ))) class DimensionSubtraction(DimensionBase): def __init__(self, minuend, subtrahend): self.minuend = minuend self.subtrahend = subtrahend def __float__(self): return float(self.minuend) - float(self.subtrahend) class DimensionMultiplication(DimensionBase): def __init__(self, multiplicand, multiplier): self.multiplicand = multiplicand self.multiplier = multiplier def __float__(self): return float(self.multiplicand) * self.multiplier class DimensionMaximum(DimensionBase): def __init__(self, *dimensions): self.dimensions = dimensions def __float__(self): return max(*(float(dimension) for dimension in self.dimensions)) class DimensionUnitBase(object): all = OrderedDict() def __init__(self, label): self.label = label self.all[label] = self class DimensionUnit(DimensionUnitBase): """A unit to express absolute dimensions in Args: points_per_unit (int or float): the number of PostScript points that fit in one unit label (str): label for the unit """ def __init__(self, points_per_unit, label): super().__init__(label) self.points_per_unit = float(points_per_unit) def __repr__(self): return '{}({}, {})'.format(type(self).__name__, self.points_per_unit, repr(self.label)) def __rmul__(self, value): return Dimension(value, self) # Units PT = DimensionUnit(1, 'pt') #: PostScript points INCH = DimensionUnit(72*PT, 'in') #: imperial/US inch PICA = DimensionUnit(1 / 6 * INCH, 'pc') #: computer pica MM = DimensionUnit(1 / 25.4 * INCH, 'mm') #: millimeter CM = DimensionUnit(10*MM, 'cm') #: centimeter class Fraction(DimensionBase): """A context-sensitive dimension This fraction is multiplied by the reference dimension when evaluating it using :meth:`to_points`. Args: numerator (int or float): the numerator of the fraction unit (FractionUnit): the fraction unit """ def __init__(self, numerator, unit): self._numerator = numerator self._unit = unit def __str__(self): number = '{:.2f}'.format(self._numerator).rstrip('0').rstrip('.') return '{}{}'.format(number, self._unit.label) __eq__ = AcceptNoneAttributeType.__eq__ def to_points(self, total_dimension): fraction = self._numerator / self._unit.denominator return fraction * float(total_dimension) class FractionUnit(DimensionUnitBase): """A unit to express relative dimensions in Args: denominator (int or float): the number of parts to divide the whole in label (str): label for the unit """ def __init__(self, denominator, label): super().__init__(label) self.denominator = denominator def __repr__(self): return '{}({}, {})'.format(type(self).__name__, self.denominator, repr(self.label)) def __rmul__(self, nominator): return Fraction(nominator, self) PERCENT = FractionUnit(100, '%') #: fraction of 100 HALVES = FractionUnit(2, '/2') #: fraction of 2 QUARTERS = FractionUnit(4, '/4') #: fraction of 4
/rinohtype-0.5.4.tar.gz/rinohtype-0.5.4/src/rinoh/dimension.py
0.754915
0.42185
dimension.py
pypi
from .annotation import NamedDestination from .warnings import warn __all__ = ['DocumentElement'] class DocumentElement(object): """A element part of the document to be rendered Args: id (str): unique identifier for referencing this element parent (DocumentElement): element of which this element is a child source (Source): object identifying where this document element is defined; used for resolving relative paths, logging or error reporting """ def __init__(self, id=None, parent=None, source=None): self.id = id self.secondary_ids = [] self.parent = parent self.source = source @property def source_root(self): element = self while element: if element.source: return element.source.root element = element.parent def get_id(self, document, create=True): try: return self.id or document.ids_by_element[self] except KeyError: if create: return document.register_element(self) def get_ids(self, document): primary_id = self.get_id(document) yield primary_id for id in self.secondary_ids: yield id @property def elements(self): yield self def build_document(self, flowable_target): """Set document metadata and populate front and back matter""" pass def prepare(self, flowable_target): """Determine number labels and register references with the document""" if self.get_id(flowable_target.document, create=False): flowable_target.document.register_element(self) def create_destination(self, container, at_top_of_container=False): """Create a destination anchor in the `container` to direct links to this :class:`DocumentElement` to.""" create_destination(self, container, at_top_of_container) def warn(self, message, container=None): """Present the warning `message` to the user, adding information on the location of the related element in the input file.""" if self.source is not None: message = '[{}:{} <{}>] '.format(*self.source.location) + message if container is not None: try: message += ' (page {})'.format(container.page.formatted_number) except AttributeError: pass warn(message) def create_destination(flowable, container, at_top_of_container=False): """Create a destination anchor in the `container` to direct links to `flowable` to.""" vertical_position = 0 if at_top_of_container else container.cursor ids = flowable.get_ids(container.document) destination = NamedDestination(*(str(id) for id in ids)) container.canvas.annotate(destination, 0, vertical_position, container.width, None) container.document.register_page_reference(container.page, flowable)
/rinohtype-0.5.4.tar.gz/rinohtype-0.5.4/src/rinoh/element.py
0.814901
0.170439
element.py
pypi
import re from ast import literal_eval from html.entities import name2codepoint from token import NAME, STRING, NEWLINE, LPAR, RPAR, ENDMARKER from .annotation import AnchorAnnotation, LinkAnnotation, AnnotatedSpan from .attribute import (AttributeType, AcceptNoneAttributeType, Attribute, Bool, Integer, ParseError) from .color import Color, BLACK, RED from .dimension import Dimension, PT from .font import Typeface from .fonts import adobe14 from .font.style import (FontWeight, FontSlant, FontWidth, FontVariant, TextPosition) from .style import Style, Styled, StyledMeta from .util import NotImplementedAttribute __all__ = ['InlineStyle', 'InlineStyled', 'TextStyle', 'StyledText', 'WarnInline', 'SingleStyledText', 'MixedStyledText', 'ConditionalMixedStyledText', 'Space', 'FixedWidthSpace', 'NoBreakSpace', 'Spacer', 'Tab', 'Newline', 'Superscript', 'Subscript'] class Locale(AttributeType): """Selects a language""" REGEX = re.compile(r'^[a-z]{2}_[A-Z]{2}$') @classmethod def check_type(cls, value): return cls.REGEX.match(value) is not None @classmethod def from_tokens(cls, tokens, source): token = next(tokens) if not cls.check_type(token.string): raise ValueError("'{}' is not a valid locale. Needs to be of the " "form 'en_US'.".format(token.string)) return token.string @classmethod def doc_format(cls): return 'locale identifier in the ``<language ID>_<region ID>`` format' LANGUAGE_DEFAULT = 'language-default' class NoBreakAfter(AttributeType, list): """List of words after which no line break will be allowed""" def __str__(self): return ', '.join(str(word) for word in self) @classmethod def check_type(cls, value): return (value == LANGUAGE_DEFAULT or (isinstance(value, (list, tuple)) and all(isinstance(item, str) for item in value))) @classmethod def from_string(cls, string, source=None): if string.strip().lower() == LANGUAGE_DEFAULT: return LANGUAGE_DEFAULT return string.split() @classmethod def doc_format(cls): return f'``{LANGUAGE_DEFAULT}``, or a space-separated list of words' class InlineStyled(Styled): """""" @property def referenceable_ids(self): try: return self.parent.referenceable_ids except AttributeError: return [self.parent.referenceable.id, *self.parent.referenceable.secondary_ids] def _annotated_spans(self, container): spans = self.spans(container) ann = self.get_annotation(container) if not ann: yield from spans return anchor = ann if isinstance(ann, AnchorAnnotation) else None link = ann if isinstance(ann, LinkAnnotation) else None for span in spans: if isinstance(span, AnnotatedSpan): if anchor and not span.anchor_annotation: span.anchor_annotation = anchor elif link and not span.link_annotation: span.link_annotation = link yield span else: yield AnnotatedSpan(span, anchor=anchor, link=link) def wrapped_spans(self, container): """Generator yielding all spans in this inline element (flattened)""" before = self.get_style('before', container) if before is not None: yield from before.copy(self.parent).wrapped_spans(container) if not self.get_style('hide', container): yield from self._annotated_spans(container) after = self.get_style('after', container) if after is not None: yield from after.copy(self.parent).wrapped_spans(container) def is_title_reference(self, container): return False def copy(self, parent=None): raise NotImplementedError def spans(self, container): raise NotImplementedError class CharacterLike(Styled): def __repr__(self): return "{0}(style={1})".format(self.__class__.__name__, self.style) @property def width(self): raise NotImplementedError def height(self, document): raise NotImplementedError def render(self): raise NotImplementedError NAME2CHAR = {name: chr(codepoint) for name, codepoint in name2codepoint.items()} class StyledText(InlineStyled, AcceptNoneAttributeType): """Base class for text that has a :class:`TextStyle` associated with it.""" def __add__(self, other): """Return the concatenation of this styled text and `other`. If `other` is `None`, this styled text itself is returned.""" return MixedStyledText([self, other]) if other is not None else self def __radd__(self, other): """Return the concatenation of `other` and this styled text. If `other` is `None`, this styled text itself is returned.""" return MixedStyledText([other, self]) if other is not None else self def __iadd__(self, other): """Return the concatenation of this styled text and `other`. If `other` is `None`, this styled text itself is returned.""" return self + other @classmethod def check_type(cls, value): return super().check_type(value) or isinstance(value, str) @classmethod def from_tokens(cls, tokens, source): items = [] while tokens.next.type: if tokens.next.type == NAME: items.append(InlineFlowable.from_tokens(tokens, source)) elif tokens.next.type == STRING: items.append(cls.text_from_tokens(tokens)) elif tokens.next.type == NEWLINE: next(tokens) elif tokens.next.type == ENDMARKER: break else: raise StyledTextParseError('Expecting text or inline flowable') if len(items) == 1: first, = items return first return MixedStyledText(items, source=source) @classmethod def text_from_tokens(cls, tokens): text = literal_eval(next(tokens).string) if tokens.next.exact_type == LPAR: _, start_col = next(tokens).end for token in tokens: if token.exact_type == RPAR: _, end_col = token.start style = token.line[start_col:end_col].strip() break elif token.type == NEWLINE: raise StyledTextParseError('No newline allowed in ' 'style name') else: style = None return cls._substitute_variables(text, style) @classmethod def doc_repr(cls, value): return '``{}``'.format(value) if value else '(no value)' @classmethod def doc_format(cls): return ("a list of styled text strings, separated by spaces. A styled " "text string is a quoted string (``'`` or ``\"``), optionally " "followed by a style name enclosed in braces: " "``'text string' (style name)``") @classmethod def validate(cls, value): if isinstance(value, str): value = SingleStyledText(value) return super().validate(value) @classmethod def _substitute_variables(cls, text, style): def substitute_controlchars_htmlentities(string, style=None): try: return ControlCharacter.all[string]() except KeyError: return SingleStyledText(string.format(**NAME2CHAR), style=style) return Field.substitute(text, substitute_controlchars_htmlentities, style=style) def __str__(self): return self.to_string(None) def _short_repr_args(self, flowable_target): yield self._short_repr_string(flowable_target) def to_string(self, flowable_target): """Return the text content of this styled text.""" raise NotImplementedError('{}.to_string'.format(type(self).__name__)) @property def paragraph(self): return self.parent.paragraph def fallback_to_parent(self, attribute): return attribute not in ('position', 'before', 'after') position = {TextPosition.SUPERSCRIPT: 1 / 3, TextPosition.SUBSCRIPT: - 1 / 6} position_size = 583 / 1000 def is_script(self, container): """Returns `True` if this styled text is super/subscript.""" position = self.get_style('position', container) return position != TextPosition.NORMAL def script_level(self, container): """Nesting level of super/subscript.""" try: level = self.parent.script_level(container) except AttributeError: level = -1 return level + 1 if self.is_script(container) else level def height(self, container): """Font size after super/subscript size adjustment.""" height = float(self.get_style('font_size', container)) script_level = self.script_level(container) if script_level > -1: height *= self.position_size * (5 / 6)**script_level return height def y_offset(self, container): """Vertical baseline offset (up is positive).""" offset = (self.parent.y_offset(container) if hasattr(self.parent, 'y_offset') else 0) if self.is_script(container): position = self.get_style('position', container) offset += self.parent.height(container) * self.position[position] return offset @property def items(self): """The list of items in this StyledText.""" return [self] class StyledTextParseError(ParseError): pass class InlineStyle(Style): before = Attribute(StyledText, None, 'Item to insert before this one') after = Attribute(StyledText, None, 'Item to insert after this one') InlineStyled.style_class = InlineStyle class TextStyle(InlineStyle): typeface = Attribute(Typeface, adobe14.times, 'Typeface to set the text in') font_weight = Attribute(FontWeight, 'medium', 'Thickness of character ' 'outlines relative to their ' 'height') font_slant = Attribute(FontSlant, 'upright', 'Slope style of the font') font_width = Attribute(FontWidth, 'normal', 'Stretch of the characters') font_size = Attribute(Dimension, 10*PT, 'Height of characters') font_color = Attribute(Color, BLACK, 'Color of the font') font_variant = Attribute(FontVariant, 'normal', 'Variant of the font') # TODO: text_case = Attribute(TextCase, None, 'Change text casing') position = Attribute(TextPosition, 'normal', 'Vertical text position') kerning = Attribute(Bool, True, 'Improve inter-letter spacing') ligatures = Attribute(Bool, True, 'Run letters together where possible') # TODO: character spacing hyphenate = Attribute(Bool, True, 'Allow words to be broken over two lines') hyphen_chars = Attribute(Integer, 2, 'Minimum number of characters in a ' 'hyphenated part of a word') hyphen_lang = Attribute(Locale, 'en_US', 'Language to use for hyphenation. ' 'Accepts locale codes such as ' "'en_US'") no_break_after = Attribute(NoBreakAfter, LANGUAGE_DEFAULT, 'Prevent a line break after these words') StyledText.style_class = TextStyle class WarnInline(StyledText): """Inline element that emits a warning Args: message (str): the warning message to emit """ def __init__(self, message, parent=None): super().__init__(parent=parent) self.message = message def to_string(self, flowable_target): return '' def spans(self, container): self.warn(self.message, container) return iter([]) class SingleStyledTextBase(StyledText): """Styled text where all text shares a single :class:`TextStyle`.""" def __repr__(self): """Return a representation of this single-styled text; the text string along with a representation of its :class:`TextStyle`.""" return "{0}('{1}', style={2})".format(self.__class__.__name__, self.text(None), self.style) def text(self, flowable_target, **kwargs): raise NotImplementedError def to_string(self, flowable_target): return self.text(flowable_target) def font(self, container): """The :class:`Font` described by this single-styled text's style. If the exact font style as described by the `font_weight`, `font_slant` and `font_width` style attributes is not present in the `typeface`, the closest font available is returned instead, and a warning is printed.""" typeface = self.get_style('typeface', container) weight = self.get_style('font_weight', container) slant = self.get_style('font_slant', container) width = self.get_style('font_width', container) return typeface.get_font(weight=weight, slant=slant, width=width) def ascender(self, container): return (self.font(container).ascender_in_pt * float(self.get_style('font_size', container))) def descender(self, container): return (self.font(container).descender_in_pt * float(self.get_style('font_size', container))) def line_gap(self, container): return (self.font(container).line_gap_in_pt * float(self.get_style('font_size', container))) def spans(self, container): yield self ESCAPE = str.maketrans({"'": r"\'", '\n': r'\n', '\t': r'\t'}) class SingleStyledText(SingleStyledTextBase): """Text with a single style applied""" def __init__(self, text, style=None, parent=None, source=None): super().__init__(style=style, parent=parent, source=source) self._text = text def __str__(self): result = "'{}'".format(self._text.translate(ESCAPE)) if self.style is not None: result += ' ({})'.format(self.style) return result def text(self, container, **kwargs): return self._text def copy(self, parent=None): return type(self)(self._text, style=self.style, parent=parent, source=self.source) class MixedStyledTextBase(StyledText): def to_string(self, flowable_target): return ''.join(item.to_string(flowable_target) for item in self.children(flowable_target)) def spans(self, container): """Recursively yield all the :class:`SingleStyledText` items in this mixed-styled text.""" for child in self.children(container): container.register_styled(child) yield from child.wrapped_spans(container) def children(self, flowable_target): raise NotImplementedError class MixedStyledText(MixedStyledTextBase, list): """Concatenation of styled text Args: text_or_items (str, StyledText or iterable of these): mixed styled text style: see :class:`.Styled` parent: see :class:`.DocumentElement` """ _assumed_equal = {} def __init__(self, text_or_items, id=None, style=None, parent=None, source=None): """Initialize this mixed-styled text as the concatenation of `text_or_items`, which is either a single text item or an iterable of text items. Individual text items can be :class:`StyledText` or :class:`str` objects. This mixed-styled text is set as the parent of each of the text items. See :class:`StyledText` for information on `style`, and `parent`.""" super().__init__(id=id, style=style, parent=parent, source=source) if isinstance(text_or_items, (str, StyledText)): text_or_items = (text_or_items, ) for item in text_or_items: self.append(item) def __add__(self, other): if isinstance(other, str): other = SingleStyledText(other) if self.style == other.style: return MixedStyledText(self.items + other.items, style=self.style, parent=self.parent) else: return super().__add__(other) def __repr__(self): """Return a representation of this mixed-styled text; its children along with a representation of its :class:`TextStyle`.""" return '{}{} (style={})'.format(self.__class__.__name__, super().__repr__(), self.style) def __str__(self): assert self.style is None return ' '.join(str(item) for item in self) def __eq__(self, other): # avoid infinite recursion due to the 'parent' attribute assumed_equal = type(self)._assumed_equal.setdefault(id(self), set()) other_id = id(other) if other_id in assumed_equal: return True try: assumed_equal.add(other_id) return super().__eq__(other) and list.__eq__(self, other) finally: assumed_equal.remove(other_id) def prepare(self, flowable_target): super().prepare(flowable_target) for item in self: item.prepare(flowable_target) def append(self, item): """Append `item` (:class:`StyledText` or :class:`str`) to the end of this mixed-styled text. The parent of `item` is set to this mixed-styled text.""" if isinstance(item, str): item = SingleStyledText(item) item.parent = self list.append(self, item) @property def items(self): return list(self) def children(self, flowable_target): return self.items def copy(self, parent=None): items = [item.copy() for item in self.items] return type(self)(items, style=self.style, parent=parent, source=self.source) class ConditionalMixedStyledText(MixedStyledText): def __init__(self, text_or_items, document_option, style=None, parent=None): super().__init__(text_or_items, style=style, parent=parent) self.document_option = document_option def spans(self, container): if container.document.options[self.document_option]: for span in super().spans(container): yield span class Character(SingleStyledText): """:class:`SingleStyledText` consisting of a single character.""" class Space(Character): """A space character.""" def __init__(self, fixed_width=False, style=None, parent=None): """Initialize this space. `fixed_width` specifies whether this space can be stretched (`False`) or not (`True`) in justified paragraphs. See :class:`StyledText` about `style` and `parent`.""" super().__init__(' ', style=style, parent=parent) self.fixed_width = fixed_width class FixedWidthSpace(Space): """A fixed-width space character.""" def __init__(self, style=None, parent=None): """Initialize this fixed-width space with `style` and `parent` (see :class:`StyledText`).""" super().__init__(True, style=style, parent=parent) class NoBreakSpace(Character): """Non-breaking space character. Lines cannot wrap at a this type of space.""" def __init__(self, style=None, parent=None): """Initialize this non-breaking space with `style` and `parent` (see :class:`StyledText`).""" super().__init__(' ', style=style, parent=parent) class Spacer(FixedWidthSpace): """A space of a specific width.""" def __init__(self, width, style=None, parent=None): """Initialize this spacer at `width` with `style` and `parent` (see :class:`StyledText`).""" super().__init__(style=style, parent=parent) self._width = width def widths(self): """Generator yielding the width of this spacer.""" yield float(self._width) class Box(Character): def __init__(self, width, height, depth, ps): super().__init__('?') self._width = width self._height = height self.depth = depth self.ps = ps @property def width(self): return self._width def height(self, document): return self._height def render(self, canvas, x, y): box_canvas = canvas.new(x, y - self.depth, self.width, self.height + self.depth) print(self.ps, file=box_canvas.psg_canvas) canvas.append(box_canvas) return self.width class ControlCharacterMeta(StyledMeta): def __new__(metacls, classname, bases, cls_dict): cls = super().__new__(metacls, classname, bases, cls_dict) try: ControlCharacter.all[cls.character] = cls except NameError: pass return cls class ControlCharacter(Character, metaclass=ControlCharacterMeta): """A non-printing character that affects typesetting of the text near it.""" character = NotImplementedAttribute() exception = Exception all = {} def __init__(self, style=None, parent=None, source=None): """Initialize this control character with it's unicode `char`.""" super().__init__(self.character, style=style, parent=parent, source=source) def __repr__(self): """A textual representation of this control character.""" return self.__class__.__name__ def copy(self, parent=None): return type(self)(style=self.style, parent=parent, source=self.source) @property def width(self): """Raises the exception associated with this control character. This method is called during typesetting.""" raise self.exception class NewlineException(Exception): """Exception signaling a :class:`Newline`.""" class Newline(ControlCharacter): """Control character ending the current line and starting a new one.""" character = '\n' exception = NewlineException class Tab(ControlCharacter): """Tabulator character, used for vertically aligning text. The :attr:`tab_width` attribute is set a later point in time when context (:class:`TabStop`) is available.""" character = '\t' # predefined text styles SUPERSCRIPT_STYLE = TextStyle(position='superscript') SUBSCRIPT_STYLE = TextStyle(position='subscript') class Superscript(MixedStyledText): """Superscript.""" def __init__(self, text, parent=None, source=None): """Accepts a single instance of :class:`str` or :class:`StyledText`, or an iterable of these.""" super().__init__(text, style=SUPERSCRIPT_STYLE, parent=parent, source=source) class Subscript(MixedStyledText): """Subscript.""" def __init__(self, text, parent=None, source=None): """Accepts a single instance of :class:`str` or :class:`StyledText`, or an iterable of these.""" super().__init__(text, style=SUBSCRIPT_STYLE, parent=parent, source=source) ERROR_STYLE = TextStyle(font_color=RED) class ErrorText(SingleStyledText): def __init__(self, text, style=ERROR_STYLE, parent=None, source=None): super().__init__(text, style=style, parent=parent, source=source) from .reference import Field from .inline import InlineFlowable
/rinohtype-0.5.4.tar.gz/rinohtype-0.5.4/src/rinoh/text.py
0.78403
0.154344
text.py
pypi
import os from ast import literal_eval from pathlib import Path from token import LPAR, RPAR, NAME, EQUAL, NUMBER, ENDMARKER, STRING, COMMA from .attribute import (Attribute, AttributesDictionary, OverrideDefault, AcceptNoneAttributeType, OptionSet, Integer, ParseError) from .dimension import Dimension, PERCENT from .flowable import (Flowable, FlowableState, HorizontalAlignment, FlowableWidth, StaticGroupedFlowables, GroupedFlowablesStyle, Float, FloatStyle) from .inline import InlineFlowable from .layout import ContainerOverflow, EndOfContainer from .number import NumberFormat from .paragraph import StaticParagraph, Paragraph, ParagraphStyle from .structure import ListOf, ListOfSection from .text import MixedStyledText, SingleStyledText, TextStyle, ErrorText from .util import posix_path, ReadAliasAttribute, PeekIterator __all__ = ['Image', 'InlineImage', 'BackgroundImage', 'ImageArgs', 'Scale', 'Caption', 'CaptionStyle', 'Figure', 'FigureStyle', 'ListOfFiguresSection', 'ListOfFigures'] class Scale(OptionSet): """Scaling factor for images Can be a numerical value where a value of 1 keeps the image's original size or one of :attr:`values`. """ values = 'fit', 'fill' @classmethod def check_type(cls, value): return super().check_type(value) or value > 0 @classmethod def from_tokens(cls, tokens, source): if tokens.next.type == NAME: value = super().from_tokens(tokens, source) elif tokens.next.type == NUMBER: value = float(next(tokens).string) if not cls.check_type(value): raise ParseError('Scale factor should be larger than 0') else: raise ParseError('Expecting scale option name or number') return value @classmethod def doc_format(cls): return ('{} or a float larger than 0' .format(', '.join('``{}``'.format(s) for s in cls.value_strings))) class ImageState(FlowableState): image = ReadAliasAttribute('flowable') class Filename(str): """str subclass that provides system-independent path comparison""" def __eq__(self, other): return posix_path(str(self)) == posix_path(str(other)) def __ne__(self, other): return not (self == other) class RequiredArg(Attribute): def __init__(self, accepted_type, description): super().__init__(accepted_type, None, description) class OptionalArg(Attribute): pass class ImagePath(AcceptNoneAttributeType): @classmethod def from_tokens(cls, tokens, source): token = next(tokens) if token.type != STRING: raise ParseError('Expecting a string') return literal_eval(token.string) @classmethod def doc_format(cls): return ('path to an image file enclosed in quotes') class ImageArgsBase(AttributesDictionary): file_or_filename = RequiredArg(ImagePath, 'Path to the image file') scale = OptionalArg(Scale, 'fit', 'Scaling factor for the image') width = OptionalArg(Dimension, None, 'The width to scale the image to') height = OptionalArg(Dimension, None, 'The height to scale the image to') dpi = OptionalArg(Integer, 0, 'Overrides the DPI value set in the image') rotate = OptionalArg(Integer, 0, 'Angle in degrees to rotate the image') @staticmethod def _parse_argument(argument_definition, tokens, source): arg_tokens = [] depth = 0 for token in tokens: if token.exact_type == LPAR: depth += 1 elif token.exact_type == RPAR: depth -= 1 arg_tokens.append(token) if depth == 0 and tokens.next.exact_type in (COMMA, RPAR, ENDMARKER): break argument_type = argument_definition.accepted_type arg_tokens_iter = PeekIterator(arg_tokens) argument = argument_type.from_tokens(arg_tokens_iter, source) if not arg_tokens_iter.at_end: raise ParseError('Syntax error') return argument, tokens.next.exact_type in (RPAR, ENDMARKER) @classmethod def parse_arguments(cls, tokens, source): argument_defs = (cls.attribute_definition(name) for name in cls._all_attributes) args, kwargs = [], {} is_last_arg = False # required arguments for argument_def in (argdef for argdef in argument_defs if isinstance(argdef, RequiredArg)): argument, is_last_arg = cls._parse_argument(argument_def, tokens, source) args.append(argument) # optional arguments while not is_last_arg: assert next(tokens).exact_type == COMMA keyword_token = next(tokens) if keyword_token.exact_type != NAME: raise ParseError('Expecting a keyword!') keyword = keyword_token.string equals_token = next(tokens) if equals_token.exact_type != EQUAL: raise ParseError('Expecting the keyword to be followed by an ' 'equals sign.') try: argument_def = cls.attribute_definition(keyword) except KeyError: raise ParseError('Unsupported argument keyword: {}' .format(keyword)) argument, is_last_arg = cls._parse_argument(argument_def, tokens, source) kwargs[keyword] = argument return args, kwargs class ImageBase(Flowable): """Base class for flowables displaying an image If DPI information is embedded in the image, it is used to determine the size at which the image is displayed in the document (depending on the sizing options specified). Otherwise, a value of 72 DPI is used. Args: filename_or_file (str, file): the image to display. This can be a path to an image file on the file system or a file-like object containing the image. scale (float): scales the image to `scale` times its original size width (Dimension): specifies the absolute width or the width relative to the container width height (Dimension): specifies the absolute height or the width relative to the container **width**. dpi (float): overrides the DPI value embedded in the image (or the default of 72) rotate (float): the angle in degrees to rotate the image over limit_width (Dimension): limit the image to this width when none of scale, width and height are given and the image would be wider than the container If only one of `width` or `height` is given, the image is scaled preserving the original aspect ratio. If `width` or `height` is given, `scale` or `dpi` may not be specified. """ arguments = ImageArgsBase def __init__(self, filename_or_file, scale=1.0, width=None, height=None, dpi=None, rotate=0, limit_width=None, id=None, style=None, parent=None, source=None, **kwargs): super().__init__(id=id, style=style, parent=parent, source=source, **kwargs) self.filename_or_file = filename_or_file if (width, height) != (None, None): if scale != 1.0: raise TypeError('Scale may not be specified when either ' 'width or height are given.') if dpi is not None: raise TypeError('DPI may not be specified when either ' 'width or height are given.') self.scale = scale self.width = width self.height = height self.dpi = dpi self.rotate = rotate self.limit_width = limit_width def copy(self, parent=None): return type(self)(self.filename_or_file, scale=self.scale, width=self.width, height=self.height, dpi=self.dpi, rotate=self.rotate, limit_width=self.limit_width, id=self.id, style=self.style, parent=parent, source=self.source) @property def filename(self): if isinstance(self.filename_or_file, str): return Filename(self.filename_or_file) def _short_repr_args(self, flowable_target): yield "'{}'".format(self.filename) def initial_state(self, container): return ImageState(self) def _absolute_path_or_file(self): try: file_path = Path(self.filename_or_file) except AttributeError: # self.filename_or_file is a file return self.filename_or_file if file_path.is_absolute(): return file_path if self.source_root is None: raise ValueError('Image file path should be absolute:' ' {}'.format(file_path)) return self.source_root / file_path def render(self, container, last_descender, state, **kwargs): try: filename_or_file = self._absolute_path_or_file() image = container.document.backend.Image(filename_or_file) except OSError as err: container.document.error = True message = "Error opening image file: {}".format(err) self.warn(message) error = ErrorText(message) return Paragraph(error).flow(container, last_descender) left, top = 0, float(container.cursor) width = self._width(container) try: scale_width = width.to_points(container.width) / image.width except AttributeError: # width is a FlowableWidth scale_width = None if self.height is not None: scale_height = self.height.to_points(container.width) / image.height if scale_width is None: scale_width = scale_height else: scale_height = scale_width if scale_width is None: # no width or height given if self.scale in Scale.values: w_scale = float(container.width) / image.width h_scale = float(container.remaining_height) / image.height min_or_max = min if self.scale == Scale.FIT else max scale_width = scale_height = min_or_max(w_scale, h_scale) else: scale_width = scale_height = self.scale dpi_x, dpi_y = image.dpi dpi_scale_x = (dpi_x / self.dpi) if self.dpi and dpi_x else 1 dpi_scale_y = (dpi_y / self.dpi) if self.dpi and dpi_y else 1 if (scale_width == scale_height == 1.0 # limit width if necessary and self.limit_width is not None and image.width * dpi_scale_x > container.width): limit_width = self.limit_width.to_points(container.width) scale_width = scale_height = limit_width / image.width w, h = container.canvas.place_image(image, left, top, container.document, scale_width * dpi_scale_x, scale_height * dpi_scale_y, self.rotate) ignore_overflow = (self.scale == Scale.FIT) or container.page._empty try: container.advance(h, ignore_overflow) except ContainerOverflow: raise EndOfContainer(state) return w, h, 0 class InlineImageArgs(ImageArgsBase): baseline = OptionalArg(Dimension, 0, "Location of this inline image's " "baseline") class InlineImage(ImageBase, InlineFlowable): directive = 'image' arguments = InlineImageArgs def __init__(self, filename_or_file, scale=1.0, width=None, height=None, dpi=None, rotate=0, baseline=None, id=None, style=None, parent=None, source=None): super().__init__(filename_or_file=filename_or_file, scale=scale, height=height, dpi=dpi, rotate=rotate, baseline=baseline, id=id, style=style, parent=parent, source=source) self.width = width def _width(self, container): return FlowableWidth.AUTO if self.width is None else self.width def copy(self, parent=None): return type(self)(self.filename_or_file, scale=self.scale, width=self.width, height=self.height, dpi=self.dpi, rotate=self.rotate, baseline=self.baseline, id=self.id, style=self.style, parent=parent, source=self.source) class _Image(ImageBase): def __init__(self, filename_or_file, scale=1.0, width=None, height=None, dpi=None, rotate=0, limit_width=100*PERCENT, align=None, id=None, style=None, parent=None, source=None): super().__init__(filename_or_file=filename_or_file, scale=scale, width=width, height=height, dpi=dpi, rotate=rotate, limit_width=limit_width, align=align, id=id, style=style, parent=parent, source=source) class Image(_Image): pass class BackgroundImageMeta(type(_Image), type(AttributesDictionary)): pass class ImageArgs(ImageArgsBase): limit_width = Attribute(Dimension, 100*PERCENT, 'Limit the image width ' 'when none of :attr:`scale`, :attr:`width` and ' ':attr:`height` are given and the image would ' 'be wider than the container') align = Attribute(HorizontalAlignment, 'left', 'How to align the image ' 'within the page') class BackgroundImage(_Image, AcceptNoneAttributeType): """Image to place in the background of a page Takes the same arguments as :class:`Image`. """ arguments = ImageArgs @classmethod def from_tokens(cls, tokens, source): args, kwargs = cls.arguments.parse_arguments(tokens, source) return cls(*args, source=source, **kwargs) @classmethod def doc_format(cls): return ('filename of an image file enclosed in quotes, optionally ' 'followed by space-delimited keyword arguments ' '(``<keyword>=<value>``) that determine how the image is ' 'displayed') class CaptionStyle(ParagraphStyle): number_format = OverrideDefault(NumberFormat.NUMBER) numbering_level = OverrideDefault(1) class Caption(StaticParagraph): style_class = CaptionStyle has_title = True @property def referenceable(self): return self.parent def text(self, container): try: number = self.number(container) label = [self.referenceable.category, ' ', number] except KeyError: label = [] return MixedStyledText(label + [self.content], parent=self) class FigureStyle(FloatStyle, GroupedFlowablesStyle): pass class Figure(Float, StaticGroupedFlowables): style_class = FigureStyle category = 'Figure' class ListOfFigures(ListOf): category = 'Figure' class ListOfFiguresSection(ListOfSection): list_class = ListOfFigures
/rinohtype-0.5.4.tar.gz/rinohtype-0.5.4/src/rinoh/image.py
0.822831
0.318194
image.py
pypi
import re from collections import OrderedDict from configparser import ConfigParser from io import StringIO from itertools import chain from pathlib import Path from token import NUMBER, ENDMARKER, MINUS, PLUS, NAME, NEWLINE from tokenize import generate_tokens from warnings import warn from .util import (NamedDescriptor, WithNamedDescriptors, NotImplementedAttribute, class_property, PeekIterator, cached) __all__ = ['AttributeType', 'AcceptNoneAttributeType', 'OptionSet', 'OptionSetMeta', 'Attribute', 'OverrideDefault', 'AttributesDictionary', 'Configurable', 'RuleSet', 'RuleSetFile', 'Bool', 'Integer', 'ParseError', 'Var'] class AttributeType(object): def __eq__(self, other): return type(self) == type(other) and self.__dict__ == other.__dict__ def __ne__(self, other): return not self == other @classmethod def check_type(cls, value): return isinstance(value, cls) @classmethod def from_string(cls, string, source=None): return cls.parse_string(string, source) @classmethod def parse_string(cls, string, source): tokens = TokenIterator(string) value = cls.from_tokens(tokens, source) if next(tokens).type != ENDMARKER: raise ParseError('Syntax error') return value @classmethod def from_tokens(cls, tokens, source): raise NotImplementedError(cls) @classmethod def validate(cls, value): if isinstance(value, str): value = cls.from_string(value) if not cls.check_type(value): raise TypeError("{} is not of type {}".format(value, cls.__name__)) return value @classmethod def doc_repr(cls, value): return '``{}``'.format(value) if value else '(no value)' @classmethod def doc_format(cls): warn('Missing implementation for {}.doc_format'.format(cls.__name__)) return '' class AcceptNoneAttributeType(AttributeType): """Accepts 'none' (besides other values)""" @classmethod def check_type(cls, value): return (isinstance(value, type(None)) or super(__class__, cls).check_type(value)) @classmethod def from_string(cls, string, source=None): if string.strip().lower() == 'none': return None return super(__class__, cls).from_string(string, source) @classmethod def doc_repr(cls, value): return '``{}``'.format('none' if value is None else value) class OptionSetMeta(type): def __new__(metacls, classname, bases, cls_dict): cls = super().__new__(metacls, classname, bases, cls_dict) cls.__doc__ = (cls_dict['__doc__'] + '\n\n' if '__doc__' in cls_dict else '') cls.__doc__ += 'Accepts: {}'.format(cls.doc_format()) return cls def __getattr__(cls, item): if item == 'NONE' and None in cls.values: return None string = item.lower().replace('_', ' ') if item.isupper() and string in cls.values: return string raise AttributeError(item) def __iter__(cls): return iter(cls.values) class OptionSet(AttributeType, metaclass=OptionSetMeta): """Accepts the values listed in :attr:`values`""" values = () @classmethod def check_type(cls, value): return value in cls.values @class_property def value_strings(cls): return ['none' if value is None else value.lower() for value in cls.values] @classmethod def _value_from_tokens(cls, tokens): if tokens.next.type != NAME: raise ParseError('Expecting a name') token = next(tokens) _, start_col = token.start while tokens.next and tokens.next.exact_type in (NAME, MINUS): token = next(tokens) _, end_col = token.end return token.line[start_col:end_col].strip() @classmethod def from_tokens(cls, tokens, source): option_string = cls._value_from_tokens(tokens) try: index = cls.value_strings.index(option_string.lower()) except ValueError: raise ValueError("'{}' is not a valid {}. Must be one of: '{}'" .format(option_string, cls.__name__, "', '".join(cls.value_strings))) return cls.values[index] @classmethod def doc_repr(cls, value): return '``{}``'.format(value) @classmethod def doc_format(cls): return ', '.join('``{}``'.format(s) for s in cls.value_strings) class Attribute(NamedDescriptor): """Descriptor used to describe a style attribute""" def __init__(self, accepted_type, default_value, description): self.name = None self.accepted_type = accepted_type self.default_value = accepted_type.validate(default_value) self.description = description self.source = None def __get__(self, style, type=None): try: return style.get(self.name, self.default_value) except AttributeError: return self def __set__(self, style, value): if not self.accepted_type.check_type(value): raise TypeError('The {} attribute only accepts {} instances' .format(self.name, self.accepted_type.__name__)) style[self.name] = value class OverrideDefault(Attribute): """Overrides the default value of an attribute defined in a superclass""" def __init__(self, default_value): self._default_value = default_value @property def overrides(self): return self._overrides @overrides.setter def overrides(self, attribute): self._overrides = attribute self.default_value = self.accepted_type.validate(self._default_value) @property def accepted_type(self): return self.overrides.accepted_type @property def description(self): return self.overrides.description class WithAttributes(WithNamedDescriptors): def __new__(mcls, classname, bases, cls_dict): attributes = cls_dict['_attributes'] = OrderedDict() doc = [] for name, attr in cls_dict.items(): if not isinstance(attr, Attribute): continue attributes[name] = attr if isinstance(attr, OverrideDefault): for mro_cls in (cls for base_cls in bases for cls in base_cls.__mro__): try: attr.overrides = mro_cls._attributes[name] break except (AttributeError, KeyError): pass else: raise NotImplementedError battr = ':attr:`{0} <.{0}.{1}>`'.format(mro_cls.__name__, name) inherits = f' (inherited from {battr})' overrides = f' (overrides {battr} default)' else: inherits = overrides = '' doc.append('{}: {}{}'.format(name, attr.description, inherits)) format = attr.accepted_type.doc_format() default = attr.accepted_type.doc_repr(attr.default_value) doc.append('\n *Accepts* :class:`.{}`: {}\n' .format(attr.accepted_type.__name__, format)) doc.append('\n *Default*: {}{}\n' .format(default, overrides)) supported_attributes = list(name for name in attributes) documented = set(supported_attributes) for base_class in bases: try: supported_attributes.extend(base_class._supported_attributes) except AttributeError: continue for mro_cls in base_class.__mro__: for name, attr in getattr(mro_cls, '_attributes', {}).items(): if name in documented: continue doc.append('{0}: {1} (inherited from :attr:`{2} <.{2}.{0}>`)' .format(name, attr.description, mro_cls.__name__)) format = attr.accepted_type.doc_format() default = attr.accepted_type.doc_repr(attr.default_value) doc.append('\n *Accepts* :class:`.{}`: {}\n' .format(attr.accepted_type.__name__, format)) doc.append('\n *Default*: {}\n'.format(default)) documented.add(name) if doc: attr_doc = '\n '.join(chain([' Attributes:'], doc)) cls_dict['__doc__'] = (cls_dict.get('__doc__', '') + '\n\n' + attr_doc) cls_dict['_supported_attributes'] = supported_attributes return super().__new__(mcls, classname, bases, cls_dict) @property def _all_attributes(cls): for mro_class in reversed(cls.__mro__): for name in getattr(mro_class, '_attributes', ()): yield name @property def supported_attributes(cls): for mro_class in cls.__mro__: for name in getattr(mro_class, '_supported_attributes', ()): yield name class AttributesDictionary(OrderedDict, metaclass=WithAttributes): def __init__(self, base=None, **attributes): self.name = None self.source = None self.base = base super().__init__(attributes) @classmethod def _get_default(cls, attribute): """Return the default value for `attribute`. If no default is specified in this style, get the default from the nearest superclass. If `attribute` is not supported, raise a :class:`KeyError`.""" try: for klass in cls.__mro__: if attribute in klass._attributes: return klass._attributes[attribute].default_value except AttributeError: raise KeyError("No attribute '{}' in {}".format(attribute, cls)) @classmethod def attribute_definition(cls, name): try: for klass in cls.__mro__: if name in klass._attributes: return klass._attributes[name] except AttributeError: pass raise KeyError(name) @classmethod def attribute_type(cls, name): try: return cls.attribute_definition(name).accepted_type except KeyError: raise TypeError('{} is not a supported attribute for {}' .format(name, cls.__name__)) @classmethod def get_ruleset(self): raise NotImplementedError class DefaultValueException(Exception): pass class Configurable(object): configuration_class = NotImplementedAttribute() def configuration_name(self, document): raise NotImplementedError def get_config_value(self, attribute, document): ruleset = self.configuration_class.get_ruleset(document) return ruleset.get_value_for(self, attribute, document) class BaseConfigurationException(Exception): def __init__(self, base_name): self.name = base_name class Source(object): """Describes where a :class:`DocumentElement` was defined""" @property def location(self): """Textual representation of this source""" return repr(self) @property def root(self): """Directory path for resolving paths relative to this source""" return None class RuleSet(OrderedDict, Source): main_section = NotImplementedAttribute() def __init__(self, name, base=None, source=None, **kwargs): super().__init__(**kwargs) self.name = name self.base = base self.source = source self.variables = OrderedDict() def contains(self, name): return name in self or (self.base and self.base.contains(name)) def find_source(self, name): """Find top-most ruleset where configuration `name` is defined""" if name in self: return self.name if self.base: return self.base.find_source(name) def get_configuration(self, name): try: return self[name] except KeyError: if self.base: return self.base.get_configuration(name) raise def __setitem__(self, name, item): assert name not in self if isinstance(item, AttributesDictionary): # FIXME self._validate_attributes(name, item) super().__setitem__(name, item) def __call__(self, name, **kwargs): self[name] = self.get_entry_class(name)(**kwargs) def __repr__(self): return '{}({})'.format(type(self).__name__, self.name) def __str__(self): return repr(self) def __bool__(self): return True RE_VARIABLE = re.compile(r'^\$\(([a-z_ -]+)\)$', re.IGNORECASE) def _validate_attributes(self, name, attr_dict): attr_dict.name = name attr_dict.source = self for key, val in attr_dict.items(): attr_dict[key] = self._validate_attribute(attr_dict, key, val) def _validate_attribute(self, attr_dict, name, value): attribute_type = attr_dict.attribute_type(name) if isinstance(value, str): stripped = value.replace('\n', ' ').strip() m = self.RE_VARIABLE.match(stripped) if m: return Var(m.group(1)) value = self._attribute_from_string(attribute_type, stripped) elif hasattr(value, 'source'): value.source = self if not isinstance(value, Var) and not attribute_type.check_type(value): raise TypeError("{} ({}) is not of the correct type for the '{}' " "attribute".format(value, type(value).__name__, name)) return value @cached def _attribute_from_string(self, attribute_type, string): return attribute_type.from_string(string, self) def get_variable(self, configuration_class, attribute, variable): try: value = self.variables[variable.name] except KeyError: if not self.base: raise VariableNotDefined("Variable '{}' is not defined" .format(variable.name)) return self.base.get_variable(configuration_class, attribute, variable) return self._validate_attribute(configuration_class, attribute, value) def get_entry_class(self, name): raise NotImplementedError def _get_value_recursive(self, name, attribute): if name in self: entry = self[name] if attribute in entry: return entry[attribute] elif isinstance(entry.base, str): raise BaseConfigurationException(entry.base) elif entry.base is not None: return entry.base[attribute] if self.base: return self.base._get_value_recursive(name, attribute) raise DefaultValueException @cached def get_value(self, name, attribute): try: return self._get_value_recursive(name, attribute) except BaseConfigurationException as exc: return self.get_value(exc.name, attribute) def _get_value_lookup(self, configurable, attribute, document): name = configurable.configuration_name(document) return self.get_value(name, attribute) def get_value_for(self, configurable, attribute, document): try: value = self._get_value_lookup(configurable, attribute, document) except DefaultValueException: value = configurable.configuration_class._get_default(attribute) if isinstance(value, Var): configuration_class = configurable.configuration_class value = self.get_variable(configuration_class, attribute, value) return value class RuleSetFile(RuleSet): def __init__(self, filename, base=None, source=None, **kwargs): self.filename = self._absolute_path(filename, source) config = ConfigParser(default_section=None, delimiters=('=',), interpolation=None) with self.filename.open() as file: config.read_file(file) options = dict(config[self.main_section] if config.has_section(self.main_section) else {}) name = options.pop('name', filename) base = options.pop('base', base) options.update(kwargs) # optionally override options super().__init__(name, base=base, source=source, **options) if config.has_section('VARIABLES'): for name, value in config.items('VARIABLES'): self.variables[name] = value for section_name, section_body in config.items(): if section_name in (None, self.main_section, 'VARIABLES'): continue if ':' in section_name: name, classifier = (s.strip() for s in section_name.split(':')) else: name, classifier = section_name.strip(), None self.process_section(name, classifier, section_body.items()) @classmethod def _absolute_path(cls, filename, source): file_path = Path(filename) if not file_path.is_absolute(): if source is None or source.root is None: raise ValueError('{} path should be absolute: {}' .format(cls.__name__, file_path)) file_path = source.root / file_path return file_path @property def location(self): return str(self.filename.resolve()), None, None @property def root(self): return self.filename.parent.resolve() def process_section(self, section_name, classifier, items): raise NotImplementedError class Bool(AttributeType): """Expresses a binary choice""" @classmethod def check_type(cls, value): return isinstance(value, bool) @classmethod def from_tokens(cls, tokens, source): string = next(tokens).string lower_string = string.lower() if lower_string not in ('true', 'false'): raise ValueError("'{}' is not a valid {}. Must be one of 'true' " "or 'false'".format(string, cls.__name__)) return lower_string == 'true' @classmethod def doc_repr(cls, value): return '``{}``'.format(str(value).lower()) @classmethod def doc_format(cls): return '``true`` or ``false``' class Integer(AttributeType): """Accepts natural numbers""" @classmethod def check_type(cls, value): return isinstance(value, int) @classmethod def from_tokens(cls, tokens, source): token = next(tokens) sign = 1 if token.exact_type in (MINUS, PLUS): sign = 1 if token.exact_type == PLUS else -1 token = next(tokens) if token.type != NUMBER: raise ParseError('Expecting a number') try: value = int(token.string) except ValueError: raise ParseError('Expecting an integer') return sign * value @classmethod def doc_format(cls): return 'a natural number (positive integer)' class TokenIterator(PeekIterator): """Tokenizes `string` and iterates over the tokens""" def __init__(self, string): self.string = string tokens = generate_tokens(StringIO(string).readline) super().__init__(tokens) def _advance(self): result = super()._advance() if self.next and self.next.type == NEWLINE and self.next.string == '': super()._advance() return result class ParseError(Exception): pass # variables class Var(object): def __init__(self, name): super().__init__() self.name = name def __repr__(self): return "{}('{}')".format(type(self).__name__, self.name) def __str__(self): return '$({})'.format(self.name) def __eq__(self, other): return self.name == other.name class VariableNotDefined(Exception): pass
/rinohtype-0.5.4.tar.gz/rinohtype-0.5.4/src/rinoh/attribute.py
0.670608
0.182553
attribute.py
pypi
from collections.abc import Iterable from itertools import chain from functools import partial from math import sqrt from token import NAME from .attribute import (Attribute, OptionSet, OverrideDefault, Integer, Bool, AcceptNoneAttributeType, ParseError) from .dimension import DimensionBase as DimBase, Dimension, PERCENT from .draw import Line, Rectangle, ShapeStyle, LineStyle from .flowable import (Flowable, FlowableStyle, FlowableState, FlowableWidth, Float, FloatStyle) from .layout import MaybeContainer, VirtualContainer, EndOfContainer from .structure import (StaticGroupedFlowables, GroupedFlowablesStyle, ListOf, ListOfSection) from .style import Styled from .util import ReadAliasAttribute, INF __all__ = ['Table', 'TableStyle', 'TableWithCaption', 'TableSection', 'TableHead', 'TableBody', 'TableRow', 'TableCell', 'TableCellStyle', 'TableCellBorder', 'TableCellBorderStyle', 'TableCellBackground', 'TableCellBackgroundStyle', 'VerticalAlign', 'ListOfTables', 'ListOfTablesSection'] class TableState(FlowableState): table = ReadAliasAttribute('flowable') def __init__(self, table, column_widths=None, body_row_index=0): super().__init__(table) self.column_widths = column_widths self.body_row_index = body_row_index @property def width(self): return sum(self.column_widths) @property def body_row_index(self): return self._body_row_index @body_row_index.setter def body_row_index(self, body_row_index): self._body_row_index = body_row_index self.initial = body_row_index == 0 def __copy__(self): return self.__class__(self.table, self.column_widths, self.body_row_index) class Auto: @classmethod def from_tokens(cls, tokens, source): token = next(tokens) if token.type != NAME or token.string.lower() != 'auto': raise ParseError("Expecting the 'auto' keyword") return None class ColumnWidths(AcceptNoneAttributeType): @classmethod def check_type(cls, value): return (super().check_type(value) or (isinstance(value, list) and all(item is None or isinstance(item, (DimBase, int)) for item in value))) @classmethod def from_tokens(cls, tokens, source): items = [] while tokens.next.type: for cls in (Dimension, Integer, Auto): tokens.push_state() try: items.append(cls.from_tokens(tokens, source)) tokens.pop_state(discard=True) break except ParseError: tokens.pop_state(discard=False) else: raise ParseError("Expecting a dimension, integer or 'auto'") return items @classmethod def doc_format(cls): return ("a whitespace-delimited list of column widths;" " :class:`.Dimension`\\ s (absolute width), integers (relative" " width) and/or 'auto' (automatic width)") class TableStyle(FlowableStyle): column_widths = Attribute(ColumnWidths, None, 'Absolute or relative widths' ' of each column') split_minimum_rows = Attribute(Integer, 0, 'The minimum number of rows to ' 'display when the table is ' 'split across pages') repeat_head = Attribute(Bool, False, 'Repeat the head when the table is ' 'split across pages') NEVER_SPLIT = float('+inf') class Table(Flowable): style_class = TableStyle def __init__(self, body, head=None, align=None, width=None, column_widths=None, id=None, style=None, parent=None): """ Args: width (DimensionBase or None): the width of the table. If ``None``, the width of the table is automatically determined. column_widths (list or None): a list of relative (int or float) and absolute (:class:`.Dimension`) column widths. A value of ``None`` auto-sizes the column. Passing ``None` instead of a list auto-sizes all columns. """ super().__init__(align=align, width=width, id=id, style=style, parent=parent) self.head = head if head: head.parent = self self.body = body body.parent = self self.column_widths = column_widths def prepare(self, flowable_target): super().prepare(flowable_target) if self.head: self.head.prepare(flowable_target) self.body.prepare(flowable_target) def initial_state(self, container): return TableState(self) def render(self, container, last_descender, state, space_below=0, **kwargs): if state.column_widths is None: state.column_widths = self._size_columns(container) get_style = partial(self.get_style, container=container) with MaybeContainer(container) as maybe_container: def render_rows(section, next_row_index=0): rows = section[next_row_index:] rendered_spans = self._render_section(container, rows, state.column_widths) for rendered_rows, is_last_span in rendered_spans: sum_row_heights = sum(row.height for row in rendered_rows) remaining_height = maybe_container.remaining_height if isinstance(section, TableBody) and is_last_span: remaining_height -= space_below if sum_row_heights > remaining_height: break self._place_rows_and_render_borders(maybe_container, rendered_rows) next_row_index += len(rendered_rows) return next_row_index # head rows if self.head and (state.initial or get_style('repeat_head')): if render_rows(self.head) != len(self.head): raise EndOfContainer(state) # body rows next_row_index = render_rows(self.body, state.body_row_index) rows_left = len(self.body) - next_row_index if rows_left > 0: split_minimum_rows = get_style('split_minimum_rows') if min(next_row_index, rows_left) >= split_minimum_rows: state.body_row_index = next_row_index raise EndOfContainer(state) return sum(state.column_widths), 0, 0 def _size_columns(self, container): """Calculate the table's column sizes constrained by: - given (absolute, relative and automatic) column widths - full table width: fixed or automatic (container width max) - cell contents """ num_cols = self.body.num_columns width = self._width(container) if width == FlowableWidth.FILL: width = 100 * PERCENT available_width = (float(container.width) if width == FlowableWidth.AUTO else width.to_points(container.width)) column_widths = (self.column_widths or self.get_style('column_widths', container) or [None for _ in range(num_cols)]) # auto widths if len(column_widths) != num_cols: raise ValueError("'column_widths' length doesn't match the number" " of table columns") # indices for fixed, relative and auto width columns fixed_cols = [i for i, width in enumerate(column_widths) if isinstance(width, DimBase)] rel_cols = [i for i, width in enumerate(column_widths) if width and i not in fixed_cols] auto_cols = [i for i, width in enumerate(column_widths) if width is None] # fixed-width columns final = [width.to_points(container.width) if i in fixed_cols else None for i, width in enumerate(column_widths)] fixed_total_width = sum(width or 0 for width in final) if fixed_total_width > available_width: self.warn('Total width of fixed-width columns exceeds the' ' available width') # minimum (wrap content) and maximum (non wrapping) column widths min_widths = self._widths_from_content(final, 0, container) max_widths = self._widths_from_content(final, INF, container) # calculate max column widths respecting the specified relative # column widths (padding columns with whitespace) rel_max_widths = [max(max(column_widths[i] / column_widths[j] * max_widths[j] for j in rel_cols if j != i), max_widths[i]) if i in rel_cols else width for i, width in enumerate(max_widths)] # does the table fit within the available width without wrapping? if sum(rel_max_widths) < available_width: # no content wrapping needed if width == FlowableWidth.AUTO: # -> use maximum widths return rel_max_widths rel_widths = rel_max_widths else: # content needs wrapping rel_widths = [sqrt(mini * maxi) # -> use weighted widths for mini, maxi in zip(min_widths, max_widths)] # transform auto-width columns to relative-width columns if auto_cols: # scaling factor between supplied relative column widths and the # relative widths determined for auto-sized columns # TODO: instead of min, use max or avg? auto_rel_factor = min(rel_widths[i] / column_widths[i] for i in rel_cols) if rel_cols else 1 for i in auto_cols: column_widths[i] = rel_widths[i] * auto_rel_factor rel_cols = sorted(rel_cols + auto_cols) # scale relative-width columns to fill the specified/available width if rel_cols: rel_sum = sum(column_widths[i] for i in rel_cols) total_relative_cols_width = available_width - fixed_total_width rel_factor = total_relative_cols_width / rel_sum for i in rel_cols: final[i] = column_widths[i] * rel_factor if not all(fin >= maxw for fin, maxw in zip(final, max_widths)): final = self._optimize_auto_columns(auto_cols, final, min_widths, max_widths, container) return final def _optimize_auto_columns(self, auto_cols, final, min_widths, max_widths, container): """Adjust auto-sized columns to prevent content overflowing cells""" extra = [final[i] - min_widths[i] for i in auto_cols] excess = [final[i] - max_widths[i] for i in auto_cols] neg_extra = sum(x for x in extra if x < 0) # width to be compensated # increase width of overfilled columns to the minimum width for i in (i for i in auto_cols if extra[i] < 0): final[i] = min_widths[i] surplus = neg_extra + sum(x for x in excess if x > 0) if surplus >= 0: # using only the unused space (padding) is enough for i in (i for i in auto_cols if excess[i] > 0): final[i] = max_widths[i] else: # that isn't enough; wrap non-wrapped content instead surplus = neg_extra + sum(x for x in extra if x > 0) for i in (i for i in auto_cols if extra[i] > 0): final[i] = min_widths[i] pad_columns = auto_cols if surplus < 0: self.warn('Table contents are too wide to fit within the available' ' width', container) elif any(fin < mw for fin, mw in zip(final, max_widths)): pad_columns = [i for i in auto_cols if final[i] < max_widths[i]] # divide surplus space among all auto-sized columns < max_width if pad_columns: per_column_surplus = surplus / len(pad_columns) for i in pad_columns: final[i] += per_column_surplus return final def _widths_from_content(self, fixed, max_cell_width, container): """Calculate required column widths given a maximum cell width""" def cell_content_width(cell): buffer = VirtualContainer(container, width=max_cell_width, never_placed=True) width, _, _ = cell.flow(buffer, None) return float(width) widths = [width if width else 0 for width in fixed] fixed_width_cols = set(i for i, width in enumerate(widths) if width) # find the maximum content width for all non-column-spanning cells for # each non-fixed-width column for row in chain(self.head or [], self.body): for cell in (cell for cell in row if cell.colspan == 1): col = int(cell.column_index) if col not in fixed_width_cols: widths[col] = max(widths[col], cell_content_width(cell)) # divide the extra space needed for column-spanning cells equally over # the spanned columns (skipping fixed-width columns) for row in chain(self.head or [], self.body): for cell in (cell for cell in row if cell.colspan > 1): c = int(cell.column_index) c_end = c + cell.colspan extra = cell_content_width(cell) - sum(widths[c:c_end]) non_fixed_cols = [i for i in range(c, c_end) if i not in fixed_width_cols] if extra > 0 and non_fixed_cols: per_column_extra = extra / len(non_fixed_cols) for i in non_fixed_cols: widths[i] += per_column_extra return widths @classmethod def _render_section(cls, container, rows, column_widths): rendered_rows = [] rows_left_in_span = 0 for row in rows: rows_left_in_span = max(row.maximum_rowspan, rows_left_in_span) - 1 rendered_row = cls._render_row(column_widths, container, row) rendered_rows.append(rendered_row) if rows_left_in_span == 0: is_last_span = row == rows[-1] yield cls._vertically_size_cells(rendered_rows), is_last_span rendered_rows = [] assert not rendered_rows @staticmethod def _render_row(column_widths, container, row): rendered_row = RenderedRow(int(row._index), row) for cell in row: col_idx = int(cell.column_index) left = sum(column_widths[:col_idx]) cell_width = sum(column_widths[col_idx:col_idx + cell.colspan]) buffer = VirtualContainer(container, cell_width) cell.flow(buffer, None) rendered_cell = RenderedCell(cell, buffer, left) rendered_row.append(rendered_cell) return rendered_row @staticmethod def _vertically_size_cells(rendered_rows): """Grow row heights to cater for vertically spanned cells that do not fit in the available space.""" for r, rendered_row in enumerate(rendered_rows): for rendered_cell in rendered_row: if rendered_cell.rowspan > 1: row_height = sum(row.height for row in rendered_rows[r:r + rendered_cell.rowspan]) extra_height_needed = rendered_cell.height - row_height if extra_height_needed > 0: padding = extra_height_needed / rendered_cell.rowspan for i in range(r, r + rendered_cell.rowspan): rendered_rows[i].height += padding return rendered_rows @staticmethod def _place_rows_and_render_borders(container, rendered_rows): """Place the rendered cells onto the page canvas and draw borders around them.""" def draw_cell_border(rendered_cell, cell_height, container): cell_width = rendered_cell.width background = TableCellBackground((0, 0), cell_width, cell_height, parent=rendered_cell.cell) background.render(container) container.register_styled(background) for position in ('top', 'right', 'bottom', 'left'): border = TableCellBorder(rendered_cell, cell_height, position) border.render(container) container.register_styled(border) y_cursor = container.cursor for r, rendered_row in enumerate(rendered_rows): container.advance(rendered_row.height) if rendered_row.index == 0: container.register_styled(rendered_row.row.parent) container.register_styled(rendered_row.row) for c, rendered_cell in enumerate(rendered_row): cell_height = sum(rendered_row.height for rendered_row in rendered_rows[r:r + rendered_cell.rowspan]) x_cursor = rendered_cell.x_position y_pos = float(y_cursor + cell_height) cell_container = VirtualContainer(container) draw_cell_border(rendered_cell, cell_height, cell_container) cell_container.place_at(container, x_cursor, y_pos) vertical_align = rendered_cell.cell.get_style('vertical_align', container) if vertical_align == VerticalAlign.TOP: vertical_offset = 0 elif vertical_align == VerticalAlign.MIDDLE: vertical_offset = (cell_height - rendered_cell.height) / 2 elif vertical_align == VerticalAlign.BOTTOM: vertical_offset = (cell_height - rendered_cell.height) y_offset = float(y_cursor + vertical_offset) rendered_cell.container.place_at(container, x_cursor, y_offset) y_cursor += rendered_row.height class TableWithCaptionStyle(FloatStyle, GroupedFlowablesStyle): pass class TableWithCaption(Float, StaticGroupedFlowables): style_class = TableWithCaptionStyle category = 'Table' class TableSection(Styled, list): def __init__(self, rows, style=None, parent=None): Styled.__init__(self, style=style, parent=parent) list.__init__(self, rows) for row in rows: row.parent = self def prepare(self, flowable_target): for row in self: row.prepare(flowable_target) @property def num_columns(self): return sum(cell.colspan for cell in self[0]) class TableHead(TableSection): pass class TableBody(TableSection): pass class TableRow(Styled, list): def __init__(self, cells, style=None, parent=None): Styled.__init__(self, style=style, parent=parent) list.__init__(self, cells) for cell in cells: cell.parent = self @property def maximum_rowspan(self): return max(cell.rowspan for cell in self) def prepare(self, flowable_target): for cells in self: cells.prepare(flowable_target) @property def _index(self): return next(i for i, item in enumerate(self.parent) if item is self) def get_rowspanned_columns(self): """Return a dictionary mapping column indices to the number of columns spanned.""" section = self.parent spanned_columns = {} current_row_index = self._index current_row_cols = sum(cell.colspan for cell in self) prev_rows = iter(reversed(section[:current_row_index])) while current_row_cols < section.num_columns: row = next(prev_rows) min_rowspan = current_row_index - int(row._index) if row.maximum_rowspan > min_rowspan: for cell in (c for c in row if c.rowspan > min_rowspan): col_index = int(cell.column_index) spanned_columns[col_index] = cell.colspan current_row_cols += cell.colspan return spanned_columns class VerticalAlign(OptionSet): values = 'top', 'middle', 'bottom' class TableCellStyle(GroupedFlowablesStyle): vertical_align = Attribute(VerticalAlign, 'middle', 'Vertical alignment of the cell contents ' 'within the available space') class TableCell(StaticGroupedFlowables): style_class = TableCellStyle row = ReadAliasAttribute('parent') def __init__(self, flowables, rowspan=1, colspan=1, id=None, style=None, parent=None): super().__init__(flowables, id=id, style=style, parent=parent) self.rowspan = rowspan self.colspan = colspan @property def row_index(self): return RowIndex(self) @property def column_index(self): return ColumnIndex(self) class Index(object): def __init__(self, cell): self.cell = cell @property def row(self): return self.cell.parent @property def table_section(self): return self.row.parent def __eq__(self, other): if isinstance(other, slice): indices = range(*other.indices(self.num_items)) elif isinstance(other, Iterable): indices = other else: indices = (other, ) indices = [self.num_items + idx if idx < 0 else idx for idx in indices] return any(index in indices for index in self) def __int__(self): raise NotImplementedError def num_items(self): raise NotImplementedError class RowIndex(Index): def __int__(self): return next(i for i, row in enumerate(self.table_section) if row is self.row) def __iter__(self): index = int(self) return (index + i for i in range(self.cell.rowspan)) @property def num_items(self): return len(self.table_section) class ColumnIndex(Index): def __int__(self): spanned_columns = self.row.get_rowspanned_columns() column_index = 0 cells = iter(self.row) for col_index in range(self.cell.row.parent.num_columns): if col_index in spanned_columns: column_index += spanned_columns[col_index] else: cell = next(cells) if cell is self.cell: return column_index column_index += cell.colspan def __iter__(self): index = int(self) return (index + i for i in range(self.cell.colspan)) @property def num_items(self): return self.row.parent.num_columns class RenderedCell(object): def __init__(self, cell, container, x_position): self.cell = cell self.container = container self.x_position = x_position @property def width(self): return float(self.container.width) @property def height(self): return float(self.container.height) @property def rowspan(self): return self.cell.rowspan class RenderedRow(list): def __init__(self, index, row): super().__init__() self.index = index self.row = row self.height = 0 def append(self, rendered_cell): if rendered_cell.cell.rowspan == 1: self.height = max(self.height, rendered_cell.height) super().append(rendered_cell) class TableCellBorderStyle(LineStyle): stroke = OverrideDefault(None) class TableCellBorder(Line): style_class = TableCellBorderStyle def __init__(self, rendered_cell, cell_height, position, style=None): left, bottom, right, top = 0, 0, rendered_cell.width, cell_height if position == 'top': start, end = (left, top), (right, top) if position == 'right': start, end = (right, top), (right, bottom) if position == 'bottom': start, end = (left, bottom), (right, bottom) if position == 'left': start, end = (left, bottom), (left, top) super().__init__(start, end, style=style, parent=rendered_cell.cell) self.position = position def _short_repr_args(self, flowable_target): return (repr(self.position), ) class TableCellBackgroundStyle(ShapeStyle): fill_color = OverrideDefault(None) stroke = OverrideDefault(None) class TableCellBackground(Rectangle): style_class = TableCellBackgroundStyle class ListOfTables(ListOf): category = 'Table' class ListOfTablesSection(ListOfSection): list_class = ListOfTables
/rinohtype-0.5.4.tar.gz/rinohtype-0.5.4/src/rinoh/table.py
0.839832
0.20454
table.py
pypi
from collections import deque from contextlib import contextmanager from copy import copy from .dimension import Dimension, PT, DimensionAddition from .util import ContextManager __all__ = ['Container', 'FlowablesContainer', 'ChainedContainer', 'DownExpandingContainer', 'InlineDownExpandingContainer', 'UpExpandingContainer', 'UpDownExpandingContainer', 'VirtualContainer', 'Chain', 'FootnoteContainer', 'MaybeContainer', 'ContainerOverflow', 'EndOfContainer', 'PageBreakException'] class ContainerOverflow(Exception): """The end of the :class:`FlowableContainer` has been reached.""" class EndOfContainer(Exception): """TODO""" def __init__(self, flowable_state, page_break=False): """`flowable_state` represents the rendering state of the :class:`Flowable` at the time the :class:`FlowableContainer`" overflows. """ self.flowable_state = flowable_state self.page_break = page_break class PageBreakException(ContainerOverflow): def __init__(self, break_type, chain, flowable_state): super().__init__() self.break_type = break_type self.chain = chain self.flowable_state = flowable_state class ReflowRequired(Exception): """Reflow of the current page is required due to insertion of a float.""" class FlowableTarget(object): """Something that takes :class:`Flowable`\\ s to be rendered.""" def __init__(self, document_part, *args, **kwargs): """Initialize this flowable target. `document_part` is the :class:`Document` this flowable target is part of.""" from .flowable import StaticGroupedFlowables self.flowables = StaticGroupedFlowables([]) super().__init__(*args, **kwargs) @property def document(self): return self.document_part.document def append_flowable(self, flowable): """Append a `flowable` to the list of flowables to be rendered.""" self.flowables.append(flowable) def __lshift__(self, flowable): """Shorthand for :meth:`append_flowable`. Returns `self` so that it can be chained.""" self.append_flowable(flowable) return self def prepare(self, document): self.flowables.prepare(self) class Container(object): """Rectangular area that contains elements to be rendered to a :class:`Page`. A :class:`Container` has an origin (the top-left corner), a width and a height. It's contents are rendered relative to the container's position in its parent :class:`Container`.""" register_with_parent = True _never_placed = False def __init__(self, name, parent, left=None, top=None, width=None, height=None, right=None, bottom=None, sideways=None): """Initialize a this container as a child of the `parent` container. The horizontal position and width of the container are determined from `left`, `width` and `right`. If only `left` or `right` is specified, the container's opposite edge will be placed at the corresponding edge of the parent container. Similarly, the vertical position and height of the container are determined from `top`, `height` and `bottom`. If only one of `top` or `bottom` is specified, the container's opposite edge is placed at the corresponding edge of the parent container.""" if left is None: left = 0*PT if (right and width) is None else (right - width) if width is None: width = (parent.width - left) if right is None else (right - left) if right is None: right = left + width if top is None: top = 0*PT if (bottom and height) is None else (bottom - height) if height is None: height = (parent.height - top) if bottom is None else (bottom - top) if bottom is None: bottom = top + height if sideways: width, height = height, width self.left = left self.width = width self.right = right self.top = top self.height = height self.bottom = bottom self.name = name self.parent = parent self.sideways = sideways if self.register_with_parent: self.parent.children.append(self) self.children = [] self.clear() @property def document_part(self): return self.parent.document_part @property def document(self): return self.document_part.document @property def never_placed(self): return self._never_placed or (self.parent.never_placed if self.parent else False) @property def page(self): """The :class:`Page` this container is located on.""" return self.parent.page def clear(self): self.empty_canvas() def __repr__(self): return "{}('{}')".format(self.__class__.__name__, self.name) def __getattr__(self, name): if name in ('_footnote_space', 'float_space'): return getattr(self.parent, name) raise AttributeError('{}.{}'.format(self.__class__.__name__, name)) def empty_canvas(self): self.canvas = self.document.backend.Canvas() def render(self, type, rerender=False): """Render the contents of this container to its canvas. Note that the rendered contents need to be :meth:`place`\\ d on the parent container's canvas before they become visible.""" for child in self.children: child.render(type, rerender) def check_overflow(self): return all(child.check_overflow() for child in self.children) def place_children(self): for child in self.children: child.place() def place(self): """Place this container's canvas onto the parent container's canvas.""" if self.sideways == 'left': self.canvas.translate(float(self.height), 0) self.canvas.rotate(-90) elif self.sideways == 'right': self.canvas.translate(0, float(self.width)) self.canvas.rotate(90) self.place_children() self.canvas.append(self.parent.canvas, float(self.left), float(self.top)) def before_placing(self, preallocate=False): for child in self.children: child.before_placing(preallocate) BACKGROUND = 'background' CONTENT = 'content' HEADER_FOOTER = 'header_footer' CHAPTER_TITLE = 'chapter_title' class FlowablesContainerBase(Container): """A :class:`Container` that renders :class:`Flowable`\\ s to a rectangular area on a page. The first flowable is rendered at the top of the container. The next flowable is rendered below the first one, and so on.""" def __init__(self, name, type, parent, left=None, top=None, width=None, height=None, right=None, bottom=None, vertically_center_content=False): self._self_cursor = Dimension(0) # initialized at container's top edge self._cursor = DimensionAddition(self._self_cursor) self._placed_styleds = {} super().__init__(name, parent, left=left, top=top, width=width, height=height, right=right, bottom=bottom) self.type = type self.vertically_center_content = vertically_center_content @property def top_level_container(self): try: return self.parent.top_level_container except AttributeError: return self def clear(self): super().clear() del self.children[:] self._placed_styleds.clear() self._self_cursor._value = 0 # initialized at container's top edge del self._cursor.addends[1:] def mark_page_nonempty(self): if self.type == CONTENT: self.page._empty = False elif self.type is None: self.parent.mark_page_nonempty() @property def cursor(self): """Keeps track of where the next flowable is to be placed. As flowables are flowed into the container, the cursor moves down.""" return float(self._cursor) @property def remaining_height(self): return self.height - self.cursor def advance(self, height, ignore_overflow=False): """Advance the cursor by `height`. If this would cause the cursor to point beyond the bottom of the container, an :class:`EndOfContainer` exception is raised.""" if height <= self.remaining_height + FLOATING_POINT_FUZZ: self._self_cursor.grow(height) elif ignore_overflow: self._self_cursor.grow(float(self.remaining_height)) else: raise ContainerOverflow(self.page.number) def advance2(self, height, ignore_overflow=False): """Advance the cursor by `height`. Returns `True` on success. Returns `False` if this would cause the cursor to point beyond the bottom of the container. """ if height <= self.remaining_height + FLOATING_POINT_FUZZ: self._self_cursor.grow(height) elif ignore_overflow: self._self_cursor.grow(float(self.remaining_height)) else: return False return True def check_overflow(self): return self.type is not CONTENT or self.remaining_height > 0 def render(self, type, rerender=False): if type in (self.type, None): self._render(type, rerender) if self.vertically_center_content and type is CONTENT: self.top += float(self.remaining_height) / 2 def _render(self, type, rerender): raise NotImplementedError('{}.render()'.format(self.__class__.__name__)) def register_styled(self, styled, continued=False): styleds = self._placed_styleds.setdefault(len(self.children), []) styleds.append((styled, continued)) def before_placing(self, preallocate=False): def log_styleds(index): for styled, continued in self._placed_styleds.get(index, ()): self.document.style_log.log_styled(styled, self, continued) styled.before_placing(self, preallocate) log_styleds(0) for i, child in enumerate(self.children, start=1): child.before_placing(preallocate) log_styleds(i) FLOATING_POINT_FUZZ = 1e-10 class _FlowablesContainer(FlowableTarget, FlowablesContainerBase): def __init__(self, name, type, parent, *args, **kwargs): super().__init__(parent.document_part, name, type, parent, *args, **kwargs) def _render(self, type, rerender): self.flowables.flow(self, last_descender=None) class FlowablesContainer(_FlowablesContainer): """A container that renders a predefined series of flowables.""" def __init__(self, name, type, parent, left=None, top=None, width=None, height=None, right=None, bottom=None, vertically_center_content=False): super().__init__(name, type, parent, left=left, top=top, width=width, height=height, right=right, bottom=bottom, vertically_center_content=vertically_center_content) class ChainedContainer(FlowablesContainerBase): """A container that renders flowables from the :class:`Chain` it is part of.""" def __init__(self, name, type, parent, chain, left=None, top=None, width=None, height=None, right=None, bottom=None, vertically_center_content=False): super().__init__(name, type, parent, left=left, top=top, width=width, height=height, right=right, bottom=bottom, vertically_center_content=vertically_center_content) chain.containers.append(self) self.chain = chain def _render(self, type, rerender): self.chain.render(self, rerender=rerender) class ExpandingContainerBase(FlowablesContainerBase): """A dynamically, vertically growing :class:`Container`.""" def __init__(self, name, type, parent, left=None, top=None, width=None, right=None, bottom=None, max_height=None): """See :class:`ContainerBase` for information on the `parent`, `left`, `width` and `right` parameters. `max_height` is the maximum height this container can grow to.""" height = DimensionAddition() super().__init__(name, type, parent, left=left, top=top, width=width, height=height, right=right, bottom=bottom) self.height.addends.append(self._cursor) self.max_height = max_height or float('+inf') @property def remaining_height(self): return self.max_height - self.cursor class DownExpandingContainerBase(ExpandingContainerBase): """A container that is anchored at the top and expands downwards.""" def __init__(self, name, type, parent, left=None, top=None, width=None, right=None, max_height=None): """See :class:`Container` for information on the `name`, `parent`, `left`, `width` and `right` parameters. `top` specifies the location of the container's top edge with respect to that of the parent container. When `top` is omitted, the top edge is placed at the top edge of the parent container. `max_height` is the maximum height this container can grow to.""" super().__init__(name, type, parent, left=left, top=top, width=width, right=right, max_height=max_height) class DownExpandingContainer(_FlowablesContainer, ExpandingContainerBase): def __init__(self, name, type, parent, left=None, top=None, width=None, right=None, max_height=None): super().__init__(name, type, parent, left=left, top=top, width=width, right=right, max_height=max_height) class ConditionalDownExpandingContainerBase(DownExpandingContainerBase): def __init__(self, name, type, parent, left=None, top=None, width=None, right=None, max_height=None, place=True): super().__init__(name, type, parent, left=left, top=top, width=width, right=right, max_height=max_height) self._do_place = place def do_place(self, place=True): self._do_place = place def place(self): if self._do_place: super().place() def before_placing(self, preallocate=False): if self._do_place: super().before_placing(preallocate) class InlineDownExpandingContainer(ConditionalDownExpandingContainerBase): """A :class:`DownExpandingContainer` whose top edge is placed at the parent's current cursor position. As flowables are flowed in this container, the parent's cursor also advances (but this behavior can be suppressed). See :class:`Container` about the `name`, `parent`, `left`, `width` and `right` parameters. Setting `advance_parent` to `False` prevents the parent container's cursor being advanced. """ def __init__(self, name, parent, left=None, width=None, right=None, advance_parent=True, place=True): super().__init__(name, None, parent, left=left, top=parent.cursor, width=width, right=right, max_height=parent.remaining_height, place=place) if advance_parent: parent._cursor.addends.append(self._cursor) class UpExpandingContainer(_FlowablesContainer, ExpandingContainerBase): """A container that is anchored at the bottom and expands upwards.""" def __init__(self, name, type, parent, left=None, bottom=None, width=None, right=None, max_height=None): """See :class:`ContainerBase` for information on the `name`, `parent`, `left`, `width` and `right` parameters. `bottom` specifies the location of the container's bottom edge with respect to that of the parent container. When `bottom` is omitted, the bottom edge is placed at the bottom edge of the parent container. `max_height` is the maximum height this container can grow to.""" bottom = bottom or parent.height super().__init__(name, type, parent, left=left, top=None, width=width, right=right, bottom=bottom, max_height=max_height) class UpDownExpandingContainer(_FlowablesContainer, ExpandingContainerBase): """A container that is anchored in the middle and symetrically expands upwards and downwards.""" def __init__(self, name, type, parent, left=None, middle=None, width=None, right=None, max_height=None): """See :class:`ContainerBase` for information on the `name`, `parent`, `left`, `width` and `right` parameters. `middle` specifies the location of the container's vertical center with respect to the top of the parent container. When `middle` is omitted, the middle is placed at the top edge of the parent container. `max_height` is the maximum height this container can grow to.""" if middle is None: middle = 0*PT top = middle super().__init__(name, type, parent, left=left, top=top, width=width, right=right, max_height=max_height) self.top -= self.height / 2 class _MaybeContainer(InlineDownExpandingContainer): def __init__(self, parent, left=None, width=None, right=None): super().__init__('MAYBE', parent, left=left, width=width, right=right, place=False) class MaybeContainer(ContextManager): def __init__(self, parent, left=None, width=None, right=None): self._container = _MaybeContainer(parent, left, width, right) def __enter__(self): return self._container def __exit__(self, exc_type, exc_value, _): if (exc_type is None or (issubclass(exc_type, (EndOfContainer, PageBreakException)) and not exc_value.flowable_state.initial)): self._container.do_place() class VirtualContainer(ConditionalDownExpandingContainerBase): """An infinitely down-expanding container whose contents are not automatically placed on the parent container's canvas. This container's content needs to be placed explicitly using :meth:`place_at`.""" register_with_parent = False def __init__(self, parent, width=None, never_placed=False): """`width` specifies the width of the container.""" super().__init__('VIRTUAL', None, parent, width=width, max_height=float('+inf'), place=False) self._never_placed = never_placed def place_at(self, parent_container, left, top): self.parent = parent_container parent_container.children.append(self) self.left = left self.top = top self.do_place() class FloatContainer(ExpandingContainerBase): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) class TopFloatContainer(DownExpandingContainer, FloatContainer): pass class BottomFloatContainer(UpExpandingContainer, FloatContainer): pass class FootnoteContainer(UpExpandingContainer): def __init__(self, name, parent, left=None, bottom=None, width=None, right=None, max_height=None): super().__init__(name, CONTENT, parent, left, bottom, width=width, right=right, max_height=max_height) self._footnote_number = 0 self._footnote_space = self self.footnotes = [] self._flowing_footnotes = False self._reflowed = False self._descenders = [0] self._allocation_phase = True self._placed_footnotes = set() parent._footnote_space = self def add_footnote(self, footnote, preallocate): self.footnotes.append(footnote) if not self._flowing_footnotes: self._flowing_footnotes = True if not self.flow_footnotes(preallocate): return False self._flowing_footnotes = False return True def flow_footnotes(self, preallocate=False): if self._allocation_phase and not preallocate: self.clear() self._descenders = [0] self._allocation_phase = False self._placed_footnotes.clear() if self._reflowed: self._cursor.addends.pop() self._descenders.pop() maybe_container = _MaybeContainer(self) for i, footnote in enumerate(self.footnotes): footnote_id = footnote.get_id(self.document) if footnote_id not in (self._placed_footnotes | self.document.placed_footnotes): _, _, descender = footnote.flow(maybe_container, self._descenders[-1], footnote=True) self._descenders.append(descender) self._reflowed = True if not self.page.check_overflow(): assert self._allocation_phase return False self._reflowed = False self._placed_footnotes.add(footnote_id) if not self._allocation_phase: self.document.placed_footnotes |= self._placed_footnotes maybe_container.do_place() return True class Chain(FlowableTarget): """A :class:`FlowableTarget` that renders its flowables to a series of containers. Once a container is filled, the chain starts flowing flowables into the next container.""" def __init__(self, document_part): """Initialize this chain. `document` is the :class:`Document` this chain is part of.""" super().__init__(document_part) self.document_part = document_part self.init_state() self.containers = [] self.done = True def init_state(self): """Reset the state of this chain: empty the list of containers, and zero the counter keeping track of which flowable needs to be rendered next. """ self._state = self._fresh_page_state = None self._rerendering = False @property def last_container(self): return self.containers[-1] def render(self, container, rerender=False): """Flow the flowables into the containers that have been added to this chain.""" if rerender: container.clear() if not self._rerendering: # restore saved state on this chain's 1st container on this page self._state = copy(self._fresh_page_state) self._rerendering = True try: self.done = False self.flowables.flow(container, last_descender=None, state=self._state) # all flowables have been rendered from .flowable import GroupedFlowablesState self._state = GroupedFlowablesState(None, []) self.done = True except PageBreakException as exc: self._state = exc.flowable_state self._fresh_page_state = copy(self._state) raise except EndOfContainer as e: self._state = e.flowable_state if container == self.last_container: # save state for when ReflowRequired occurs self._fresh_page_state = copy(self._state) except ReflowRequired: self._rerendering = False raise
/rinohtype-0.5.4.tar.gz/rinohtype-0.5.4/src/rinoh/layout.py
0.825449
0.458773
layout.py
pypi
from .attribute import Attribute, Bool from .flowable import GroupedFlowables, GroupedFlowablesStyle, DummyFlowable from .paragraph import Paragraph from .reference import Reference from .strings import StringField from .structure import Section, Heading, SectionTitles from .style import Styled from .text import MixedStyledText, StyledText from .util import intersperse __all__ = ['IndexSection', 'Index', 'IndexStyle', 'IndexLabel', 'IndexTerm', 'InlineIndexTarget', 'IndexTarget'] class IndexSection(Section): def __init__(self, title=None, flowables=None, style=None): section_title = title or StringField(SectionTitles, 'index') contents = [Heading(section_title, style='unnumbered')] if flowables: contents += list(flowables) else: contents.append(Index()) super().__init__(contents, style=style) class IndexStyle(GroupedFlowablesStyle): initials = Attribute(Bool, True, 'Group index entries based on their ' 'first letter') class Index(GroupedFlowables): style_class = IndexStyle location = 'index' def __init__(self, id=None, style=None, parent=None): super().__init__(id=id, style=style, parent=parent) self.source = self def flowables(self, container): initials = self.get_style('initials', container) def hande_level(index_entries, level=1): top_level = level == 1 entries = sorted((name for name in index_entries if name), key=lambda s: (s.lower(), s)) last_section = None for entry in entries: first = entry[0] section = first.upper() if first.isalpha() else 'Symbols' term, subentries = index_entries[entry] if initials and top_level and section != last_section: yield IndexLabel(section) last_section = section target_ids = [target.get_id(document) for term, target in subentries.get(None, ())] yield IndexEntry(term, level, target_ids) for paragraph in hande_level(subentries, level=level + 1): yield paragraph document = container.document index_entries = container.document.index_entries for paragraph in hande_level(index_entries): yield paragraph class IndexLabel(Paragraph): pass class IndexEntry(Paragraph): def __init__(self, content, level, target_ids=None, id=None, style=None, parent=None): if target_ids: refs = intersperse((Reference(id, 'page') for id in target_ids), ', ') entry_text = content + ', ' + MixedStyledText(refs) else: entry_text = content super().__init__(entry_text, id=id, style=style, parent=parent) self.index_level = level class IndexTerm(tuple): def __new__(cls, *levels): return super().__new__(cls, levels) def __repr__(self): return type(self).__name__ + super().__repr__() class IndexTargetBase(Styled): def __init__(self, index_terms, *args, **kwargs): super().__init__(*args, **kwargs) self.index_terms = index_terms def prepare(self, flowable_target): super().prepare(flowable_target) index_entries = flowable_target.document.index_entries for index_term in self.index_terms: level_entries = index_entries for term in index_term: term_str = (term.to_string(flowable_target) if isinstance(term, StyledText) else term) _, level_entries = level_entries.setdefault(term_str, (term, {})) level_entries.setdefault(None, []).append((index_term, self)) class InlineIndexTarget(IndexTargetBase, StyledText): def to_string(self, flowable_target): return '' def spans(self, container): self.create_destination(container) return iter([]) class IndexTarget(IndexTargetBase, DummyFlowable): category = 'Index' def __init__(self, index_terms, parent=None): super().__init__(index_terms, parent=parent) def flow(self, container, last_descender, state=None, **kwargs): self.create_destination(container) return super().flow(container, last_descender, state=state)
/rinohtype-0.5.4.tar.gz/rinohtype-0.5.4/src/rinoh/index.py
0.604516
0.216819
index.py
pypi
import os import re import struct from binascii import unhexlify from io import BytesIO from warnings import warn from . import Font, GlyphMetrics, LeafGetter, MissingGlyphException from .mapping import UNICODE_TO_GLYPH_NAME, ENCODINGS from ..font.style import FontVariant, FontWeight, FontSlant, FontWidth from ..util import cached from ..warnings import warn def string(string): return string.strip() def number(string): try: number = int(string) except ValueError: number = float(string) return number def boolean(string): return string.strip() == 'true' class AdobeFontMetricsParser(dict): SECTIONS = {'FontMetrics': string, 'CharMetrics': int} KEYWORDS = {'FontName': string, 'FullName': string, 'FamilyName': string, 'Weight': string, 'FontBBox': (number, number, number, number), 'Version': string, 'Notice': string, 'EncodingScheme': string, 'MappingScheme': int, 'EscChar': int, 'CharacterSet': string, 'Characters': int, 'IsBaseFont': boolean, 'VVector': (number, number), 'IsFixedV': boolean, 'CapHeight': number, 'XHeight': number, 'Ascender': number, 'Descender': number, 'StdHW': number, 'StdVW': number, 'UnderlinePosition': number, 'UnderlineThickness': number, 'ItalicAngle': number, 'CharWidth': (number, number), 'IsFixedPitch': boolean} HEX_NUMBER = re.compile(r'<([\da-f]+)>', re.I) def __init__(self, file): self._glyphs = {} self._ligatures = {} self._kerning_pairs = {} sections, section = [self], self section_names = [None] for line in file.readlines(): try: key, values = line.split(None, 1) except ValueError: key, values = line.strip(), [] if not key: continue if key == 'Comment': pass elif key.startswith('Start'): section_name = key[5:] section_names.append(section_name) section[section_name] = {} section = section[section_name] sections.append(section) elif key.startswith('End'): assert key[3:] == section_names.pop() sections.pop() section = sections[-1] elif section_names[-1] == 'CharMetrics': glyph_metrics = self._parse_character_metrics(line) self._glyphs[glyph_metrics.name] = glyph_metrics elif section_names[-1] == 'KernPairs': tokens = line.split() if tokens[0] == 'KPX': pair, kerning = (tokens[1], tokens[2]), tokens[-1] self._kerning_pairs[pair] = number(kerning) else: raise NotImplementedError elif section_names[-1] == 'Composites': warn('Composites in Type1 fonts are currently not supported.' '({})'.format(self.filename) if self.filename else '') elif key == chr(26): # EOF marker assert not file.read() else: funcs = self.KEYWORDS[key] try: values = [func(val) for func, val in zip(funcs, values.split())] except TypeError: values = funcs(values) section[key] = values def _parse_character_metrics(self, line): ligatures = {} for item in line.strip().split(';'): if not item: continue tokens = item.split() key = tokens[0] if key == 'C': code = int(tokens[1]) elif key == 'CH': code = int(self.HEX_NUMBER.match(tokens[1]).group(1), base=16) elif key in ('WX', 'W0X'): width = number(tokens[1]) elif key in ('WY', 'W0Y'): height = number(tokens[1]) elif key in ('W', 'W0'): width, height = number(tokens[1]), number(tokens[2]) elif key == 'N': name = tokens[1] elif key == 'B': bbox = tuple(number(num) for num in tokens[1:]) elif key == 'L': ligatures[tokens[1]] = tokens[2] else: raise NotImplementedError if ligatures: self._ligatures[name] = ligatures return GlyphMetrics(name, width, bbox, code) class AdobeFontMetrics(Font, AdobeFontMetricsParser): units_per_em = 1000 # encoding is set in __init__ name = LeafGetter('FontMetrics', 'FontName') bounding_box = LeafGetter('FontMetrics', 'FontBBox') fixed_pitch = LeafGetter('FontMetrics', 'IsFixedPitch') italic_angle = LeafGetter('FontMetrics', 'ItalicAngle') ascender = LeafGetter('FontMetrics', 'Ascender', default=750) descender = LeafGetter('FontMetrics', 'Descender', default=-250) line_gap = 200 cap_height = LeafGetter('FontMetrics', 'CapHeight', default=700) x_height = LeafGetter('FontMetrics', 'XHeight', default=500) stem_v = LeafGetter('FontMetrics', 'StdVW', default=50) def __init__(self, file_or_filename, weight, slant, width, unicode_mapping=None): try: filename = file_or_filename file = open(file_or_filename, 'rt', encoding='ascii') close_file = True except TypeError: filename = None file = file_or_filename close_file = False self._suffixes = {FontVariant.NORMAL: ''} self._unicode_mapping = unicode_mapping AdobeFontMetricsParser.__init__(self, file) if close_file: file.close() if self.encoding_scheme == 'FontSpecific': self.encoding = {glyph.name: glyph.code for glyph in self._glyphs.values() if glyph.code > -1} else: self.encoding = ENCODINGS[self.encoding_scheme] super().__init__(filename, weight, slant, width) encoding_scheme = LeafGetter('FontMetrics', 'EncodingScheme') _SUFFIXES = {FontVariant.SMALL_CAPITAL: ('.smcp', '.sc', 'small'), FontVariant.OLDSTYLE_FIGURES: ('.oldstyle', )} def _find_suffix(self, char, variant, upper=False): try: return self._suffixes[variant] except KeyError: for suffix in self._SUFFIXES[variant]: for name in self._char_to_glyph_names(char, FontVariant.NORMAL): if name + suffix in self._glyphs: self._suffixes[variant] = suffix return suffix else: return '' ## if not upper: ## return self._find_suffix(self.char_to_name(char.upper()), ## possible_suffixes, True) def _unicode_to_glyph_names(self, unicode): if self._unicode_mapping: for name in self._unicode_mapping.get(unicode, []): yield name try: for name in UNICODE_TO_GLYPH_NAME[unicode]: yield name # TODO: map to uniXXXX or uXXXX names except KeyError: warn("Don't know how to map unicode index 0x{:04x} ({}) to a " "PostScript glyph name.".format(unicode, chr(unicode))) def _char_to_glyph_names(self, char, variant): suffix = self._find_suffix(char, variant) if char != ' ' else '' for name in self._unicode_to_glyph_names(ord(char)): yield name + suffix @cached def get_glyph_metrics(self, char, variant): for name in self._char_to_glyph_names(char, variant): if name in self._glyphs: return self._glyphs[name] if variant != FontVariant.NORMAL: warn('No {} variant found for unicode index 0x{:04x} ({}), falling ' 'back to the standard glyph.'.format(variant, ord(char), char)) return self.get_glyph_metrics(char, FontVariant.NORMAL) else: warn('{} does not contain glyph for unicode index 0x{:04x} ({}).' .format(self.name, ord(char), char)) raise MissingGlyphException def get_ligature(self, glyph, successor_glyph): try: ligature_name = self._ligatures[glyph.name][successor_glyph.name] return self._glyphs[ligature_name] except KeyError: return None def get_kerning(self, a, b): return self._kerning_pairs.get((a.name, b.name), 0.0) class PrinterFont(object): def __init__(self, header, body, trailer): self.header = header self.body = body self.trailer = trailer class PrinterFontASCII(PrinterFont): START_OF_BODY = re.compile(br'\s*currentfile\s+eexec\s*') def __init__(self, filename): with open(filename, 'rb') as file: header = self._parse_header(file) body, trailer = self._parse_body_and_trailer(file) super().__init__(header, body, trailer) @classmethod def _parse_header(cls, file): header = BytesIO() for line in file: # Adobe Reader can't handle carriage returns, so we remove them header.write(line.translate(None, b'\r')) if cls.START_OF_BODY.match(line.translate(None, b'\r\n')): break return header.getvalue() @staticmethod def _parse_body_and_trailer(file): body = BytesIO() trailer_lines = [] number_of_zeros = 0 lines = file.readlines() for line in reversed(lines): number_of_zeros += line.count(b'0') trailer_lines.append(lines.pop()) if number_of_zeros == 512: break elif number_of_zeros > 512: raise Type1ParseError for line in lines: cleaned = line.translate(None, b' \t\r\n') body.write(unhexlify(cleaned)) trailer = BytesIO() for line in reversed(trailer_lines): trailer.write(line.translate(None, b'\r')) return body.getvalue(), trailer.getvalue() class PrinterFontBinary(PrinterFont): SECTION_HEADER_FMT = '<BBI' SEGMENT_TYPES = {'header': 1, 'body': 2, 'trailer': 1} def __init__(self, filename): with open(filename, 'rb') as file: segments = [] for segment_name in ('header', 'body', 'trailer'): segment_type, segment = self._read_pfb_segment(file) if self.SEGMENT_TYPES[segment_name] != segment_type: raise Type1ParseError('Not a PFB file') segments.append(segment) check, eof_type = struct.unpack('<BB', file.read(2)) if check != 128 or eof_type != 3: raise Type1ParseError('Not a PFB file') super().__init__(*segments) @classmethod def _read_pfb_segment(cls, file): header_data = file.read(struct.calcsize(cls.SECTION_HEADER_FMT)) check, segment_type, length = struct.unpack(cls.SECTION_HEADER_FMT, header_data) if check != 128: raise Type1ParseError('Not a PFB file') return int(segment_type), file.read(length) class Type1Font(AdobeFontMetrics): def __init__(self, filename, weight=FontWeight.MEDIUM, slant=FontSlant.UPRIGHT, width=FontWidth.NORMAL, unicode_mapping=None, core=False): super().__init__(filename + '.afm', weight, slant, width, unicode_mapping) self.core = core if not core: if os.path.exists(filename + '.pfb'): self.font_program = PrinterFontBinary(filename + '.pfb') else: self.font_program = PrinterFontASCII(filename + '.pfa') class Type1ParseError(Exception): pass
/rinohtype-0.5.4.tar.gz/rinohtype-0.5.4/src/rinoh/font/type1.py
0.456652
0.203529
type1.py
pypi
import hashlib, math, io, struct from datetime import datetime, timedelta from collections import OrderedDict from ...util import all_subclasses def create_reader(data_format, process_struct=lambda data: data[0]): data_struct = struct.Struct('>' + data_format) def reader(file, **kwargs): data = data_struct.unpack(file.read(data_struct.size)) return process_struct(data) return reader # using the names and datatypes from the OpenType specification # http://www.microsoft.com/typography/otspec/ byte = create_reader('B') char = create_reader('b') ushort = create_reader('H') short = create_reader('h') ulong = create_reader('L') long = create_reader('l') fixed = create_reader('L', lambda data: data[0] / 2**16) int16 = fword = short uint16 = ufword = ushort uint24 = create_reader('3B', lambda data: sum([byte << (2 - i) for i, byte in enumerate(data)])) string = create_reader('4s', lambda data: data[0].decode('ascii').strip()) tag = string glyph_id = uint16 offset = uint16 longdatetime = create_reader('q', lambda data: datetime(1904, 1, 1) + timedelta(seconds=data[0])) class Packed(OrderedDict): reader = None fields = [] def __init__(self, file, **kwargs): super().__init__(self) self.value = self.__class__.reader(file) for name, mask, processor in self.fields: self[name] = processor(self.value & mask) def array(reader, length): def array_reader(file, **kwargs): return [reader(file, **kwargs) for _ in range(length)] return array_reader def context(reader, *indirect_args): def context_reader(file, base, table): args = [table[key] for key in indirect_args] return reader(file, *args) return context_reader def context_array(reader, count_key, *indirect_args, multiplier=1): def context_array_reader(file, table, **kwargs): length = int(table[count_key] * multiplier) args = [table[key] for key in indirect_args] return array(reader, length)(file, *args, table=table, **kwargs) return context_array_reader def indirect(reader, *indirect_args, offset_reader=offset): def indirect_reader(file, base, table, **kwargs): indirect_offset = offset_reader(file) restore_position = file.tell() args = [table[key] for key in indirect_args] result = reader(file, base + indirect_offset, *args, **kwargs) file.seek(restore_position) return result return indirect_reader def indirect_array(reader, count_key, *indirect_args): def indirect_array_reader(file, base, table): offsets = array(offset, table[count_key])(file) args = [table[key] for key in indirect_args] return [reader(file, base + entry_offset, *args) for entry_offset in offsets] return indirect_array_reader class OpenTypeTableBase(OrderedDict): entries = [] def __init__(self, file, file_offset=None, **kwargs): super().__init__() if file_offset is None: file_offset = kwargs.pop('base', None) self.parse(file, file_offset, self.entries, **kwargs) def parse(self, file, base, entries, **kwargs): kwargs.pop('table', None) for key, reader in entries: value = reader(file, base=base, table=self, **kwargs) if key is not None: self[key] = value class OpenTypeTable(OpenTypeTableBase): tag = None def __init__(self, file, file_offset=None, **kwargs): if file_offset is not None: file.seek(file_offset) super().__init__(file, file_offset, **kwargs) class MultiFormatTable(OpenTypeTable): formats = {} def __init__(self, file, file_offset=None, **kwargs): super().__init__(file, file_offset, **kwargs) table_format = self[self.entries[0][0]] if table_format in self.formats: self.parse(file, file_offset, self.formats[table_format]) class Record(OpenTypeTableBase): """The base offset for indirect entries in a `Record` is the parent table's base, not the `Record`'s base.""" def __init__(self, file, table=None, base=None): super().__init__(file, base) self._parent_table = table class OffsetTable(OpenTypeTable): entries = [('sfnt version', fixed), ('numTables', ushort), ('searchRange', ushort), ('entrySelector', ushort), ('rangeShift', ushort)] class TableRecord(OpenTypeTable): entries = [('tag', tag), ('checkSum', ulong), ('offset', ulong), ('length', ulong)] def check_sum(self, file): total = 0 table_offset = self['offset'] file.seek(table_offset) end_of_data = table_offset + 4 * math.ceil(self['length'] / 4) while file.tell() < end_of_data: value = ulong(file) if not (self['tag'] == 'head' and file.tell() == table_offset + 12): total += value checksum = total % 2**32 assert checksum == self['checkSum'] from .required import HmtxTable from .cff import CompactFontFormat from . import truetype, gpos, gsub, other class OpenTypeParser(dict): def __init__(self, filename): disk_file = open(filename, 'rb') file = io.BytesIO(disk_file.read()) disk_file.close() offset_table = OffsetTable(file) table_records = OrderedDict() for i in range(offset_table['numTables']): record = TableRecord(file) table_records[record['tag']] = record for tag, record in table_records.items(): record.check_sum(file) for tag in ('head', 'hhea', 'cmap', 'maxp', 'name', 'post', 'OS/2'): self[tag] = self._parse_table(file, table_records[tag]) self['hmtx'] = HmtxTable(file, table_records['hmtx']['offset'], self['hhea']['numberOfHMetrics'], self['maxp']['numGlyphs']) try: self['CFF'] = CompactFontFormat(file, table_records['CFF']['offset']) except KeyError: self['loca'] = truetype.LocaTable(file, table_records['loca']['offset'], self['head']['indexToLocFormat'], self['maxp']['numGlyphs']) self['glyf'] = truetype.GlyfTable(file, table_records['glyf']['offset'], self['loca']) for tag in ('kern', 'GPOS', 'GSUB'): if tag in table_records: self[tag] = self._parse_table(file, table_records[tag]) @staticmethod def _parse_table(file, table_record): for cls in all_subclasses(OpenTypeTable): if cls.tag == table_record['tag']: return cls(file, table_record['offset'])
/rinohtype-0.5.4.tar.gz/rinohtype-0.5.4/src/rinoh/font/opentype/parse.py
0.642096
0.335079
parse.py
pypi
import struct from binascii import hexlify from io import BytesIO def grab(file, data_format): data = file.read(struct.calcsize(data_format)) return struct.unpack('>' + data_format, data) card8 = lambda file: grab(file, 'B')[0] card16 = lambda file: grab(file, 'h')[0] offsize = card8 def offset(offset_size): return lambda file: grab(file, ('B', 'H', 'I', 'L')[offset_size - 1])[0] class Section(dict): def __init__(self, file, offset=None): if offset: file.seek(offset) for name, reader in self.entries: self[name] = reader(file) class Header(Section): entries = [('major', card8), ('minor', card8), ('hdrSize', card8), ('offSize', card8)] class OperatorExeption(Exception): def __init__(self, code): self.code = code class Operator(object): def __init__(self, name, type, default=None): self.name = name self.type = type self.default = default def __repr__(self): return "<Operator {}>".format(self.name) number = lambda array: array[0] sid = number boolean = lambda array: number(array) == 1 array = lambda array: array def delta(array): delta = [] last_value = 0 for item in array: delta.append(last_value + item) last_value = item class Dict(dict): # values (operands) - key (operator) pairs def __init__(self, file, length, offset=None): if offset is not None: file.seek(offset) else: offset = file.tell() operands = [] while file.tell() < offset + length: try: operands.append(self._next_token(file)) except OperatorExeption as e: operator = self.operators[e.code] self[operator.name] = operator.type(operands) operands = [] def _next_token(self, file): b0 = card8(file) if b0 == 12: raise OperatorExeption((12, card8(file))) elif b0 <= 22: raise OperatorExeption(b0) elif b0 == 28: return grab(file, 'h')[0] elif b0 == 29: return grab(file, 'i')[0] elif b0 == 30: # real real_string = '' while True: real_string += hexlify(file.read(1)).decode('ascii') if 'f' in real_string: real_string = (real_string.replace('a', '.') .replace('b', 'E') .replace('c', 'E-') .replace('e', '-') .rstrip('f')) return float(real_string) elif b0 < 32: raise NotImplementedError() elif b0 < 247: return b0 - 139 elif b0 < 251: b1 = card8(file) return (b0 - 247) * 256 + b1 + 108 elif b0 < 255: b1 = card8(file) return - (b0 - 251) * 256 - b1 - 108 else: raise NotImplementedError() class TopDict(Dict): operators = {0: Operator('version', sid), 1: Operator('Notice', sid), (12, 0): Operator('Copyright', sid), 2: Operator('FullName', sid), 3: Operator('FamilyName', sid), 4: Operator('Weight', sid), (12, 1): Operator('isFixedPitch', boolean, False), (12, 2): Operator('ItalicAngle', number, 0), (12, 3): Operator('UnderlinePosition', number, -100), (12, 4): Operator('UnderlineThickness', number, 50), (12, 5): Operator('PaintType', number, 0), (12, 6): Operator('CharstringType', number, 2), (12, 7): Operator('FontMatrix', array, [0.001, 0, 0, 0.001, 0, 0]), 13: Operator('UniqueID', number), 5: Operator('FontBBox', array, [0, 0, 0, 0]), (12, 8): Operator('StrokeWidth', number, 0), 14: Operator('XUID', array), 15: Operator('charset', number, 0), # charset offset (0) 16: Operator('Encoding', number, 0), # encoding offset (0) 17: Operator('CharStrings', number), # CharStrings offset (0) 18: Operator('Private', array), # Private DICT size # and offset (0) (12, 20): Operator('SyntheticBase', number), # synthetic base font index (12, 21): Operator('PostScript', sid), # embedded PostScript language code (12, 22): Operator('BaseFontName', sid), # (added as needed by Adobe-based technology) (12, 23): Operator('BaseFontBlend', delta)} # (added as needed by Adobe-based technology) class Index(list): """Array of variable-sized objects""" def __init__(self, file, offset_=None): if offset_ is not None: file.seek(offset_) count = card16(file) offset_size = card8(file) self.offsets = [] self.sizes = [] for i in range(count + 1): self.offsets.append(offset(offset_size)(file)) self.offset_reference = file.tell() - 1 for i in range(count): self.sizes.append(self.offsets[i + 1] - self.offsets[i]) class NameIndex(Index): def __init__(self, file, offset=None): super().__init__(file, offset) for name_offset, size in zip(self.offsets, self.sizes): file.seek(self.offset_reference + name_offset) name = file.read(size).decode('ascii') self.append(name) class TopDictIndex(Index): def __init__(self, file, offset=None): super().__init__(file, offset) for dict_offset, size in zip(self.offsets, self.sizes): self.append(TopDict(file, size, self.offset_reference + dict_offset)) class CompactFontFormat(object): def __init__(self, file, offset): if offset is not None: file.seek(offset) self.header = Header(file) assert self.header['major'] == 1 self.name = NameIndex(file, offset + self.header['hdrSize']) self.top_dicts = TopDictIndex(file) #String INDEX #Global Subr INDEX # ------------------- #Encodings #Charsets #FDSelect (CIDFonts only) #CharStrings INDEX (per-font) <========================================= #Font DICT INDEX (per-font, CIDFonts only) #Private DICT (per-font) #Local Subr INDEX (per-font or per-Private DICT for CIDFonts) #Copyright and Trademark Notices
/rinohtype-0.5.4.tar.gz/rinohtype-0.5.4/src/rinoh/font/opentype/cff.py
0.476092
0.307501
cff.py
pypi
import struct from .parse import OpenTypeTable, MultiFormatTable, Record from .parse import int16, uint16, ushort, ulong, Packed from .parse import array, context, context_array, indirect, indirect_array from .layout import LayoutTable, Coverage, ClassDefinition, Device from ...util import cached_property class ValueFormat(Packed): reader = uint16 fields = [('XPlacement', 0x0001, bool), ('YPlacement', 0x0002, bool), ('XAdvance', 0x0004, bool), ('YAdvance', 0x0008, bool), ('XPlaDevice', 0x0010, bool), ('YPlaDevice', 0x0020, bool), ('XAdvDevice', 0x0040, bool), ('YAdvDevice', 0x0080, bool)] formats = {'XPlacement': 'h', 'YPlacement': 'h', 'XAdvance': 'h', 'YAdvance': 'h', 'XPlaDevice': 'H', 'YPlaDevice': 'H', 'XAdvDevice': 'H', 'YAdvDevice': 'H'} @cached_property def data_format(self): data_format = '' for name, present in self.items(): if present: data_format += self.formats[name] return data_format @cached_property def present_keys(self): keys = [] for name, present in self.items(): if present: keys.append(name) return keys class ValueRecord(OpenTypeTable): formats = {'XPlacement': int16, 'YPlacement': int16, 'XAdvance': int16, 'YAdvance': int16, 'XPlaDevice': indirect(Device), 'YPlaDevice': indirect(Device), 'XAdvDevice': indirect(Device), 'YAdvDevice': indirect(Device)} def __init__(self, file, value_format): super().__init__(file) for name, present in value_format.items(): if present: self[name] = self.formats[name](file) class Anchor(MultiFormatTable): entries = [('AnchorFormat', uint16), ('XCoordinate', int16), ('YCoordinate', int16)] formats = {2: [('AnchorPoint', uint16)], 3: [('XDeviceTable', indirect(Device)), ('YDeviceTable', indirect(Device))]} class MarkRecord(Record): entries = [('Class', uint16), ('MarkAnchor', indirect(Anchor))] class MarkArray(OpenTypeTable): entries = [('MarkCount', uint16), ('MarkRecord', context_array(MarkRecord, 'MarkCount'))] class SingleAdjustmentSubtable(MultiFormatTable): entries = [('PosFormat', uint16), ('Coverage', indirect(Coverage)), ('ValueFormat', ValueFormat)] formats = {1: [('ValueRecord', context(ValueRecord, 'ValueFormat'))], 2: [('ValueCount', uint16), ('ValueRecord', context_array(context(ValueRecord, 'ValueFormat'), 'ValueCount'))]} class PairSetTable(OpenTypeTable): entries = [('PairValueCount', uint16)] def __init__(self, file, file_offset, format_1, format_2): super().__init__(file, file_offset) record_format = format_1.data_format + format_2.data_format value_1_length = len(format_1) format_1_keys = format_1.present_keys format_2_keys = format_2.present_keys pvr_struct = struct.Struct('>H' + record_format) pvr_size = pvr_struct.size pvr_list = [] self.by_second_glyph_id = {} for i in range(self['PairValueCount']): record_data = pvr_struct.unpack(file.read(pvr_size)) second_glyph = record_data[0] value_1 = {} value_2 = {} for i, key in enumerate(format_1_keys): value_1[key] = record_data[1 + i] for i, key in enumerate(format_2_keys): value_2[key] = record_data[1 + value_1_length + i] pvr = {'Value1': value_1, 'Value2': value_2} pvr_list.append(pvr) self.by_second_glyph_id[second_glyph] = pvr self['PairValueRecord'] = pvr_list class PairAdjustmentSubtable(MultiFormatTable): entries = [('PosFormat', uint16), ('Coverage', indirect(Coverage)), ('ValueFormat1', ValueFormat), ('ValueFormat2', ValueFormat)] formats = {1: [('PairSetCount', uint16), ('PairSet', indirect_array(PairSetTable, 'PairSetCount', 'ValueFormat1', 'ValueFormat2'))], 2: [('ClassDef1', indirect(ClassDefinition)), ('ClassDef2', indirect(ClassDefinition)), ('Class1Count', uint16), ('Class2Count', uint16)]} def __init__(self, file, file_offset=None): super().__init__(file, file_offset) format_1, format_2 = self['ValueFormat1'], self['ValueFormat2'] if self['PosFormat'] == 2: record_format = format_1.data_format + format_2.data_format c2r_struct = struct.Struct('>' + record_format) c2r_size = c2r_struct.size value_1_length = len(format_1) format_1_keys = format_1.present_keys format_2_keys = format_2.present_keys class_1_record = [] for i in range(self['Class1Count']): class_2_record = [] for j in range(self['Class2Count']): record_data = c2r_struct.unpack(file.read(c2r_size)) value_1 = {} value_2 = {} for i, key in enumerate(format_1_keys): value_1[key] = record_data[i] for i, key in enumerate(format_2_keys): value_2[key] = record_data[value_1_length + i] class_2_record.append({'Value1': value_1, 'Value2': value_2}) class_1_record.append(class_2_record) self['Class1Record'] = class_1_record def lookup(self, a_id, b_id): if self['PosFormat'] == 1: try: index = self['Coverage'].index(a_id) except ValueError: raise KeyError pair_value_record = self['PairSet'][index].by_second_glyph_id[b_id] return pair_value_record['Value1']['XAdvance'] elif self['PosFormat'] == 2: a_class = self['ClassDef1'].class_number(a_id) b_class = self['ClassDef2'].class_number(b_id) class_2_record = self['Class1Record'][a_class][b_class] return class_2_record['Value1']['XAdvance'] class EntryExitRecord(OpenTypeTable): entries = [('EntryAnchor', indirect(Anchor)), ('ExitAnchor', indirect(Anchor))] class CursiveAttachmentSubtable(OpenTypeTable): entries = [('PosFormat', uint16), ('Coverage', indirect(Coverage)), ('EntryExitCount', uint16), ('EntryExitRecord', context_array(EntryExitRecord, 'EntryExitCount'))] def lookup(self, a_id, b_id): assert self['PosFormat'] == 1 try: a_index = self['Coverage'].index(a_id) b_index = self['Coverage'].index(b_id) except ValueError: raise KeyError a_entry_exit = self['EntryExitRecord'][a_index] b_entry_exit = self['EntryExitRecord'][b_index] raise NotImplementedError class MarkCoverage(OpenTypeTable): pass class BaseCoverage(OpenTypeTable): pass class Mark2Array(OpenTypeTable): pass class BaseRecord(OpenTypeTable): ## entries = [('BaseAnchor', indirect_array(Anchor, 'ClassCount'))] def __init__(self, file, file_offset, class_count): super().__init__(self, file, file_offset) ## self['BaseAnchor'] = indirect_array(Anchor, 'ClassCount'])(file) class BaseArray(OpenTypeTable): entries = [('BaseCount', uint16)] ## ('BaseRecord', context_array(BaseRecord, 'BaseCount'))] def __init__(self, file, file_offset, class_count): super().__init__(self, file, file_offset) self['BaseRecord'] = array(BaseRecord, self['BaseCount'], class_count=class_count)(file) class MarkToBaseAttachmentSubtable(OpenTypeTable): entries = [('PosFormat', uint16), ('MarkCoverage', indirect(MarkCoverage)), ('BaseCoverage', indirect(BaseCoverage)), ('ClassCount', uint16), ('MarkArray', indirect(MarkArray)), ('BaseArray', indirect(BaseArray, 'ClassCount'))] class MarkToMarkAttachmentSubtable(OpenTypeTable): entries = [('PosFormat', uint16), ('Mark1Coverage', indirect(MarkCoverage)), ('Mark1Coverage', indirect(MarkCoverage)), ('ClassCount', uint16), ('Mark1Array', indirect(MarkArray)), ('Mark1Array', indirect(Mark2Array))] class ExtensionPositioning(OpenTypeTable): entries = [('PosFormat', ushort), ('ExtensionLookupType', ushort), ('ExtensionOffset', ulong)] def __init__(self, file, file_offset=None): super().__init__(file, file_offset=file_offset) subtable_class = GposTable.lookup_types[self['ExtensionLookupType']] table_offset = file_offset + self['ExtensionOffset'] self.subtable = subtable_class(file, table_offset) def lookup(self, *args, **kwargs): return self.subtable.lookup(*args, **kwargs) class GposTable(LayoutTable): """Glyph positioning table""" tag = 'GPOS' lookup_types = {1: SingleAdjustmentSubtable, 2: PairAdjustmentSubtable, 3: CursiveAttachmentSubtable, 4: MarkToBaseAttachmentSubtable, 6: MarkToMarkAttachmentSubtable, 9: ExtensionPositioning}
/rinohtype-0.5.4.tar.gz/rinohtype-0.5.4/src/rinoh/font/opentype/gpos.py
0.517083
0.227856
gpos.py
pypi
from .parse import OpenTypeTable, MultiFormatTable from .parse import uint16, ushort, ulong, glyph_id, array, indirect from .parse import context_array, indirect_array from .layout import LayoutTable from .layout import Coverage # Single substitution (subtable format 1) class SingleSubTable(MultiFormatTable): entries = [('SubstFormat', uint16), ('Coverage', indirect(Coverage))] formats = {1: [('DeltaGlyphID', glyph_id)], 2: [('GlyphCount', uint16), ('Substitute', context_array(glyph_id, 'GlyphCount'))]} def lookup(self, glyph_id): try: index = self['Coverage'].index(glyph_id) except ValueError: raise KeyError if self['SubstFormat'] == 1: return index + self['DeltaGlyphID'] else: return self['Substitute'][index] # Multiple subtitution (subtable format 2) class Sequence(OpenTypeTable): entries = [('GlyphCount', uint16), ('Substitute', context_array(glyph_id, 'GlyphCount'))] class MultipleSubTable(OpenTypeTable): entries = [('SubstFormat', uint16), ('Coverage', indirect(Coverage)), ('SequenceCount', uint16), ('Sequence', context_array(Sequence, 'SequenceCount'))] def lookup(self, glyph_id): try: index = self['Coverage'].index(glyph_id) except ValueError: raise KeyError raise NotImplementedError # Alternate subtitution (subtable format 3) class AlternateSubTable(OpenTypeTable): pass # Ligature substitution (subtable format 4) class Ligature(OpenTypeTable): entries = [('LigGlyph', glyph_id), ('CompCount', uint16)] def __init__(self, file, file_offset): super().__init__(file, file_offset) self['Component'] = array(glyph_id, self['CompCount'] - 1)(file) class LigatureSet(OpenTypeTable): entries = [('LigatureCount', uint16), ('Ligature', indirect_array(Ligature, 'LigatureCount'))] class LigatureSubTable(OpenTypeTable): entries = [('SubstFormat', uint16), ('Coverage', indirect(Coverage)), ('LigSetCount', uint16), ('LigatureSet', indirect_array(LigatureSet, 'LigSetCount'))] def lookup(self, a_id, b_id): try: index = self['Coverage'].index(a_id) except ValueError: raise KeyError ligature_set = self['LigatureSet'][index] for ligature in ligature_set['Ligature']: if ligature['Component'] == [b_id]: return ligature['LigGlyph'] raise KeyError # Chaining contextual substitution (subtable format 6) class ChainSubRule(OpenTypeTable): pass ## entries = [('BacktrackGlyphCount', uint16), ## ('Backtrack', context_array(glyph_id, 'BacktrackGlyphCount')), ## ('InputGlyphCount', uint16), ## ('Input', context_array(glyph_id, 'InputGlyphCount', ## lambda count: count - 1)), ## ('LookaheadGlyphCount', uint16), ## ('LookAhead', context_array(glyph_id, 'LookaheadGlyphCount')), ## ('SubstCount', uint16), ## ('SubstLookupRecord', context_array(glyph_id, 'SubstCount'))] class ChainSubRuleSet(OpenTypeTable): entries = [('ChainSubRuleCount', uint16), ('ChainSubRule', indirect(ChainSubRule))] class ChainingContextSubtable(MultiFormatTable): entries = [('SubstFormat', uint16)] formats = {1: [('Coverage', indirect(Coverage)), ('ChainSubRuleSetCount', uint16), ('ChainSubRuleSet', indirect_array(ChainSubRuleSet, 'ChainSubRuleSetCount'))]} # Extension substitution (subtable format 7) class ExtensionSubstitution(OpenTypeTable): entries = [('SubstFormat', ushort), ('ExtensionLookupType', ushort), ('ExtensionOffset', ulong)] def __init__(self, file, file_offset=None): super().__init__(file, file_offset=file_offset) subtable_class = GsubTable.lookup_types[self['ExtensionLookupType']] table_offset = file_offset + self['ExtensionOffset'] self.subtable = subtable_class(file, table_offset) def lookup(self, *args, **kwargs): return self.subtable.lookup(*args, **kwargs) class GsubTable(LayoutTable): """Glyph substitution table""" tag = 'GSUB' lookup_types = {1: SingleSubTable, 2: MultipleSubTable, 3: AlternateSubTable, 4: LigatureSubTable, #6: ChainingContextSubtable} 7: ExtensionSubstitution}
/rinohtype-0.5.4.tar.gz/rinohtype-0.5.4/src/rinoh/font/opentype/gsub.py
0.593963
0.255547
gsub.py
pypi
import struct from .parse import OpenTypeTable, MultiFormatTable, Record from .parse import byte, ushort, short, ulong, fixed, fword, ufword, uint24 from .parse import longdatetime, string, array, indirect, context_array, Packed from .macglyphs import MAC_GLYPHS from . import ids class HeadTable(OpenTypeTable): """Font header""" tag = 'head' entries = [('version', fixed), ('fontRevision', fixed), ('checkSumAdjustment', ulong), ('magicNumber', ulong), ('flags', ushort), ('unitsPerEm', ushort), ('created', longdatetime), ('modified', longdatetime), ('xMin', short), ('yMin', short), ('xMax', short), ('yMax', short), ('macStyle', ushort), ('lowestRecPPEM', ushort), ('fontDirectionHint', short), ('indexToLocFormat', short), ('glyphDataFormat', short)] @property def bounding_box(self): return (self['xMin'], self['yMin'], self['xMax'], self['yMax']) @property def bold(self): return bool(self['macStyle'] & MACSTYLE_BOLD) @property def italic(self): return bool(self['macStyle'] & MACSTYLE_ITALIC) @property def condensed(self): return bool(self['macStyle'] & MACSTYLE_CONDENSED) @property def extended(self): return bool(self['macStyle'] & MACSTYLE_EXTENDED) MACSTYLE_BOLD = 0x1 MACSTYLE_ITALIC = 0x2 MACSTYLE_UNDERLINE = 0x4 MACSTYLE_OUTLINE = 0x8 MACSTYLE_SHADOW = 0x10 MACSTYLE_CONDENSED = 0x20 MACSTYLE_EXTENDED = 0x40 class HheaTable(OpenTypeTable): """Horizontal header""" tag = 'hhea' entries = [('version', fixed), ('Ascender', fword), ('Descender', fword), ('LineGap', fword), ('advanceWidthMax', ufword), ('minLeftSideBearing', fword), ('minRightSideBearing', fword), ('xMaxExtent', fword), ('caretSlopeRise', short), ('caretSlopeRun', short), ('caretOffset', short), (None, short), (None, short), (None, short), (None, short), ('metricDataFormat', short), ('numberOfHMetrics', ushort)] class HmtxTable(OpenTypeTable): """Horizontal metrics""" tag = 'htmx' def __init__(self, file, file_offset, number_of_h_metrics, num_glyphs): super().__init__(file, file_offset) # TODO: rewrite using context_array ? file.seek(file_offset) advance_widths = [] left_side_bearings = [] for i in range(number_of_h_metrics): advance_width, lsb = ushort(file), short(file) advance_widths.append(advance_width) left_side_bearings.append(lsb) for i in range(num_glyphs - number_of_h_metrics): lsb = short(file) advance_widths.append(advance_width) left_side_bearings.append(lsb) self['advanceWidth'] = advance_widths self['leftSideBearing'] = left_side_bearings class MaxpTable(MultiFormatTable): """Maximum profile""" tag = 'maxp' entries = [('version', fixed), ('numGlyphs', ushort), ('maxPoints', ushort)] format_entries = {1.0: [('maxContours', ushort), ('maxCompositePoints', ushort), ('maxCompositeContours', ushort), ('maxZones', ushort), ('maxTwilightPoints', ushort), ('maxStorage', ushort), ('maxFunctionDefs', ushort), ('maxInstructionDefs', ushort), ('maxStackElements', ushort), ('maxSizeOfInstructions', ushort), ('maxComponentElements', ushort), ('maxComponentDepth', ushort)]} class OS2Table(OpenTypeTable): """OS/2 and Windows specific metrics""" tag = 'OS/2' entries = [('version', ushort), ('xAvgCharWidth', short), ('usWeightClass', ushort), ('usWidthClass', ushort), ('fsType', ushort), ('ySubscriptXSize', short), ('ySubscriptYSize', short), ('ySubscriptXOffset', short), ('ySubscriptYOffset', short), ('ySuperscriptXSize', short), ('ySuperscriptYSize', short), ('ySuperscriptXOffset', short), ('ySuperscriptYOffset', short), ('yStrikeoutSize', short), ('yStrikeoutPosition', short), ('sFamilyClass', short), ('panose', array(byte, 10)), ('ulUnicodeRange1', ulong), ('ulUnicodeRange2', ulong), ('ulUnicodeRange3', ulong), ('ulUnicodeRange4', ulong), ('achVendID', string), ('fsSelection', ushort), ('usFirstCharIndex', ushort), ('usLastCharIndex', ushort), ('sTypoAscender', short), ('sTypoDescender', short), ('sTypoLineGap', short), ('usWinAscent', ushort), ('usWinDescent', ushort), ('ulCodePageRange1', ulong), ('ulCodePageRange2', ulong), ('sxHeight', short), ('sCapHeight', short), ('usDefaultChar', ushort), ('usBreakChar', ushort), ('usMaxContext', ushort)] @property def italic(self): return bool(self['fsSelection'] & FSSELECTION_ITALIC) @property def bold(self): return bool(self['fsSelection'] & FSSELECTION_BOLD) @property def regular(self): return bool(self['fsSelection'] & FSSELECTION_REGULAR) @property def oblique(self): return bool(self['fsSelection'] & FSSELECTION_OBLIQUE) FSSELECTION_ITALIC = 0x1 FSSELECTION_UNDERSCORE = 0x2 FSSELECTION_NEGATIVE = 0x4 FSSELECTION_OUTLINED = 0x8 FSSELECTION_STRIKEOUT = 0x10 FSSELECTION_BOLD = 0x20 FSSELECTION_REGULAR = 0x40 FSSELECTION_USE_TYPO_METRICS = 0x80 FSSELECTION_WWS = 0x100 FSSELECTION_OBLIQUE = 0x200 class PostTable(MultiFormatTable): """PostScript information""" tag = 'post' entries = [('version', fixed), ('italicAngle', fixed), ('underlinePosition', fword), ('underlineThickness', fword), ('isFixedPitch', ulong), ('minMemType42', ulong), ('maxMemType42', ulong), ('minMemType1', ulong), ('maxMemType1', ulong)] formats = {2.0: [('numberOfGlyphs', ushort), ('glyphNameIndex', context_array(ushort, 'numberOfGlyphs'))]} def __init__(self, file, file_offset): super().__init__(file, file_offset) self.names = [] if self['version'] == 2.0: num_new_glyphs = max(self['glyphNameIndex']) - 257 names = [] for i in range(num_new_glyphs): names.append(self._read_pascal_string(file)) for index in self['glyphNameIndex']: if index < 258: name = MAC_GLYPHS[index] else: name = names[index - 258] self.names.append(name) elif self['version'] != 3.0: raise NotImplementedError def _read_pascal_string(self, file): length = byte(file) return struct.unpack('>{}s'.format(length), file.read(length))[0].decode('ascii') class NameRecord(Record): entries = [('platformID', ushort), ('encodingID', ushort), ('languageID', ushort), ('nameID', ushort), ('length', ushort), ('offset', ushort)] class LangTagRecord(Record): entries = [('length', ushort), ('offset', ushort)] class NameTable(MultiFormatTable): """Naming table""" tag = 'name' entries = [('format', ushort), ('count', ushort), ('stringOffset', ushort), ('nameRecord', context_array(NameRecord, 'count'))] formats = {1: [('langTagCount', ushort), ('langTagRecord', context_array(LangTagRecord, 'langTagCount'))]} def __init__(self, file, file_offset): super().__init__(file, file_offset) if self['format'] == 1: raise NotImplementedError string_offset = file_offset + self['stringOffset'] self.strings = {} for record in self['nameRecord']: file.seek(string_offset + record['offset']) data = file.read(record['length']) if record['platformID'] in (ids.PLATFORM_UNICODE, ids.PLATFORM_WINDOWS): string = data.decode('utf_16_be') elif record['platformID'] == ids.PLATFORM_MACINTOSH: # TODO: properly decode according to the specified encoding string = data.decode('mac_roman') else: raise NotImplementedError name = self.strings.setdefault(record['nameID'], {}) platform = name.setdefault(record['platformID'], {}) platform[record['languageID']] = string class SubHeader(OpenTypeTable): entries = [('firstCode', ushort), ('entryCount', ushort), ('idDelta', short), ('idRangeOffset', ushort)] class CmapGroup(OpenTypeTable): entries = [('startCharCode', ulong), ('endCharCode', ulong), ('startGlyphID', ulong)] class VariationSelectorRecord(OpenTypeTable): entries = [('varSelector', uint24), ('defaultUVSOffset', ulong), ('nonDefaultUVSOffset', ulong)] class CmapSubtable(MultiFormatTable): entries = [('format', ushort)] formats = {0: # Byte encoding table [('length', ushort), ('language', ushort), ('glyphIdArray', array(byte, 256))], 2: # High-byte mapping through table [('length', ushort), ('language', ushort), ('subHeaderKeys', array(ushort, 256))], 4: # Segment mapping to delta values [('length', ushort), ('language', ushort), ('segCountX2', ushort), ('searchRange', ushort), ('entrySelector', ushort), ('rangeShift', ushort), ('endCount', context_array(ushort, 'segCountX2', multiplier=0.5)), (None, ushort), ('startCount', context_array(ushort, 'segCountX2', multiplier=0.5)), ('idDelta', context_array(short, 'segCountX2', multiplier=0.5)), ('idRangeOffset', context_array(ushort, 'segCountX2', multiplier=0.5))], 6: # Trimmed table mapping [('length', ushort), ('language', ushort), ('firstCode', ushort), ('entryCount', ushort), ('glyphIdArray', context_array(ushort, 'entryCount'))], 8: # Mixed 16-bit and 32-bit coverage [(None, ushort), ('length', ulong), ('language', ulong), ('is32', array(byte, 8192)), ('nGroups', ulong), ('group', context_array(CmapGroup, 'nGroups'))], 10: # Trimmed array [(None, ushort), ('length', ulong), ('language', ulong), ('startCharCode', ulong), ('numchars', ulong), ('glyphs', context_array(ushort, 'numChars'))], 12: # Segmented coverage [(None, ushort), ('length', ulong), ('language', ulong), ('nGroups', ulong), ('groups', context_array(CmapGroup, 'nGroups'))], 13: # Many-to-one range mappings [(None, ushort), ('length', ulong), ('language', ulong), ('nGroups', ulong), ('groups', context_array(CmapGroup, 'nGroups'))], 14: # Unicode Variation Sequences [('length', ulong), ('numVarSelectorRecords', ulong), ('varSelectorRecord', context_array(VariationSelectorRecord, 'numVarSelectorRecords'))]} # TODO ## formats[99] = [('bla', ushort)] ## def _format_99_init(self): ## pass def __init__(self, file, file_offset=None, **kwargs): # TODO: detect already-parsed table (?) super().__init__(file, file_offset) # TODO: create format-dependent lookup function instead of storing # everything in a dict (not efficient for format 13 subtables fe) if self['format'] == 0: indices = array(byte, 256)(file) out = {i: index for i, index in enumerate(self['glyphIdArray'])} elif self['format'] == 2: raise NotImplementedError elif self['format'] == 4: seg_count = self['segCountX2'] >> 1 self['glyphIdArray'] = array(ushort, self['length'])(file) segments = zip(self['startCount'], self['endCount'], self['idDelta'], self['idRangeOffset']) out = {} for i, (start, end, delta, range_offset) in enumerate(segments): if i == seg_count - 1: assert end == 0xFFFF break if range_offset > 0: for j, code in enumerate(range(start, end + 1)): index = (range_offset >> 1) - seg_count + i + j out[code] = self['glyphIdArray'][index] else: for code in range(start, end + 1): out[code] = (code + delta) % 2**16 elif self['format'] == 6: out = {code: index for code, index in zip(range(self['firstCode'], self['firstCode'] + self['entryCount']), self['glyphIdArray'])} elif self['format'] == 12: out = {} for group in self['groups']: codes = range(group['startCharCode'], group['endCharCode'] + 1) segment = {code: group['startGlyphID'] + index for index, code in enumerate(codes)} out.update(segment) elif self['format'] == 13: out = {} for group in self['groups']: codes = range(group['startCharCode'], group['endCharCode'] + 1) segment = {code: group['startGlyphID'] for code in codes} out.update(segment) else: raise NotImplementedError self.mapping = out class CmapRecord(Record): entries = [('platformID', ushort), ('encodingID', ushort), ('subtable', indirect(CmapSubtable, offset_reader=ulong))] class CmapTable(OpenTypeTable): tag = 'cmap' entries = [('version', ushort), ('numTables', ushort), ('encodingRecord', context_array(CmapRecord, 'numTables'))] def __init__(self, file, file_offset): super().__init__(file, file_offset) for record in self['encodingRecord']: key = (record['platformID'], record['encodingID']) self[key] = record['subtable']
/rinohtype-0.5.4.tar.gz/rinohtype-0.5.4/src/rinoh/font/opentype/required.py
0.640636
0.251602
required.py
pypi
from .parse import OpenTypeTable, MultiFormatTable, Record, context_array from .parse import fixed, array, uint16, tag, glyph_id, offset, indirect, Packed class ListRecord(Record): entries = [('Tag', tag), ('Offset', offset)] def parse_value(self, file, file_offset, entry_type): self['Value'] = entry_type(file, file_offset + self['Offset']) class ListTable(OpenTypeTable): entry_type = None entries = [('Count', uint16), ('Record', context_array(ListRecord, 'Count'))] def __init__(self, file, file_offset, **kwargs): super().__init__(file, file_offset) self.by_tag = {} for record in self['Record']: record.parse_value(file, file_offset, self.entry_type) tag_list = self.by_tag.setdefault(record['Tag'], []) tag_list.append(record['Value']) class LangSysTable(OpenTypeTable): entries = [('LookupOrder', offset), ('ReqFeatureIndex', uint16), ('FeatureCount', uint16), ('FeatureIndex', context_array(uint16, 'FeatureCount'))] class ScriptTable(ListTable): entry_type = LangSysTable entries = [('DefaultLangSys', indirect(LangSysTable))] + ListTable.entries class ScriptListTable(ListTable): entry_type = ScriptTable class FeatureTable(OpenTypeTable): entries = [('FeatureParams', offset), ('LookupCount', uint16), ('LookupListIndex', context_array(uint16, 'LookupCount'))] def __init__(self, file, offset): super().__init__(file, offset) if self['FeatureParams']: # TODO: parse Feature Parameters pass else: del self['FeatureParams'] class FeatureListTable(ListTable): entry_type = FeatureTable class LookupFlag(Packed): reader = uint16 fields = [('RightToLeft', 0x0001, bool), ('IgnoreBaseGlyphs', 0x0002, bool), ('IgnoreLigatures', 0x0004, bool), ('IgnoreMarks', 0x0008, bool), ('UseMarkFilteringSet', 0x010, bool), ('MarkAttachmentType', 0xFF00, int)] class RangeRecord(OpenTypeTable): entries = [('Start', glyph_id), ('End', glyph_id), ('StartCoverageIndex', uint16)] class Coverage(MultiFormatTable): entries = [('CoverageFormat', uint16)] formats = {1: [('GlyphCount', uint16), ('GlyphArray', context_array(glyph_id, 'GlyphCount'))], 2: [('RangeCount', uint16), ('RangeRecord', context_array(RangeRecord, 'RangeCount'))]} def index(self, glyph_id): if self['CoverageFormat'] == 1: return self['GlyphArray'].index(glyph_id) else: for record in self['RangeRecord']: if record['Start'] <= glyph_id <= record['End']: return (record['StartCoverageIndex'] + glyph_id - record['Start']) raise ValueError class ClassRangeRecord(OpenTypeTable): entries = [('Start', glyph_id), ('End', glyph_id), ('Class', uint16)] class ClassDefinition(MultiFormatTable): entries = [('ClassFormat', uint16)] formats = {1: [('StartGlyph', glyph_id), ('GlyphCount', uint16), ('ClassValueArray', context_array(uint16, 'GlyphCount'))], 2: [('ClassRangeCount', uint16), ('ClassRangeRecord', context_array(ClassRangeRecord, 'ClassRangeCount'))]} def class_number(self, glyph_id): if self['ClassFormat'] == 1: index = glyph_id - self['StartGlyph'] if 0 <= index < self['GlyphCount']: return self['ClassValueArray'][index] else: for record in self['ClassRangeRecord']: if record['Start'] <= glyph_id <= record['End']: return record['Class'] return 0 def subtables(subtable_type, file, file_offset, offsets): """Skip lookup types/subtables that are not yet implemented""" for subtable_offset in offsets: try: yield subtable_type(file, file_offset + subtable_offset) except KeyError: continue class LookupTable(OpenTypeTable): entries = [('LookupType', uint16), ('LookupFlag', LookupFlag), ('SubTableCount', uint16)] def __init__(self, file, file_offset, subtable_types): super().__init__(file, file_offset) offsets = array(uint16, self['SubTableCount'])(file) if self['LookupFlag']['UseMarkFilteringSet']: self['MarkFilteringSet'] = uint16(file) subtable_type = subtable_types[self['LookupType']] self['SubTable'] = list(subtables(subtable_type, file, file_offset, offsets)) def lookup(self, *args, **kwargs): for subtable in self['SubTable']: try: return subtable.lookup(*args, **kwargs) except KeyError: pass raise KeyError class DelayedList(list): def __init__(self, reader, file, file_offset, item_offsets): super().__init__([None] * len(item_offsets)) self._reader = reader self._file = file self._offsets = [file_offset + item_offset for item_offset in item_offsets] def __getitem__(self, index): if super().__getitem__(index) is None: self[index] = self._reader(self._file, self._offsets[index]) return super().__getitem__(index) class LookupListTable(OpenTypeTable): entries = [('LookupCount', uint16)] def __init__(self, file, file_offset, types): super().__init__(file, file_offset) lookup_offsets = array(offset, self['LookupCount'])(file) lookup_reader = lambda file, file_offset: LookupTable(file, file_offset, types) self['Lookup'] = DelayedList(lookup_reader, file, file_offset, lookup_offsets) class LayoutTable(OpenTypeTable): entries = [('Version', fixed), ('ScriptList', indirect(ScriptListTable)), ('FeatureList', indirect(FeatureListTable))] def __init__(self, file, file_offset): super().__init__(file, file_offset) lookup_list_offset = offset(file) self['LookupList'] = LookupListTable(file, file_offset + lookup_list_offset, self.lookup_types) class Device(OpenTypeTable): entries = [('StartSize', uint16), ('EndSize', uint16), ('DeltaFormat', uint16), ('DeltaValue', uint16)]
/rinohtype-0.5.4.tar.gz/rinohtype-0.5.4/src/rinoh/font/opentype/layout.py
0.44071
0.293076
layout.py
pypi
from itertools import chain from ..attribute import AttributesDictionary from ..flowable import StaticGroupedFlowables from ..util import NotImplementedAttribute __all__ = ['TreeNode', 'InlineNode', 'BodyNode', 'BodySubNode', 'GroupingNode', 'DummyNode', 'TreeNodeMeta', 'Reader'] class TreeNode(object): node_name = None @classmethod def map_node(cls, node, **context): node_name = cls.node_tag_name(node) try: return cls._mapping[node_name.replace('-', '_')](node, **context) except KeyError: filename, line, node_name = cls.node_location(node) raise NotImplementedError("{}:{} the '{}' node is not yet supported " "({})" .format(filename, line, node_name, cls.__module__)) def __init__(self, doctree_node, **context): self.node = doctree_node self.context = context def __getattr__(self, name): for child in self.getchildren(): if child.tag_name == name: return child raise AttributeError('No such element: {} in {}'.format(name, self)) def __iter__(self): try: for child in self.parent.getchildren(): if child.tag_name == self.tag_name: yield child except AttributeError: # this is the root element yield self @property def tag_name(self): return self.node_tag_name(self.node) @property def parent(self): node_parent = self.node_parent(self.node) if node_parent is not None: return self.map_node(node_parent, **self.context) def getchildren(self): return [self.map_node(child, **self.context) for child in self.node_children(self.node)] @property def location(self): raise NotImplementedError @staticmethod def node_tag_name(node): raise NotImplementedError @staticmethod def node_parent(node): raise NotImplementedError @staticmethod def node_children(node): raise NotImplementedError @property def text(self): raise NotImplementedError @property def attributes(self): return NotImplementedError def get(self, key, default=None): raise NotImplementedError def __getitem__(self, name): raise NotImplementedError def process_content(self, style=None): raise NotImplementedError class InlineNode(TreeNode): style = None set_id = True def styled_text(self, **kwargs): styled_text = self.build_styled_text(**kwargs) ids = iter(self._ids) if self.set_id and self._ids: styled_text.id = next(ids) for id in ids: styled_text.secondary_ids.append(id) try: styled_text.source = self except AttributeError: # styled_text is None pass return styled_text def build_styled_text(self): return self.process_content(style=self.style) class BodyNodeBase(TreeNode): def children_flowables(self, skip_first=0): children = self.getchildren()[skip_first:] return list(chain(*(item.flowables() for item in children))) class BodyNode(BodyNodeBase): set_id = True def flowable(self): flowable, = self.flowables() return flowable def flowables(self): ids = iter(self._ids) for i, flowable in enumerate(self.build_flowables()): if self.set_id and i == 0 and self._ids: flowable.id = next(ids) for id in ids: flowable.secondary_ids.append(id) flowable.source = self yield flowable def build_flowables(self): yield self.build_flowable() def build_flowable(self): raise NotImplementedError('tag: %s' % self.tag_name) class BodySubNode(BodyNodeBase): def process(self): raise NotImplementedError('tag: %s' % self.tag_name) class GroupingNode(BodyNode): style = None grouped_flowables_class = StaticGroupedFlowables def build_flowable(self, style=None, **kwargs): return self.grouped_flowables_class(self.children_flowables(), style=style or self.style, **kwargs) class DummyNode(BodyNode, InlineNode): def flowables(self): # empty generator return yield def styled_text(self, preserve_space=False): return None class TreeNodeMeta(type): root = TreeNode bases = InlineNode, BodyNode, BodySubNode, GroupingNode, DummyNode def __new__(metaclass, name, bases, namespace): cls = super().__new__(metaclass, name, bases, namespace) node_name = cls.node_name or name.lower() if metaclass.root in bases: cls._mapping = {} cls._base_class = cls elif set(bases).isdisjoint(set(metaclass.bases)): cls._mapping[node_name] = cls return cls class Reader(AttributesDictionary): extensions = NotImplementedAttribute() def __getitem__(self, name): return getattr(self, name)
/rinohtype-0.5.4.tar.gz/rinohtype-0.5.4/src/rinoh/frontend/__init__.py
0.631481
0.243564
__init__.py
pypi
import re from ... import styleds from ...annotation import HyperLink, NamedDestination from . import EPubInlineNode, EPubBodyNode, EPubGroupingNode class Body(EPubBodyNode): pass class Section(EPubGroupingNode): grouped_flowables_class = styleds.Section class Div(EPubGroupingNode): grouped_flowables_class = styleds.Section RE_SECTION = re.compile(r'sect\d+') def build_flowables(self, **kwargs): div_class = self.get('class') if div_class and self.RE_SECTION.match(div_class): return super().build_flowables(**kwargs) else: return self.children_flowables() class Img(EPubBodyNode, EPubInlineNode): @property def image_path(self): return self.get('src') def build_flowable(self): return styleds.Image(self.image_path) def build_styled_text(self, strip_leading_whitespace=False): return styleds.InlineImage(self.image_path) class P(EPubBodyNode): def build_flowable(self): return styleds.Paragraph(super().process_content()) class H(EPubBodyNode): @property def in_section(self): parent = self.parent while not isinstance(parent, Body): if isinstance(parent, Section): return True parent = parent.parent return False def build_flowable(self): if self.in_section: try: kwargs = dict(custom_label=self.generated.build_styled_text()) except AttributeError: kwargs = dict() return styleds.Heading(self.process_content(), **kwargs) else: return styleds.Paragraph(self.process_content()) class H1(H): pass class H2(H): pass class H3(H): pass class H4(H): pass class Span(EPubInlineNode): def build_styled_text(self, strip_leading_whitespace): text = styleds.MixedStyledText(self.process_content()) text.classes = self.get('class').split(' ') return text class Em(EPubInlineNode): def build_styled_text(self, strip_leading_whitespace): return styleds.MixedStyledText(self.process_content(), style='emphasis') class Strong(EPubInlineNode): def build_styled_text(self, strip_leading_whitespace): return styleds.MixedStyledText(self.process_content(), style='strong') class Sup(EPubInlineNode): def build_styled_text(self, strip_leading_whitespace): return styleds.Superscript(self.process_content()) class Sub(EPubInlineNode): def build_styled_text(self, strip_leading_whitespace): return styleds.Subscript(self.process_content()) class Br(EPubBodyNode, EPubInlineNode): def build_flowables(self): return yield def build_styled_text(self, strip_leading_whitespace): return styleds.Newline() class Blockquote(EPubGroupingNode): style = 'block quote' class HR(EPubBodyNode): def build_flowable(self): return styleds.HorizontalRule() class A(EPubBodyNode, EPubInlineNode): def build_styled_text(self, strip_leading_whitespace): if self.get('href'): annotation = HyperLink(self.get('href')) style = 'external link' elif self.get('id'): annotation = NamedDestination(self.get('id')) style = None # else: # return styleds.MixedStyledText(self.process_content(), # style='broken link') content = self.process_content(style=style) content.annotation = annotation return content def build_flowables(self): children = self.getchildren() assert len(children) == 0 return yield class OL(EPubBodyNode): def build_flowable(self): return styleds.List([item.flowable() for item in self.li], style='enumerated') class UL(EPubBodyNode): def build_flowable(self): return styleds.List([item.flowable() for item in self.li], style='bulleted') class LI(EPubGroupingNode): pass class DL(EPubBodyNode): def build_flowable(self): items = [(dt.flowable(), dd.flowable()) for dt, dd in zip(self.dt, self.dd)] return styleds.DefinitionList(items) class DT(EPubBodyNode): def build_flowable(self): term = styleds.Paragraph(self.process_content()) return styleds.DefinitionTerm([term]) class DD(EPubGroupingNode): grouped_flowables_class = styleds.Definition
/rinohtype-0.5.4.tar.gz/rinohtype-0.5.4/src/rinoh/frontend/epub/nodes.py
0.419648
0.365343
nodes.py
pypi
import os import re from urllib.parse import urljoin from urllib.request import pathname2url from ...styleds import Paragraph from ...text import MixedStyledText from ...util import NotImplementedAttribute from ... import DATA_PATH from .. import (TreeNode, InlineNode, BodyNode, BodySubNode, GroupingNode, DummyNode, TreeNodeMeta) __all__ = ['filter', 'strip_and_filter', 'ElementTreeNode', 'ElementTreeInlineNode', 'ElementTreeBodyNode', 'ElementTreeBodySubNode', 'ElementTreeGroupingNode', 'ElementTreeMixedContentNode', 'ElementTreeDummyNode', 'ElementTreeNodeMeta'] CATALOG_PATH = os.path.join(DATA_PATH, 'xml', 'catalog') CATALOG_URL = urljoin('file:', pathname2url(CATALOG_PATH)) CATALOG_NS = "urn:oasis:names:tc:entity:xmlns:xml:catalog" RE_WHITESPACE = re.compile('[\t\r\n ]+') def ends_with_space(node): while node.getchildren(): node = node.getchildren()[-1] if node.tail: text = node.tail break else: text = node.text or '' return text.endswith(' ') def filter_styled_text_node(node, strip_leading_ws): styled_text = node.styled_text(strip_leading_ws) if styled_text: yield styled_text, ends_with_space(node) def strip_and_filter(text, strip_leading_whitespace): if not text: return if strip_leading_whitespace: text = text.lstrip() if text: yield text, text.endswith(' ') def filter_whitespace(text, children, strip_leading_ws): for item, strip_leading_ws in strip_and_filter(text, strip_leading_ws): yield item for child in children: for result in filter_styled_text_node(child, strip_leading_ws): styled_text, strip_leading_ws = result yield styled_text for item, strip_leading_ws in strip_and_filter(child.tail, strip_leading_ws): yield item def process_content(text, children, strip_leading_whitespace=True, style=None): text_items = filter_whitespace(text, children, strip_leading_whitespace) return MixedStyledText([item for item in text_items], style=style) class ElementTreeNode(TreeNode): NAMESPACE = NotImplementedAttribute() @classmethod def strip_namespace(cls, tag): if '{' in tag: assert tag.startswith('{{{}}}'.format(cls.NAMESPACE)) return tag[tag.find('}') + 1:] else: return tag @classmethod def node_tag_name(cls, node): return cls.strip_namespace(node.tag) @staticmethod def node_parent(node): return node._parent @staticmethod def node_children(node): return node.getchildren() @property def location(self): return self.node._root._filename, self.node.sourceline, self.tag_name @property def _id(self): return self.get('id') @property def _location(self): return self.node_location(self.node) @property def filename(self): return self.node._root._filename @property def text(self): if self.node.text: if self.get('xml:space') == 'preserve': return self.node.text else: return RE_WHITESPACE.sub(' ', self.node.text) else: return '' @property def tail(self): if self.node.tail: return RE_WHITESPACE.sub(' ', self.node.tail) else: return None @property def attributes(self): return self.node.attrib def get(self, key, default=None): return self.node.get(key, default) def __getitem__(self, name): return self.node[name] def process_content(self, strip_leading_whitespace=True, style=None): return process_content(self.text, self.getchildren(), strip_leading_whitespace, style=style) class ElementTreeInlineNode(ElementTreeNode, InlineNode): def styled_text(self, strip_leading_whitespace=False): return self.build_styled_text(strip_leading_whitespace) def build_styled_text(self, strip_leading_whitespace=False): return self.process_content(strip_leading_whitespace, style=self.style) class ElementTreeBodyNode(ElementTreeNode, BodyNode): def flowables(self): classes = self.get('classes') for flowable in super().flowables(): flowable.classes = classes yield flowable class ElementTreeBodySubNode(ElementTreeNode, BodySubNode): pass class ElementTreeGroupingNode(ElementTreeBodyNode, GroupingNode): pass class ElementTreeMixedContentNode(ElementTreeGroupingNode): def children_flowables(self): strip_leading_ws = True paragraph = [] for item, strip_leading_ws in strip_and_filter(self.text, strip_leading_ws): paragraph.append(item) for child in self.getchildren(): try: for result in filter_styled_text_node(child, strip_leading_ws): styled_text, strip_leading_ws = result paragraph.append(styled_text) except AttributeError: if paragraph and paragraph[0]: yield Paragraph(paragraph) paragraph = [] for flowable in child.flowables(): yield flowable for item, strip_leading_ws \ in strip_and_filter(child.tail, strip_leading_ws): paragraph.append(item) if paragraph and paragraph[0]: yield Paragraph(paragraph) class ElementTreeDummyNode(ElementTreeNode, DummyNode): pass class ElementTreeNodeMeta(TreeNodeMeta): root = ElementTreeNode bases = (ElementTreeInlineNode, ElementTreeBodyNode, ElementTreeBodySubNode, ElementTreeGroupingNode, ElementTreeDummyNode)
/rinohtype-0.5.4.tar.gz/rinohtype-0.5.4/src/rinoh/frontend/xml/__init__.py
0.516108
0.190592
__init__.py
pypi
from . import (DocBookNode, DocBookInlineNode, DocBookBodyNode, DocBookGroupingNode) from ...reference import TITLE, PAGE from ... import styleds class DocumentRoot(DocBookBodyNode): pass class Article(DocumentRoot): pass class Book(DocumentRoot): pass class Info(DocBookBodyNode): def build_flowable(self): doc_info = {field.key: field.value for field in self.getchildren()} return styleds.SetMetadataFlowable(**doc_info) class ArticleInfo(Info): pass class InfoField(DocBookNode): @property def key(self): return self.node.tag[self.node.tag.find('}') + 1:] class TextInfoField(InfoField): @property def value(self): return self.process_content() class GroupingInfoField(DocBookGroupingNode, InfoField): @property def value(self): return self.flowable() class Author(TextInfoField): pass class PersonName(DocBookInlineNode): pass class FirstName(DocBookInlineNode): pass class Surname(DocBookInlineNode): pass class Affiliation(DocBookInlineNode): pass class Address(DocBookInlineNode): pass class EMail(DocBookInlineNode): pass class Copyright(TextInfoField): pass class Year(DocBookInlineNode): pass class Holder(DocBookInlineNode): pass class Abstract(GroupingInfoField): pass class VolumeNum(TextInfoField): pass class Para(DocBookGroupingNode): pass class Emphasis(DocBookInlineNode): style = 'emphasis' class Acronym(DocBookInlineNode): style = 'acronym' class Title(DocBookBodyNode, TextInfoField): name = 'title' def build_flowable(self): if isinstance(self.parent, DocumentRoot): return styleds.SetMetadataFlowable(title=self.process_content()) elif isinstance(self.parent, ListBase): return styleds.Paragraph(self.process_content()) return styleds.Heading(self.process_content()) class Section(DocBookGroupingNode): grouped_flowables_class = styleds.Section class Chapter(Section): pass class Sect1(Section): pass class Sect2(Section): pass class Sect3(Section): pass class Sect4(Section): pass class Sect5(Section): pass class MediaObject(DocBookBodyNode): def build_flowables(self): for flowable in self.imageobject.flowables(): yield flowable class ImageObject(DocBookBodyNode): def build_flowable(self): return styleds.Image(self.imagedata.get('fileref')) class ImageData(DocBookNode): pass class TextObject(Para): pass class Phrase(DocBookInlineNode): pass class ListBase(DocBookBodyNode): style = None def build_flowables(self): for child in self.getchildren(): if isinstance(child, ListItem): break for flowable in child.flowables(): yield flowable yield styleds.List([item.flowable() for item in self.listitem], style=self.style) class OrderedList(ListBase): style = 'enumerated' class ItemizedList(ListBase): style = 'bulleted' class ListItem(DocBookGroupingNode): pass class XRef(DocBookBodyNode): def build_flowable(self): section_ref = styleds.Reference(self.get('linkend'), type=TITLE) page_ref = styleds.Reference(self.get('linkend'), type=PAGE) return styleds.Paragraph(section_ref + ' on page ' + page_ref)
/rinohtype-0.5.4.tar.gz/rinohtype-0.5.4/src/rinoh/frontend/docbook/nodes.py
0.544317
0.342187
nodes.py
pypi
import re from datetime import datetime import rinoh as rt from . import (DocutilsInlineNode, DocutilsNode, DocutilsBodyNode, DocutilsGroupingNode, DocutilsDummyNode) from ...dimension import DimensionUnit, INCH, CM, MM, PT, PICA, PERCENT from ...util import intersperse # Support for the following nodes is still missing # (http://docutils.sourceforge.net/docs/ref/doctree.html) # - abbreviation? (not exposed in default reStructuredText; Sphinx has :abbr:) # - acronym (not exposed in default reStructuredText?) # - pending (should not appear in final doctree?) # - substitution_reference (should not appear in final doctree?) class Text(DocutilsInlineNode): node_name = '#text' def styled_text(self): return self.text class Inline(DocutilsInlineNode): style = None class_styles = {} @property def style_from_class(self): for cls in self.get('classes'): if cls in self.class_styles: return self.class_styles[cls] return self.style def build_styled_text(self): return self.process_content(style=self.style_from_class) class Document(DocutilsGroupingNode): grouped_flowables_class = rt.DocumentTree class DocInfo(DocutilsBodyNode): def build_flowable(self): doc_info = {field.name: field.value for field in self.getchildren()} return rt.SetMetadataFlowable(**doc_info) class Decoration(DocutilsGroupingNode): pass class Header(DocutilsBodyNode): def build_flowable(self): return rt.WarnFlowable('Docutils header nodes are ignored. Please ' 'configure your document template instead.') class Footer(DocutilsBodyNode): def build_flowable(self): return rt.WarnFlowable('Docutils footer nodes are ignored. Please ' 'configure your document template instead.') # bibliographic elements class DocInfoField(DocutilsInlineNode): @property def name(self): return self.tag_name @property def value(self): return self.styled_text() class Author(DocInfoField): pass class Authors(DocInfoField): @property def value(self): return [author.styled_text() for author in self.author] class Copyright(DocInfoField): pass class Address(DocInfoField): pass class Organization(DocInfoField): pass class Contact(DocInfoField): pass class Date(DocInfoField): @property def value(self): try: return datetime.strptime(self.node.astext(), '%Y-%m-%d') except ValueError: return super().value class Version(DocInfoField): pass class Revision(DocInfoField): pass class Status(DocInfoField): pass # FIXME: the meta elements are removed from the docutils doctree class Meta(DocutilsBodyNode): MAP = {'keywords': 'keywords', 'description': 'subject'} def build_flowable(self): metadata = {self.MAP[self.get('name')]: self.get('content')} return rt.SetMetadataFlowable(**metadata) # body elements class System_Message(DocutilsBodyNode): def build_flowable(self): return rt.WarnFlowable(self.text) class Comment(DocutilsDummyNode): pass class Topic(DocutilsGroupingNode): style = 'topic' def _process_topic(self, topic_type): topic = super().build_flowable(style=topic_type) del topic.children[0] return rt.SetMetadataFlowable(**{topic_type: topic}) @property def set_id(self): classes = self.get('classes') return not ('contents' in classes and 'local' not in classes) def build_flowable(self): classes = self.get('classes') if 'contents' in classes: if 'local' in classes: flowables = [rt.TableOfContents(local=True)] try: flowables.insert(0, self.title.flowable()) except AttributeError: pass return rt.StaticGroupedFlowables(flowables, style='table of contents') else: return rt.SetMetadataFlowable(toc_ids=self.get('ids')) elif 'dedication' in classes: return self._process_topic('dedication') elif 'abstract' in classes: return self._process_topic('abstract') else: return super().build_flowable() class Rubric(DocutilsBodyNode): def build_flowable(self): return rt.Paragraph(self.process_content(), style='rubric') class Sidebar(DocutilsGroupingNode): style = 'sidebar' class Section(DocutilsGroupingNode): grouped_flowables_class = rt.Section class Paragraph(DocutilsBodyNode): style = None def build_flowable(self): return rt.Paragraph(self.process_content(), style=self.style) class Compound(DocutilsGroupingNode): pass class Title(DocutilsBodyNode, DocutilsInlineNode): def build_flowable(self): if isinstance(self.parent, Document): return rt.SetMetadataFlowable(title=self.process_content()) elif isinstance(self.parent, Section): try: kwargs = dict(custom_label=self.generated.build_styled_text()) except AttributeError: kwargs = dict() return rt.Heading(self.process_content(), **kwargs) else: return rt.Paragraph(self.process_content(), style='title') class Subtitle(DocutilsBodyNode): def build_flowable(self): return rt.SetMetadataFlowable(subtitle=self.process_content()) class Math_Block(DocutilsBodyNode): style = 'math' def build_flowables(self): yield rt.WarnFlowable("The 'math' directive is not yet supported") yield rt.Paragraph(self.process_content(), style=self.style) class Admonition(DocutilsGroupingNode): grouped_flowables_class = rt.Admonition def children_flowables(self, skip_first=0): try: self.title return super().children_flowables(skip_first=1) except AttributeError: return super().children_flowables() def build_flowable(self): admonition_type = self.__class__.__name__.lower() try: custom_title = self.title.styled_text() except AttributeError: custom_title = None return super().build_flowable(type=admonition_type, title=custom_title) class Attention(Admonition): pass class Caution(Admonition): pass class Danger(Admonition): pass class Error(Admonition): pass class Hint(Admonition): pass class Important(Admonition): pass class Note(Admonition): pass class Tip(Admonition): pass class Warning(Admonition): pass class Generated(DocutilsInlineNode): def styled_text(self): return None def build_styled_text(self): return self.process_content() class Emphasis(Inline): style = 'emphasis' class Strong(Inline): style = 'strong' class Title_Reference(DocutilsInlineNode): style = 'title reference' class Literal(Inline): style = 'monospaced' class Math(Inline): style = 'math' def build_styled_text(self): return (rt.WarnInline("The 'math' role is not yet supported") + super().build_styled_text()) class Superscript(DocutilsInlineNode): def build_styled_text(self): return rt.Superscript(self.process_content()) class Subscript(DocutilsInlineNode): def build_styled_text(self): return rt.Subscript(self.process_content()) class Problematic(DocutilsBodyNode, DocutilsInlineNode): def build_styled_text(self): return rt.SingleStyledText(self.text, style='error') def build_flowable(self): return rt.DummyFlowable() class Literal_Block(DocutilsBodyNode): lexer_getter = None @property def language(self): classes = self.get('classes') if classes and classes[0] == 'code': # .. code:: return classes[1] return None # literal block (double colon) def build_flowable(self): return rt.CodeBlock(self.text, language=self.language, lexer_getter=self.lexer_getter) class Block_Quote(DocutilsGroupingNode): style = 'block quote' class Attribution(Paragraph): style = 'attribution' def process_content(self, style=None): return '\N{EM DASH}' + super().process_content(style) class Line_Block(Paragraph): style = 'line block' def _process_block(self, line_block): for child in line_block.getchildren(): try: yield child.styled_text() except AttributeError: for line in self._process_block(child): yield rt.Tab() + line def process_content(self, style=None): lines = self._process_block(self) return rt.MixedStyledText(intersperse(lines, rt.Newline())) class Line(DocutilsInlineNode): pass class Doctest_Block(DocutilsBodyNode): def build_flowable(self): return rt.CodeBlock(self.text) class Reference(DocutilsBodyNode, DocutilsInlineNode): def build_styled_text(self): content = self.process_content() if self.get('refid'): return rt.Reference(self.get('refid'), custom_title=content) elif self.get('refuri'): content.annotation = rt.HyperLink(self.get('refuri')) content.style = 'external link' else: content.style = 'broken link' return content def build_flowable(self): children = self.getchildren() assert len(children) == 1 image = self.image.flowable() if self.get('refid'): image.annotation = rt.NamedDestinationLink(self.get('refid')) elif self.get('refuri'): image.annotation = rt.HyperLink(self.get('refuri')) return image class Footnote(DocutilsBodyNode): style = 'footnote' def build_flowable(self): return rt.Note(rt.StaticGroupedFlowables(self.children_flowables(1)), style=self.style) class Label(DocutilsBodyNode): def build_flowable(self): return rt.DummyFlowable() class Footnote_Reference(DocutilsInlineNode): style = 'footnote' def build_styled_text(self): return rt.NoteMarkerByID(self['refid'], custom_label=self.process_content(), style=self.style) class Citation(Footnote): style = 'citation' class Citation_Reference(Footnote_Reference): style = 'citation' class Substitution_Definition(DocutilsBodyNode): def build_flowable(self): label, = self.node.attributes['names'] content = self.process_content() return rt.SetUserStringFlowable(label, content) class Target(DocutilsBodyNode, DocutilsInlineNode): def build_styled_text(self): # TODO: what about refid? content = self.process_content() try: content.annotation = rt.NamedDestination(*self._ids) except IndexError: pass return content def build_flowable(self): return rt.AnchorFlowable() class Enumerated_List(DocutilsGroupingNode): style = 'enumerated' grouped_flowables_class = rt.List def build_flowable(self): # TODO: handle different numbering styles start = self.attributes.get('start', 1) return super().build_flowable(start_index=start) class Bullet_List(DocutilsGroupingNode): style = 'bulleted' grouped_flowables_class = rt.List def build_flowable(self): try: return super().build_flowable() except AttributeError: # empty list return rt.DummyFlowable() class List_Item(DocutilsGroupingNode): def build_flowable(self): return rt.ListItem(super().build_flowable()) class Definition_List(DocutilsGroupingNode): grouped_flowables_class = rt.DefinitionList class Definition_List_Item(DocutilsBodyNode): def build_flowable(self): term_text = self.term.styled_text() try: for classifier in self.classifier: term_text += ' : ' + classifier.styled_text() except AttributeError: pass term = rt.StaticGroupedFlowables([rt.Paragraph(term_text)], style='definition term') return rt.LabeledFlowable(term, self.definition.flowable()) class Term(DocutilsInlineNode): def build_styled_text(self): content = self.process_content() if self._ids: content.annotation = rt.NamedDestination(*self._ids) return content class Classifier(DocutilsInlineNode): def build_styled_text(self): return self.process_content('classifier') class Definition(DocutilsGroupingNode): style = 'definition' class Field_List(DocutilsGroupingNode): grouped_flowables_class = rt.DefinitionList style = 'field list' class Field(DocutilsBodyNode): @property def name(self): return self.field_name.text @property def value(self): return self.field_body.flowable() def build_flowable(self): label = rt.Paragraph(self.field_name.styled_text(), style='field name') return rt.LabeledFlowable(label, self.field_body.flowable()) class Field_Name(DocutilsInlineNode): pass class Field_Body(DocutilsGroupingNode): pass class Option_List(DocutilsGroupingNode): grouped_flowables_class = rt.DefinitionList style = 'option list' class Option_List_Item(DocutilsBodyNode): def build_flowable(self): return rt.LabeledFlowable(self.option_group.flowable(), self.description.flowable(), style='option') class Option_Group(DocutilsBodyNode): def build_flowable(self): options = (option.styled_text() for option in self.option) return rt.Paragraph(intersperse(options, ', '), style='option_group') class Option(DocutilsInlineNode): def build_styled_text(self): text = self.option_string.styled_text() try: delimiter = rt.MixedStyledText(self.option_argument['delimiter'], style='option_string') text += delimiter + self.option_argument.styled_text() except AttributeError: pass return rt.MixedStyledText(text) class Option_String(DocutilsInlineNode): def build_styled_text(self): return rt.MixedStyledText(self.process_content(), style='option_string') class Option_Argument(DocutilsInlineNode): def build_styled_text(self): return rt.MixedStyledText(self.process_content(), style='option_arg') class Description(DocutilsGroupingNode): pass class Image(DocutilsBodyNode, DocutilsInlineNode): @property def image_path(self): return self.get('uri') @property def options(self): width = convert_quantity(self.get('width')) height = convert_quantity(self.get('height')) align = self.get('align') scale = self.get('scale', 100) / 100 if scale != 1 and (width or height): width = width * scale if width else None height = height * scale if height else None scale = 1 return dict(align=align, width=width, height=height, scale=scale) def build_flowable(self): return rt.Image(self.image_path, **self.options) ALIGN_TO_BASELINE = {'bottom': 0, 'middle': 50*PERCENT, 'top': 100*PERCENT} def build_styled_text(self): options = self.options baseline = self.ALIGN_TO_BASELINE.get(options.pop('align')) return rt.InlineImage(self.image_path, baseline=baseline, **options) class Figure(DocutilsGroupingNode): grouped_flowables_class = rt.Figure def flowables(self): figure, = super().flowables() if figure.id is None: # docutils image = figure.children[0] figure.id = image.id figure.secondary_ids = image.secondary_ids figure.classes.extend(image.classes) yield figure class Caption(DocutilsBodyNode): def build_flowable(self): return rt.Caption(super().process_content()) class Legend(DocutilsGroupingNode): style = 'legend' class Transition(DocutilsBodyNode): def build_flowable(self): return rt.HorizontalRule() RE_LENGTH_PERCENT_UNITLESS = re.compile(r'^(?P<value>\d+\.?\d*)(?P<unit>[a-z%]*)$') # TODO: warn on px or when no unit is supplied DOCUTILS_UNIT_TO_DIMENSION = {'': PT, # assume points for unitless quantities 'in': INCH, 'cm': CM, 'mm': MM, 'pt': PT, 'pc': PICA, 'px': DimensionUnit(1 / 96 * INCH, 'px'), '%': PERCENT, 'em': None, 'ex': None} def convert_quantity(quantity_string): if quantity_string is None: return None value, unit = RE_LENGTH_PERCENT_UNITLESS.match(quantity_string).groups() return float(value) * DOCUTILS_UNIT_TO_DIMENSION[unit] class Table(DocutilsBodyNode): def build_flowable(self): tgroup = self.tgroup if 'colwidths-given' in self.get('classes'): column_widths = [int(colspec.get('colwidth')) for colspec in tgroup.colspec] else: column_widths = None try: head = tgroup.thead.get_table_section() except AttributeError: head = None body = tgroup.tbody.get_table_section() align = self.get('align') width_string = self.get('width') table = rt.Table(body, head=head, align=None if align == 'default' else align, width=convert_quantity(width_string), column_widths=column_widths) try: caption = rt.Caption(self.title.process_content()) except AttributeError: return table table_with_caption = rt.TableWithCaption([caption, table]) table_with_caption.classes.extend(self.get('classes')) return table_with_caption def flowables(self): classes = self.get('classes') flowable, = super(DocutilsBodyNode, self).flowables() try: caption, table = flowable.children except AttributeError: table = flowable table.classes.extend(classes) yield flowable class TGroup(DocutilsNode): pass class ColSpec(DocutilsNode): pass class TableRowGroup(DocutilsNode): section_cls = None def get_table_section(self): return self.section_cls([row.get_row() for row in self.row]) class THead(TableRowGroup): section_cls = rt.TableHead class TBody(TableRowGroup): section_cls = rt.TableBody class Row(DocutilsNode): def get_row(self): return rt.TableRow([entry.flowable() for entry in self.entry]) class Entry(DocutilsGroupingNode): grouped_flowables_class = rt.TableCell def build_flowable(self): rowspan = int(self.get('morerows', 0)) + 1 colspan = int(self.get('morecols', 0)) + 1 return super().build_flowable(rowspan=rowspan, colspan=colspan) class Raw(DocutilsBodyNode, DocutilsInlineNode): def build_styled_text(self): if self['format'] == 'rinoh': return rt.StyledText.from_string(self.text) def build_flowable(self): if self['format'] == 'rinoh': # TODO: Flowable.from_text(self.text) if self.text.startswith('ListOfFiguresSection'): return rt.ListOfFiguresSection() elif self.text == 'ListOfTablesSection': return rt.ListOfTablesSection() elif self.text == 'ListOfFigures(local=True)': return rt.ListOfFigures(local=True) elif self.text == 'ListOfTables(local=True)': return rt.ListOfTables(local=True) return rt.WarnFlowable("Unsupported raw pdf option: '{}'" .format(self.text)) elif self['format'] == 'pdf': # rst2pdf if self.text == 'PageBreak': return rt.PageBreak() return rt.WarnFlowable("Unsupported raw pdf option: '{}'" .format(self.text)) return rt.DummyFlowable() class Container(DocutilsGroupingNode): @property def set_id(self): return 'out-of-line' not in self['classes'] def build_flowable(self, style=None, **kwargs): classes = self.get('classes') if 'literal-block-wrapper' in classes: return rt.CodeBlockWithCaption(self.children_flowables(), style=style or self.style, **kwargs) if 'out-of-line' in classes: names = self['names'] if not names: raise MissingName('out-of-line container is missing a :name:' ' to reference it by') return rt.SetOutOfLineFlowables(names, self.children_flowables(), **kwargs) return super().build_flowable(style, **kwargs) class MissingName(Exception): pass
/rinohtype-0.5.4.tar.gz/rinohtype-0.5.4/src/rinoh/frontend/rst/nodes.py
0.488039
0.254752
nodes.py
pypi
from pathlib import Path from docutils.core import publish_doctree from docutils.io import FileInput from docutils.parsers.rst import Parser as ReStructuredTextParser from ...text import MixedStyledText from .. import (TreeNode, TreeNodeMeta, InlineNode, BodyNode, BodySubNode, GroupingNode, DummyNode, Reader) __all__ = ['DocutilsNode', 'DocutilsInlineNode', 'DocutilsBodyNode', 'DocutilsBodySubNode', 'DocutilsGroupingNode', 'DocutilsDummyNode', 'ReStructuredTextReader', 'from_doctree'] class DocutilsNode(TreeNode, metaclass=TreeNodeMeta): @staticmethod def node_tag_name(node): return node.tagname @staticmethod def node_parent(node): return node.parent @staticmethod def node_children(node): return node.children @staticmethod def node_location(node): return node.source, node.line, node.tagname @property def location(self): node_source, line, tag_name = self.node_location(self.node) source = node_source or self.node.get('source') return source, line, tag_name @property def node_document(self): node = self.node while node.document is None: node = node.parent # https://sourceforge.net/p/docutils/bugs/410/ return node.document @property def root(self): settings = self.node_document.settings try: # Sphinx sphinx_env = settings.env except AttributeError: # plain docutils source_path = settings._source return Path(source_path).parent if source_path else None return Path(sphinx_env.srcdir) @property def _ids(self): return self.get('ids') @property def text(self): return self.node.astext() @property def attributes(self): return self.node.attributes def get(self, key, default=None): return self.node.get(key, default) def __getitem__(self, name): return self.node[name] def process_content(self, style=None): children_text = (child.styled_text() for child in self.getchildren()) return MixedStyledText([text for text in children_text if text], style=style) class DocutilsInlineNode(DocutilsNode, InlineNode): @property def text(self): return super().text.replace('\n', ' ') def styled_text(self): styled_text = super().styled_text() try: styled_text.classes.extend(self.get('classes')) except AttributeError: pass return styled_text class DocutilsBodyNode(DocutilsNode, BodyNode): def flowables(self): classes = self.get('classes') for flowable in super().flowables(): flowable.classes.extend(classes) yield flowable class DocutilsBodySubNode(DocutilsNode, BodySubNode): pass class DocutilsGroupingNode(DocutilsBodyNode, GroupingNode): pass class DocutilsDummyNode(DocutilsNode, DummyNode): pass from . import nodes class DocutilsReader(Reader): parser_class = None def parse(self, filename_or_file, **context): try: file, filename = None, Path(filename_or_file) kwargs = dict(source_path=str(filename), settings_overrides=dict(input_encoding='utf-8')) except TypeError: file, kwargs = filename_or_file, {} doctree = publish_doctree(file, source_class=FileInput, parser=self.parser_class(), **kwargs) return from_doctree(doctree, **context) class ReStructuredTextReader(DocutilsReader): extensions = ('rst', ) parser_class = ReStructuredTextParser def from_doctree(doctree, **context): mapped_tree = DocutilsNode.map_node(doctree, **context) return mapped_tree.flowable()
/rinohtype-0.5.4.tar.gz/rinohtype-0.5.4/src/rinoh/frontend/rst/__init__.py
0.644784
0.21596
__init__.py
pypi