# coding: utf-8

"""
    Selling Partner API for Services

    With the Services API, you can build applications that help service providers get and modify their service orders and manage their resources.

    The version of the OpenAPI document: v1
    Generated by OpenAPI Generator (https://openapi-generator.tech)

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


import pprint
import re  # noqa: F401

import six

from spapi.configuration import Configuration


class Poa(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """

    """
    Attributes:
      swagger_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    swagger_types = {
        'appointment_time': 'AppointmentTime',
        'technicians': 'List[Technician]',
        'uploading_technician': 'str',
        'upload_time': 'datetime',
        'poa_type': 'str',
    }

    attribute_map = {
        'appointment_time': 'appointmentTime',
        'technicians': 'technicians',
        'uploading_technician': 'uploadingTechnician',
        'upload_time': 'uploadTime',
        'poa_type': 'poaType',
    }

    def __init__(self, appointment_time=None, technicians=None, uploading_technician=None, upload_time=None, poa_type=None, _configuration=None):  # noqa: E501
        """Poa - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._appointment_time = None
        self._technicians = None
        self._uploading_technician = None
        self._upload_time = None
        self._poa_type = None
        self.discriminator = None

        if appointment_time is not None:
            self.appointment_time = appointment_time
        if technicians is not None:
            self.technicians = technicians
        if uploading_technician is not None:
            self.uploading_technician = uploading_technician
        if upload_time is not None:
            self.upload_time = upload_time
        if poa_type is not None:
            self.poa_type = poa_type

    @property
    def appointment_time(self):
        """Gets the appointment_time of this Poa.  # noqa: E501


        :return: The appointment_time of this Poa.  # noqa: E501
        :rtype: AppointmentTime
        """
        return self._appointment_time

    @appointment_time.setter
    def appointment_time(self, appointment_time):
        """Sets the appointment_time of this Poa.


        :param appointment_time: The appointment_time of this Poa.  # noqa: E501
        :type: AppointmentTime
        """

        self._appointment_time = appointment_time

    @property
    def technicians(self):
        """Gets the technicians of this Poa.  # noqa: E501

        A list of technicians.  # noqa: E501

        :return: The technicians of this Poa.  # noqa: E501
        :rtype: List[Technician]
        """
        return self._technicians

    @technicians.setter
    def technicians(self, technicians):
        """Sets the technicians of this Poa.

        A list of technicians.  # noqa: E501

        :param technicians: The technicians of this Poa.  # noqa: E501
        :type: List[Technician]
        """
        if (self._configuration.client_side_validation and
                technicians is not None and len(technicians) < 1):
            raise ValueError("Invalid value for `technicians`, number of items must be greater than or equal to `1`")  # noqa: E501

        self._technicians = technicians

    @property
    def uploading_technician(self):
        """Gets the uploading_technician of this Poa.  # noqa: E501

        The identifier of the technician who uploaded the POA.  # noqa: E501

        :return: The uploading_technician of this Poa.  # noqa: E501
        :rtype: str
        """
        return self._uploading_technician

    @uploading_technician.setter
    def uploading_technician(self, uploading_technician):
        """Sets the uploading_technician of this Poa.

        The identifier of the technician who uploaded the POA.  # noqa: E501

        :param uploading_technician: The uploading_technician of this Poa.  # noqa: E501
        :type: str
        """
        if (self._configuration.client_side_validation and
                uploading_technician is not None and not re.search(r'^[A-Z0-9]*$', uploading_technician)):  # noqa: E501
            raise ValueError(r"Invalid value for `uploading_technician`, must be a follow pattern or equal to `/^[A-Z0-9]*$/`")  # noqa: E501

        self._uploading_technician = uploading_technician

    @property
    def upload_time(self):
        """Gets the upload_time of this Poa.  # noqa: E501

        The date and time when the POA was uploaded in ISO 8601 format.  # noqa: E501

        :return: The upload_time of this Poa.  # noqa: E501
        :rtype: datetime
        """
        return self._upload_time

    @upload_time.setter
    def upload_time(self, upload_time):
        """Sets the upload_time of this Poa.

        The date and time when the POA was uploaded in ISO 8601 format.  # noqa: E501

        :param upload_time: The upload_time of this Poa.  # noqa: E501
        :type: datetime
        """

        self._upload_time = upload_time

    @property
    def poa_type(self):
        """Gets the poa_type of this Poa.  # noqa: E501

        The type of POA uploaded.  # noqa: E501

        :return: The poa_type of this Poa.  # noqa: E501
        :rtype: str
        """
        return self._poa_type

    @poa_type.setter
    def poa_type(self, poa_type):
        """Sets the poa_type of this Poa.

        The type of POA uploaded.  # noqa: E501

        :param poa_type: The poa_type of this Poa.  # noqa: E501
        :type: str
        """
        allowed_values = ["NO_SIGNATURE_DUMMY_POS", "CUSTOMER_SIGNATURE", "DUMMY_RECEIPT", "POA_RECEIPT"]  # noqa: E501
        if (self._configuration.client_side_validation and
                poa_type not in allowed_values):
            raise ValueError(
                "Invalid value for `poa_type` ({0}), must be one of {1}"  # noqa: E501
                .format(poa_type, allowed_values)
            )

        self._poa_type = poa_type

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

        for attr, _ in six.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
        if issubclass(Poa, dict):
            for key, value in self.items():
                result[key] = value

        return result

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

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

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, Poa):
            return False

        return self.to_dict() == other.to_dict()

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

        return self.to_dict() != other.to_dict()
