# coding: utf-8

"""
    Algorithmia Management APIs

    APIs for managing actions on the Algorithmia platform  # noqa: E501

    The version of the OpenAPI document: 1.0.1
    Contact: support@algorithmia.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from algorithmia_api_client.configuration import Configuration


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

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'org_name': 'str',
        'org_email': 'str',
        'org_label': 'str',
        'org_contact_name': 'str',
        'org_url': 'str',
        'self_link': 'str',
        'resource_type': 'str'
    }

    attribute_map = {
        'org_name': 'org_name',
        'org_email': 'org_email',
        'org_label': 'org_label',
        'org_contact_name': 'org_contact_name',
        'org_url': 'org_url',
        'self_link': 'self_link',
        'resource_type': 'resource_type'
    }

    def __init__(self, org_name=None, org_email=None, org_label=None, org_contact_name=None, org_url=None, self_link=None, resource_type=None, local_vars_configuration=None):  # noqa: E501
        """Organization - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._org_name = None
        self._org_email = None
        self._org_label = None
        self._org_contact_name = None
        self._org_url = None
        self._self_link = None
        self._resource_type = None
        self.discriminator = None

        self.org_name = org_name
        self.org_email = org_email
        self.org_label = org_label
        self.org_contact_name = org_contact_name
        if org_url is not None:
            self.org_url = org_url
        if self_link is not None:
            self.self_link = self_link
        self.resource_type = resource_type

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


        :return: The org_name of this Organization.  # noqa: E501
        :rtype: str
        """
        return self._org_name

    @org_name.setter
    def org_name(self, org_name):
        """Sets the org_name of this Organization.


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

        self._org_name = org_name

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


        :return: The org_email of this Organization.  # noqa: E501
        :rtype: str
        """
        return self._org_email

    @org_email.setter
    def org_email(self, org_email):
        """Sets the org_email of this Organization.


        :param org_email: The org_email of this Organization.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and org_email is None:  # noqa: E501
            raise ValueError("Invalid value for `org_email`, must not be `None`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                org_email is not None and not re.search(r'^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$', org_email)):  # noqa: E501
            raise ValueError(r"Invalid value for `org_email`, must be a follow pattern or equal to `/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$/`")  # noqa: E501

        self._org_email = org_email

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


        :return: The org_label of this Organization.  # noqa: E501
        :rtype: str
        """
        return self._org_label

    @org_label.setter
    def org_label(self, org_label):
        """Sets the org_label of this Organization.


        :param org_label: The org_label of this Organization.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and org_label is None:  # noqa: E501
            raise ValueError("Invalid value for `org_label`, must not be `None`")  # noqa: E501

        self._org_label = org_label

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


        :return: The org_contact_name of this Organization.  # noqa: E501
        :rtype: str
        """
        return self._org_contact_name

    @org_contact_name.setter
    def org_contact_name(self, org_contact_name):
        """Sets the org_contact_name of this Organization.


        :param org_contact_name: The org_contact_name of this Organization.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and org_contact_name is None:  # noqa: E501
            raise ValueError("Invalid value for `org_contact_name`, must not be `None`")  # noqa: E501

        self._org_contact_name = org_contact_name

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


        :return: The org_url of this Organization.  # noqa: E501
        :rtype: str
        """
        return self._org_url

    @org_url.setter
    def org_url(self, org_url):
        """Sets the org_url of this Organization.


        :param org_url: The org_url of this Organization.  # noqa: E501
        :type: str
        """

        self._org_url = org_url

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


        :return: The self_link of this Organization.  # noqa: E501
        :rtype: str
        """
        return self._self_link

    @self_link.setter
    def self_link(self, self_link):
        """Sets the self_link of this Organization.


        :param self_link: The self_link of this Organization.  # noqa: E501
        :type: str
        """

        self._self_link = self_link

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


        :return: The resource_type of this Organization.  # noqa: E501
        :rtype: str
        """
        return self._resource_type

    @resource_type.setter
    def resource_type(self, resource_type):
        """Sets the resource_type of this Organization.


        :param resource_type: The resource_type of this Organization.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and resource_type is None:  # noqa: E501
            raise ValueError("Invalid value for `resource_type`, must not be `None`")  # noqa: E501

        self._resource_type = resource_type

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

        for attr, _ in six.iteritems(self.openapi_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_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, Organization):
            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, Organization):
            return True

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