# coding: utf-8

"""
    Agilicus API

    Agilicus API endpoints  # noqa: E501

    The version of the OpenAPI document: 2021.02.16
    Contact: dev@agilicus.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from agilicus_api.configuration import Configuration


class OrganisationAdmin(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 = {
        'id': 'str',
        'issuer': 'str',
        'organisation': 'str',
        'subdomain': 'str',
        'parent_id': 'str'
    }

    attribute_map = {
        'id': 'id',
        'issuer': 'issuer',
        'organisation': 'organisation',
        'subdomain': 'subdomain',
        'parent_id': 'parent_id'
    }

    def __init__(self, id=None, issuer=None, organisation=None, subdomain=None, parent_id=None, local_vars_configuration=None):  # noqa: E501
        """OrganisationAdmin - 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._id = None
        self._issuer = None
        self._organisation = None
        self._subdomain = None
        self._parent_id = None
        self.discriminator = None

        if id is not None:
            self.id = id
        if issuer is not None:
            self.issuer = issuer
        self.organisation = organisation
        if subdomain is not None:
            self.subdomain = subdomain
        if parent_id is not None:
            self.parent_id = parent_id

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

        Unique identifier  # noqa: E501

        :return: The id of this OrganisationAdmin.  # noqa: E501
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this OrganisationAdmin.

        Unique identifier  # noqa: E501

        :param id: The id of this OrganisationAdmin.  # noqa: E501
        :type: str
        """

        self._id = id

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

        connect id issuer  # noqa: E501

        :return: The issuer of this OrganisationAdmin.  # noqa: E501
        :rtype: str
        """
        return self._issuer

    @issuer.setter
    def issuer(self, issuer):
        """Sets the issuer of this OrganisationAdmin.

        connect id issuer  # noqa: E501

        :param issuer: The issuer of this OrganisationAdmin.  # noqa: E501
        :type: str
        """
        if (self.local_vars_configuration.client_side_validation and
                issuer is not None and len(issuer) > 100):
            raise ValueError("Invalid value for `issuer`, length must be less than or equal to `100`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                issuer is not None and len(issuer) < 1):
            raise ValueError("Invalid value for `issuer`, length must be greater than or equal to `1`")  # noqa: E501

        self._issuer = issuer

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

        organisation name  # noqa: E501

        :return: The organisation of this OrganisationAdmin.  # noqa: E501
        :rtype: str
        """
        return self._organisation

    @organisation.setter
    def organisation(self, organisation):
        """Sets the organisation of this OrganisationAdmin.

        organisation name  # noqa: E501

        :param organisation: The organisation of this OrganisationAdmin.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and organisation is None:  # noqa: E501
            raise ValueError("Invalid value for `organisation`, must not be `None`")  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                organisation is not None and len(organisation) > 100):
            raise ValueError("Invalid value for `organisation`, length must be less than or equal to `100`")  # noqa: E501

        self._organisation = organisation

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

        organisation subdomain  # noqa: E501

        :return: The subdomain of this OrganisationAdmin.  # noqa: E501
        :rtype: str
        """
        return self._subdomain

    @subdomain.setter
    def subdomain(self, subdomain):
        """Sets the subdomain of this OrganisationAdmin.

        organisation subdomain  # noqa: E501

        :param subdomain: The subdomain of this OrganisationAdmin.  # noqa: E501
        :type: str
        """
        if (self.local_vars_configuration.client_side_validation and
                subdomain is not None and len(subdomain) > 255):
            raise ValueError("Invalid value for `subdomain`, length must be less than or equal to `255`")  # noqa: E501

        self._subdomain = subdomain

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

        parent organisation id  # noqa: E501

        :return: The parent_id of this OrganisationAdmin.  # noqa: E501
        :rtype: str
        """
        return self._parent_id

    @parent_id.setter
    def parent_id(self, parent_id):
        """Sets the parent_id of this OrganisationAdmin.

        parent organisation id  # noqa: E501

        :param parent_id: The parent_id of this OrganisationAdmin.  # noqa: E501
        :type: str
        """

        self._parent_id = parent_id

    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, OrganisationAdmin):
            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, OrganisationAdmin):
            return True

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