# coding: utf-8

from __future__ import absolute_import
from datetime import date, datetime  # noqa: F401

from typing import List, Dict  # noqa: F401

from openapi_server.models.base_model_ import Model
from openapi_server import util


class TextContactAnnotationAllOf(Model):
    """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

    Do not edit the class manually.
    """

    def __init__(self, contact_type=None):  # noqa: E501
        """TextContactAnnotationAllOf - a model defined in OpenAPI

        :param contact_type: The contact_type of this TextContactAnnotationAllOf.  # noqa: E501
        :type contact_type: str
        """
        self.openapi_types = {
            'contact_type': str
        }

        self.attribute_map = {
            'contact_type': 'contactType'
        }

        self._contact_type = contact_type

    @classmethod
    def from_dict(cls, dikt) -> 'TextContactAnnotationAllOf':
        """Returns the dict as a model

        :param dikt: A dict.
        :type: dict
        :return: The TextContactAnnotation_allOf of this TextContactAnnotationAllOf.  # noqa: E501
        :rtype: TextContactAnnotationAllOf
        """
        return util.deserialize_model(dikt, cls)

    @property
    def contact_type(self):
        """Gets the contact_type of this TextContactAnnotationAllOf.

        Type of contact information  # noqa: E501

        :return: The contact_type of this TextContactAnnotationAllOf.
        :rtype: str
        """
        return self._contact_type

    @contact_type.setter
    def contact_type(self, contact_type):
        """Sets the contact_type of this TextContactAnnotationAllOf.

        Type of contact information  # noqa: E501

        :param contact_type: The contact_type of this TextContactAnnotationAllOf.
        :type contact_type: str
        """
        allowed_values = ["email", "fax", "ip_address", "phone", "url", "other"]  # noqa: E501
        if contact_type not in allowed_values:
            raise ValueError(
                "Invalid value for `contact_type` ({0}), must be one of {1}"
                .format(contact_type, allowed_values)
            )

        self._contact_type = contact_type
