# coding: utf-8

"""
Copyright 2016 SmartBear Software

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

    Ref: https://github.com/swagger-api/swagger-codegen
"""

from datetime import datetime
from datetime import date
from pprint import pformat
from six import iteritems
import re
import json

from ..utils import sanitize_for_serialization

# type hinting support
from typing import TYPE_CHECKING
from typing import List
from typing import Dict

if TYPE_CHECKING:
    from . import InitialConfiguration
    from . import SourceConfiguration

class IvrEstablishedEvent(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """
    def __init__(self) -> None:
        """
        IvrEstablishedEvent - a model defined in Swagger

        :param dict swaggerTypes: The key is attribute name
                                  and the value is attribute type.
        :param dict attributeMap: The key is attribute name
                                  and the value is json key in definition.
        """
        self.swagger_types = {
            'event_id': 'str',
            'event_date_time': 'datetime',
            'conversation_id': 'str',
            'communication_id': 'str',
            'ivr_phone_number': 'str',
            'ivr_name': 'str',
            'ani': 'str',
            'dnis': 'str',
            'initial_configuration': 'InitialConfiguration',
            'source_configuration': 'SourceConfiguration'
        }

        self.attribute_map = {
            'event_id': 'eventId',
            'event_date_time': 'eventDateTime',
            'conversation_id': 'conversationId',
            'communication_id': 'communicationId',
            'ivr_phone_number': 'ivrPhoneNumber',
            'ivr_name': 'ivrName',
            'ani': 'ani',
            'dnis': 'dnis',
            'initial_configuration': 'initialConfiguration',
            'source_configuration': 'sourceConfiguration'
        }

        self._event_id = None
        self._event_date_time = None
        self._conversation_id = None
        self._communication_id = None
        self._ivr_phone_number = None
        self._ivr_name = None
        self._ani = None
        self._dnis = None
        self._initial_configuration = None
        self._source_configuration = None

    @property
    def event_id(self) -> str:
        """
        Gets the event_id of this IvrEstablishedEvent.
        A unique (V4 UUID) eventId for this event

        :return: The event_id of this IvrEstablishedEvent.
        :rtype: str
        """
        return self._event_id

    @event_id.setter
    def event_id(self, event_id: str) -> None:
        """
        Sets the event_id of this IvrEstablishedEvent.
        A unique (V4 UUID) eventId for this event

        :param event_id: The event_id of this IvrEstablishedEvent.
        :type: str
        """
        

        self._event_id = event_id

    @property
    def event_date_time(self) -> datetime:
        """
        Gets the event_date_time of this IvrEstablishedEvent.
        A Date Time representing the time this event occurred. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss[.mmm]Z

        :return: The event_date_time of this IvrEstablishedEvent.
        :rtype: datetime
        """
        return self._event_date_time

    @event_date_time.setter
    def event_date_time(self, event_date_time: datetime) -> None:
        """
        Sets the event_date_time of this IvrEstablishedEvent.
        A Date Time representing the time this event occurred. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss[.mmm]Z

        :param event_date_time: The event_date_time of this IvrEstablishedEvent.
        :type: datetime
        """
        

        self._event_date_time = event_date_time

    @property
    def conversation_id(self) -> str:
        """
        Gets the conversation_id of this IvrEstablishedEvent.
        A unique Id (V4 UUID) identifying this conversation

        :return: The conversation_id of this IvrEstablishedEvent.
        :rtype: str
        """
        return self._conversation_id

    @conversation_id.setter
    def conversation_id(self, conversation_id: str) -> None:
        """
        Sets the conversation_id of this IvrEstablishedEvent.
        A unique Id (V4 UUID) identifying this conversation

        :param conversation_id: The conversation_id of this IvrEstablishedEvent.
        :type: str
        """
        

        self._conversation_id = conversation_id

    @property
    def communication_id(self) -> str:
        """
        Gets the communication_id of this IvrEstablishedEvent.
        A unique Id (V4 UUID) identifying this communication

        :return: The communication_id of this IvrEstablishedEvent.
        :rtype: str
        """
        return self._communication_id

    @communication_id.setter
    def communication_id(self, communication_id: str) -> None:
        """
        Sets the communication_id of this IvrEstablishedEvent.
        A unique Id (V4 UUID) identifying this communication

        :param communication_id: The communication_id of this IvrEstablishedEvent.
        :type: str
        """
        

        self._communication_id = communication_id

    @property
    def ivr_phone_number(self) -> str:
        """
        Gets the ivr_phone_number of this IvrEstablishedEvent.
        The phone number for this IVR, if any is known

        :return: The ivr_phone_number of this IvrEstablishedEvent.
        :rtype: str
        """
        return self._ivr_phone_number

    @ivr_phone_number.setter
    def ivr_phone_number(self, ivr_phone_number: str) -> None:
        """
        Sets the ivr_phone_number of this IvrEstablishedEvent.
        The phone number for this IVR, if any is known

        :param ivr_phone_number: The ivr_phone_number of this IvrEstablishedEvent.
        :type: str
        """
        

        self._ivr_phone_number = ivr_phone_number

    @property
    def ivr_name(self) -> str:
        """
        Gets the ivr_name of this IvrEstablishedEvent.
        A displayable name for this IVR, if any is known.

        :return: The ivr_name of this IvrEstablishedEvent.
        :rtype: str
        """
        return self._ivr_name

    @ivr_name.setter
    def ivr_name(self, ivr_name: str) -> None:
        """
        Sets the ivr_name of this IvrEstablishedEvent.
        A displayable name for this IVR, if any is known.

        :param ivr_name: The ivr_name of this IvrEstablishedEvent.
        :type: str
        """
        

        self._ivr_name = ivr_name

    @property
    def ani(self) -> str:
        """
        Gets the ani of this IvrEstablishedEvent.
        The automatic number identification if it is available for this conversation.

        :return: The ani of this IvrEstablishedEvent.
        :rtype: str
        """
        return self._ani

    @ani.setter
    def ani(self, ani: str) -> None:
        """
        Sets the ani of this IvrEstablishedEvent.
        The automatic number identification if it is available for this conversation.

        :param ani: The ani of this IvrEstablishedEvent.
        :type: str
        """
        

        self._ani = ani

    @property
    def dnis(self) -> str:
        """
        Gets the dnis of this IvrEstablishedEvent.
        The dialed number identification if it is available for this conversation.

        :return: The dnis of this IvrEstablishedEvent.
        :rtype: str
        """
        return self._dnis

    @dnis.setter
    def dnis(self, dnis: str) -> None:
        """
        Sets the dnis of this IvrEstablishedEvent.
        The dialed number identification if it is available for this conversation.

        :param dnis: The dnis of this IvrEstablishedEvent.
        :type: str
        """
        

        self._dnis = dnis

    @property
    def initial_configuration(self) -> 'InitialConfiguration':
        """
        Gets the initial_configuration of this IvrEstablishedEvent.
        Metadata about this communication.

        :return: The initial_configuration of this IvrEstablishedEvent.
        :rtype: InitialConfiguration
        """
        return self._initial_configuration

    @initial_configuration.setter
    def initial_configuration(self, initial_configuration: 'InitialConfiguration') -> None:
        """
        Sets the initial_configuration of this IvrEstablishedEvent.
        Metadata about this communication.

        :param initial_configuration: The initial_configuration of this IvrEstablishedEvent.
        :type: InitialConfiguration
        """
        

        self._initial_configuration = initial_configuration

    @property
    def source_configuration(self) -> 'SourceConfiguration':
        """
        Gets the source_configuration of this IvrEstablishedEvent.
        Metadata about the source of this communication's interaction.

        :return: The source_configuration of this IvrEstablishedEvent.
        :rtype: SourceConfiguration
        """
        return self._source_configuration

    @source_configuration.setter
    def source_configuration(self, source_configuration: 'SourceConfiguration') -> None:
        """
        Sets the source_configuration of this IvrEstablishedEvent.
        Metadata about the source of this communication's interaction.

        :param source_configuration: The source_configuration of this IvrEstablishedEvent.
        :type: SourceConfiguration
        """
        

        self._source_configuration = source_configuration

    def to_dict(self):
        """
        Returns the model properties as a dict
        """
        result = {}

        for attr, _ in iteritems(self.swagger_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value

        return result

    def to_json(self):
        """
        Returns the model as raw JSON
        """
        return json.dumps(sanitize_for_serialization(self.to_dict()))

    def to_str(self):
        """
        Returns the string representation of the model
        """
        return pformat(self.to_dict())

    def __repr__(self):
        """
        For `print` and `pprint`
        """
        return self.to_str()

    def __eq__(self, other):
        """
        Returns true if both objects are equal
        """
        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """
        Returns true if both objects are not equal
        """
        return not self == other

