# 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 CollectionView(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 = {
        "id": "str",
        "name": "str",
        "owner_id": "str",
        "date_added": "datetime",
        "workflow_ids": "list[str]",
        "users": "list[CollectionUserView]",
        "subscription_ids": "list[str]",
        "user_group_ids": "list[str]",
        "schedule_ids": "list[str]",
    }

    attribute_map = {
        "id": "id",
        "name": "name",
        "owner_id": "ownerId",
        "date_added": "dateAdded",
        "workflow_ids": "workflowIds",
        "users": "users",
        "subscription_ids": "subscriptionIds",
        "user_group_ids": "userGroupIds",
        "schedule_ids": "scheduleIds",
    }

    def __init__(
        self,
        id=None,
        name=None,
        owner_id=None,
        date_added=None,
        workflow_ids=None,
        users=None,
        subscription_ids=None,
        user_group_ids=None,
        schedule_ids=None,
        _configuration=None,
    ):  # noqa: E501
        """CollectionView - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._id = None
        self._name = None
        self._owner_id = None
        self._date_added = None
        self._workflow_ids = None
        self._users = None
        self._subscription_ids = None
        self._user_group_ids = None
        self._schedule_ids = None
        self.discriminator = None

        self.id = id
        self.name = name
        self.owner_id = owner_id
        self.date_added = date_added
        if workflow_ids is not None:
            self.workflow_ids = workflow_ids
        if users is not None:
            self.users = users
        if subscription_ids is not None:
            self.subscription_ids = subscription_ids
        if user_group_ids is not None:
            self.user_group_ids = user_group_ids
        if schedule_ids is not None:
            self.schedule_ids = schedule_ids

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


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

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


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

        self._id = id

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


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

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


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

        self._name = name

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


        :return: The owner_id of this CollectionView.  # noqa: E501
        :rtype: str
        """
        return self._owner_id

    @owner_id.setter
    def owner_id(self, owner_id):
        """Sets the owner_id of this CollectionView.


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

        self._owner_id = owner_id

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


        :return: The date_added of this CollectionView.  # noqa: E501
        :rtype: datetime
        """
        return self._date_added

    @date_added.setter
    def date_added(self, date_added):
        """Sets the date_added of this CollectionView.


        :param date_added: The date_added of this CollectionView.  # noqa: E501
        :type: datetime
        """
        if self._configuration.client_side_validation and date_added is None:
            raise ValueError("Invalid value for `date_added`, must not be `None`")  # noqa: E501

        self._date_added = date_added

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


        :return: The workflow_ids of this CollectionView.  # noqa: E501
        :rtype: list[str]
        """
        return self._workflow_ids

    @workflow_ids.setter
    def workflow_ids(self, workflow_ids):
        """Sets the workflow_ids of this CollectionView.


        :param workflow_ids: The workflow_ids of this CollectionView.  # noqa: E501
        :type: list[str]
        """

        self._workflow_ids = workflow_ids

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


        :return: The users of this CollectionView.  # noqa: E501
        :rtype: list[CollectionUserView]
        """
        return self._users

    @users.setter
    def users(self, users):
        """Sets the users of this CollectionView.


        :param users: The users of this CollectionView.  # noqa: E501
        :type: list[CollectionUserView]
        """

        self._users = users

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


        :return: The subscription_ids of this CollectionView.  # noqa: E501
        :rtype: list[str]
        """
        return self._subscription_ids

    @subscription_ids.setter
    def subscription_ids(self, subscription_ids):
        """Sets the subscription_ids of this CollectionView.


        :param subscription_ids: The subscription_ids of this CollectionView.  # noqa: E501
        :type: list[str]
        """

        self._subscription_ids = subscription_ids

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


        :return: The user_group_ids of this CollectionView.  # noqa: E501
        :rtype: list[str]
        """
        return self._user_group_ids

    @user_group_ids.setter
    def user_group_ids(self, user_group_ids):
        """Sets the user_group_ids of this CollectionView.


        :param user_group_ids: The user_group_ids of this CollectionView.  # noqa: E501
        :type: list[str]
        """

        self._user_group_ids = user_group_ids

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


        :return: The schedule_ids of this CollectionView.  # noqa: E501
        :rtype: list[str]
        """
        return self._schedule_ids

    @schedule_ids.setter
    def schedule_ids(self, schedule_ids):
        """Sets the schedule_ids of this CollectionView.


        :param schedule_ids: The schedule_ids of this CollectionView.  # noqa: E501
        :type: list[str]
        """

        self._schedule_ids = schedule_ids

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

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