# coding: utf-8

"""
    Public App Crm Cards

    Allows an app to extend the CRM UI by surfacing custom cards in the sidebar of record pages. These cards are defined up-front as part of app configuration, then populated by external data fetch requests when the record page is accessed by a user.  # noqa: E501

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


try:
    from inspect import getfullargspec
except ImportError:
    from inspect import getargspec as getfullargspec
import pprint
import re  # noqa: F401
import six

from hubspot.crm.extensions.cards.configuration import Configuration


class CardAuditResponse(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 = {"action_type": "str", "object_type_id": "int", "auth_source": "str", "changed_at": "int", "application_id": "int", "initiating_user_id": "int"}

    attribute_map = {
        "action_type": "actionType",
        "object_type_id": "objectTypeId",
        "auth_source": "authSource",
        "changed_at": "changedAt",
        "application_id": "applicationId",
        "initiating_user_id": "initiatingUserId",
    }

    def __init__(self, action_type=None, object_type_id=None, auth_source=None, changed_at=None, application_id=None, initiating_user_id=None, local_vars_configuration=None):  # noqa: E501
        """CardAuditResponse - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration.get_default_copy()
        self.local_vars_configuration = local_vars_configuration

        self._action_type = None
        self._object_type_id = None
        self._auth_source = None
        self._changed_at = None
        self._application_id = None
        self._initiating_user_id = None
        self.discriminator = None

        self.action_type = action_type
        self.object_type_id = object_type_id
        self.auth_source = auth_source
        self.changed_at = changed_at
        self.application_id = application_id
        self.initiating_user_id = initiating_user_id

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


        :return: The action_type of this CardAuditResponse.  # noqa: E501
        :rtype: str
        """
        return self._action_type

    @action_type.setter
    def action_type(self, action_type):
        """Sets the action_type of this CardAuditResponse.


        :param action_type: The action_type of this CardAuditResponse.  # noqa: E501
        :type action_type: str
        """
        if self.local_vars_configuration.client_side_validation and action_type is None:  # noqa: E501
            raise ValueError("Invalid value for `action_type`, must not be `None`")  # noqa: E501
        allowed_values = ["CREATE", "UPDATE", "DELETE"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and action_type not in allowed_values:  # noqa: E501
            raise ValueError("Invalid value for `action_type` ({0}), must be one of {1}".format(action_type, allowed_values))  # noqa: E501

        self._action_type = action_type

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


        :return: The object_type_id of this CardAuditResponse.  # noqa: E501
        :rtype: int
        """
        return self._object_type_id

    @object_type_id.setter
    def object_type_id(self, object_type_id):
        """Sets the object_type_id of this CardAuditResponse.


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

        self._object_type_id = object_type_id

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


        :return: The auth_source of this CardAuditResponse.  # noqa: E501
        :rtype: str
        """
        return self._auth_source

    @auth_source.setter
    def auth_source(self, auth_source):
        """Sets the auth_source of this CardAuditResponse.


        :param auth_source: The auth_source of this CardAuditResponse.  # noqa: E501
        :type auth_source: str
        """
        if self.local_vars_configuration.client_side_validation and auth_source is None:  # noqa: E501
            raise ValueError("Invalid value for `auth_source`, must not be `None`")  # noqa: E501
        allowed_values = ["INTERNAL", "APP", "EXTERNAL"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and auth_source not in allowed_values:  # noqa: E501
            raise ValueError("Invalid value for `auth_source` ({0}), must be one of {1}".format(auth_source, allowed_values))  # noqa: E501

        self._auth_source = auth_source

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


        :return: The changed_at of this CardAuditResponse.  # noqa: E501
        :rtype: int
        """
        return self._changed_at

    @changed_at.setter
    def changed_at(self, changed_at):
        """Sets the changed_at of this CardAuditResponse.


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

        self._changed_at = changed_at

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


        :return: The application_id of this CardAuditResponse.  # noqa: E501
        :rtype: int
        """
        return self._application_id

    @application_id.setter
    def application_id(self, application_id):
        """Sets the application_id of this CardAuditResponse.


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

        self._application_id = application_id

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


        :return: The initiating_user_id of this CardAuditResponse.  # noqa: E501
        :rtype: int
        """
        return self._initiating_user_id

    @initiating_user_id.setter
    def initiating_user_id(self, initiating_user_id):
        """Sets the initiating_user_id of this CardAuditResponse.


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

        self._initiating_user_id = initiating_user_id

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

        def convert(x):
            if hasattr(x, "to_dict"):
                args = getfullargspec(x.to_dict).args
                if len(args) == 1:
                    return x.to_dict()
                else:
                    return x.to_dict(serialize)
            else:
                return x

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            attr = self.attribute_map.get(attr, attr) if serialize else attr
            if isinstance(value, list):
                result[attr] = list(map(lambda x: convert(x), value))
            elif isinstance(value, dict):
                result[attr] = dict(map(lambda item: (item[0], convert(item[1])), value.items()))
            else:
                result[attr] = convert(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, CardAuditResponse):
            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, CardAuditResponse):
            return True

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