# coding: utf-8

"""
    FreeClimb API

    FreeClimb is a cloud-based application programming interface (API) that puts the power of the Vail platform in your hands. FreeClimb simplifies the process of creating applications that can use a full range of telephony features without requiring specialized or on-site telephony equipment. Using the FreeClimb REST API to write applications is easy! You have the option to use the language of your choice or hit the API directly. Your application can execute a command by issuing a RESTful request to the FreeClimb API. The base URL to send HTTP requests to the FreeClimb REST API is: /apiserver. FreeClimb authenticates and processes your request.

    The version of the OpenAPI document: 1.0.0
    Contact: support@freeclimb.com
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501


import unittest
import pydantic_core
from datetime import datetime
import freeclimb
from freeclimb import *
from freeclimb.models.call_status_webhook import CallStatusWebhook


class TestCallStatusWebhook(unittest.TestCase):
    """CallStatusWebhook unit test stubs"""

    def setUp(self):
        self.model = CallStatusWebhook()

    def test_request_type(self):
        """Test CallStatusWebhook.request_type"""

    def test_call_id(self):
        """Test CallStatusWebhook.call_id"""

        self.model.call_id = "TEST_STRING"
        assert self.model.call_id == "TEST_STRING"

    def test_account_id(self):
        """Test CallStatusWebhook.account_id"""

        self.model.account_id = "TEST_STRING"
        assert self.model.account_id == "TEST_STRING"

    def test_var_from(self):
        """Test CallStatusWebhook.var_from"""

        self.model.var_from = "TEST_STRING"
        assert self.model.var_from == "TEST_STRING"

    def test_to(self):
        """Test CallStatusWebhook.to"""

        self.model.to = "TEST_STRING"
        assert self.model.to == "TEST_STRING"

    def test_call_status(self):
        """Test CallStatusWebhook.call_status"""
        self.model.call_status = CallStatus.QUEUED
        assert self.model.call_status == CallStatus.QUEUED
        self.model.call_status = CallStatus.RINGING
        assert self.model.call_status == CallStatus.RINGING
        self.model.call_status = CallStatus.IN_PROGRESS
        assert self.model.call_status == CallStatus.IN_PROGRESS
        self.model.call_status = CallStatus.CANCELED
        assert self.model.call_status == CallStatus.CANCELED
        self.model.call_status = CallStatus.COMPLETED
        assert self.model.call_status == CallStatus.COMPLETED
        self.model.call_status = CallStatus.FAILED
        assert self.model.call_status == CallStatus.FAILED
        self.model.call_status = CallStatus.BUSY
        assert self.model.call_status == CallStatus.BUSY
        self.model.call_status = CallStatus.NO_ANSWER
        assert self.model.call_status == CallStatus.NO_ANSWER

    def test_call_ended_reason(self):
        """Test CallStatusWebhook.call_ended_reason"""
        self.model.call_ended_reason = CallEndedReason.BUSY
        assert self.model.call_ended_reason == CallEndedReason.BUSY
        self.model.call_ended_reason = CallEndedReason.FAILED
        assert self.model.call_ended_reason == CallEndedReason.FAILED
        self.model.call_ended_reason = CallEndedReason.NO_ANSWER
        assert self.model.call_ended_reason == CallEndedReason.NO_ANSWER
        self.model.call_ended_reason = CallEndedReason.CALL_CANCELED
        assert self.model.call_ended_reason == CallEndedReason.CALL_CANCELED
        self.model.call_ended_reason = CallEndedReason.FAR_END_HANGUP
        assert self.model.call_ended_reason == CallEndedReason.FAR_END_HANGUP
        self.model.call_ended_reason = CallEndedReason.APP_HANGUP
        assert self.model.call_ended_reason == CallEndedReason.APP_HANGUP
        self.model.call_ended_reason = CallEndedReason.APP_REJECT
        assert self.model.call_ended_reason == CallEndedReason.APP_REJECT
        self.model.call_ended_reason = CallEndedReason.APP_NO_PERCL
        assert self.model.call_ended_reason == CallEndedReason.APP_NO_PERCL
        self.model.call_ended_reason = CallEndedReason.APP_INVALID_PERCL
        assert self.model.call_ended_reason == CallEndedReason.APP_INVALID_PERCL
        self.model.call_ended_reason = CallEndedReason.CONFERENCE_TERMINATED
        assert self.model.call_ended_reason == CallEndedReason.CONFERENCE_TERMINATED
        self.model.call_ended_reason = CallEndedReason.CONFERENCE_EMPTIED
        assert self.model.call_ended_reason == CallEndedReason.CONFERENCE_EMPTIED
        self.model.call_ended_reason = CallEndedReason.REMOVED_FROM_CONFERENCE
        assert self.model.call_ended_reason == CallEndedReason.REMOVED_FROM_CONFERENCE
        self.model.call_ended_reason = CallEndedReason.MACHINE_DETECTED
        assert self.model.call_ended_reason == CallEndedReason.MACHINE_DETECTED
        self.model.call_ended_reason = CallEndedReason.WEBHOOK_FAILED
        assert self.model.call_ended_reason == CallEndedReason.WEBHOOK_FAILED
        self.model.call_ended_reason = CallEndedReason.WEBHOOK_INVALID_RESPONSE
        assert self.model.call_ended_reason == CallEndedReason.WEBHOOK_INVALID_RESPONSE
        self.model.call_ended_reason = CallEndedReason.VOICE_DISABLED
        assert self.model.call_ended_reason == CallEndedReason.VOICE_DISABLED
        self.model.call_ended_reason = CallEndedReason.CONFIG_ERROR_NO_APPLICATION
        assert (
            self.model.call_ended_reason == CallEndedReason.CONFIG_ERROR_NO_APPLICATION
        )
        self.model.call_ended_reason = CallEndedReason.CONFIG_ERROR_NO_VOICE_URL
        assert self.model.call_ended_reason == CallEndedReason.CONFIG_ERROR_NO_VOICE_URL
        self.model.call_ended_reason = CallEndedReason.MAX_REDIRECTS_ERROR
        assert self.model.call_ended_reason == CallEndedReason.MAX_REDIRECTS_ERROR
        self.model.call_ended_reason = CallEndedReason.PERCL_PROCESSING_ERROR
        assert self.model.call_ended_reason == CallEndedReason.PERCL_PROCESSING_ERROR
        self.model.call_ended_reason = CallEndedReason.INTERNAL_ERROR
        assert self.model.call_ended_reason == CallEndedReason.INTERNAL_ERROR
        self.model.call_ended_reason = CallEndedReason.GRPC_HANGUP
        assert self.model.call_ended_reason == CallEndedReason.GRPC_HANGUP
        self.model.call_ended_reason = CallEndedReason.MAX_DURATION
        assert self.model.call_ended_reason == CallEndedReason.MAX_DURATION

    def test_direction(self):
        """Test CallStatusWebhook.direction"""
        self.model.direction = CallDirection.INBOUND
        assert self.model.direction == CallDirection.INBOUND
        self.model.direction = CallDirection.OUTBOUND_API
        assert self.model.direction == CallDirection.OUTBOUND_API
        self.model.direction = CallDirection.OUTBOUND_DIAL
        assert self.model.direction == CallDirection.OUTBOUND_DIAL

    def test_conference_id(self):
        """Test CallStatusWebhook.conference_id"""

        self.model.conference_id = "TEST_STRING"
        assert self.model.conference_id == "TEST_STRING"

    def test_queue_id(self):
        """Test CallStatusWebhook.queue_id"""

        self.model.queue_id = "TEST_STRING"
        assert self.model.queue_id == "TEST_STRING"

    def test_deserialize(self):
        payload = '{ "requestType": "callStatus" }'
        assert isinstance(CallStatusWebhook.deserialize(payload), CallStatusWebhook)


if __name__ == "__main__":
    unittest.main()
