# coding: utf-8

"""
Alteryx Server API V3

No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

OpenAPI spec version: 3

Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

from src.server_client.configuration import Configuration


class ActiveDirectoryObjectView(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 = {"sid": "str", "category": "str", "display_name": "str", "name": "str", "sam_account_name": "str"}

    attribute_map = {
        "sid": "sid",
        "category": "category",
        "display_name": "displayName",
        "name": "name",
        "sam_account_name": "samAccountName",
    }

    def __init__(
        self, sid=None, category=None, display_name=None, name=None, sam_account_name=None, _configuration=None
    ):  # noqa: E501
        """ActiveDirectoryObjectView - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._sid = None
        self._category = None
        self._display_name = None
        self._name = None
        self._sam_account_name = None
        self.discriminator = None

        if sid is not None:
            self.sid = sid
        if category is not None:
            self.category = category
        if display_name is not None:
            self.display_name = display_name
        if name is not None:
            self.name = name
        if sam_account_name is not None:
            self.sam_account_name = sam_account_name

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


        :return: The sid of this ActiveDirectoryObjectView.  # noqa: E501
        :rtype: str
        """
        return self._sid

    @sid.setter
    def sid(self, sid):
        """Sets the sid of this ActiveDirectoryObjectView.


        :param sid: The sid of this ActiveDirectoryObjectView.  # noqa: E501
        :type: str
        """

        self._sid = sid

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


        :return: The category of this ActiveDirectoryObjectView.  # noqa: E501
        :rtype: str
        """
        return self._category

    @category.setter
    def category(self, category):
        """Sets the category of this ActiveDirectoryObjectView.


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

        self._category = category

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


        :return: The display_name of this ActiveDirectoryObjectView.  # noqa: E501
        :rtype: str
        """
        return self._display_name

    @display_name.setter
    def display_name(self, display_name):
        """Sets the display_name of this ActiveDirectoryObjectView.


        :param display_name: The display_name of this ActiveDirectoryObjectView.  # noqa: E501
        :type: str
        """

        self._display_name = display_name

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


        :return: The name of this ActiveDirectoryObjectView.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this ActiveDirectoryObjectView.


        :param name: The name of this ActiveDirectoryObjectView.  # noqa: E501
        :type: str
        """

        self._name = name

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


        :return: The sam_account_name of this ActiveDirectoryObjectView.  # noqa: E501
        :rtype: str
        """
        return self._sam_account_name

    @sam_account_name.setter
    def sam_account_name(self, sam_account_name):
        """Sets the sam_account_name of this ActiveDirectoryObjectView.


        :param sam_account_name: The sam_account_name of this ActiveDirectoryObjectView.  # noqa: E501
        :type: str
        """

        self._sam_account_name = sam_account_name

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

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