# coding: utf-8

"""
    Managed Ray API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: 0.1.0
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from openapi_client.configuration import Configuration


class Card(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': 'CardId',
        'dismissal_type': 'list[DismissalType]',
        'visibility': 'Visibility'
    }

    attribute_map = {
        'id': 'id',
        'dismissal_type': 'dismissal_type',
        'visibility': 'visibility'
    }

    def __init__(self, id=None, dismissal_type=None, visibility=None, local_vars_configuration=None):  # noqa: E501
        """Card - 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._dismissal_type = None
        self._visibility = None
        self.discriminator = None

        self.id = id
        self.dismissal_type = dismissal_type
        self.visibility = visibility

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

        Unique card id.  # noqa: E501

        :return: The id of this Card.  # noqa: E501
        :rtype: CardId
        """
        return self._id

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

        Unique card id.  # noqa: E501

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

        self._id = id

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

        Ways the card can be dismissed. If dismissal_type={DismissalType.manual, DismissalType.automatic}, the card will be visible until it is dismissed either manually or automatically.  # noqa: E501

        :return: The dismissal_type of this Card.  # noqa: E501
        :rtype: list[DismissalType]
        """
        return self._dismissal_type

    @dismissal_type.setter
    def dismissal_type(self, dismissal_type):
        """Sets the dismissal_type of this Card.

        Ways the card can be dismissed. If dismissal_type={DismissalType.manual, DismissalType.automatic}, the card will be visible until it is dismissed either manually or automatically.  # noqa: E501

        :param dismissal_type: The dismissal_type of this Card.  # noqa: E501
        :type: list[DismissalType]
        """
        if self.local_vars_configuration.client_side_validation and dismissal_type is None:  # noqa: E501
            raise ValueError("Invalid value for `dismissal_type`, must not be `None`")  # noqa: E501

        self._dismissal_type = dismissal_type

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

        Group of users the card is visible to.  # noqa: E501

        :return: The visibility of this Card.  # noqa: E501
        :rtype: Visibility
        """
        return self._visibility

    @visibility.setter
    def visibility(self, visibility):
        """Sets the visibility of this Card.

        Group of users the card is visible to.  # noqa: E501

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

        self._visibility = visibility

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

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