# coding: utf-8

"""
    CRM Imports

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

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


import pprint
import re  # noqa: F401

import six

from hubspot.crm.imports.configuration import Configuration


class PublicImportError(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 = {
        'error_type': 'str',
        'object_type': 'str',
        'invalid_value': 'str',
        'extra_context': 'str',
        'object_type_id': 'str',
        'known_column_number': 'int',
        'source_data': 'ImportRowCore',
        'created_at': 'int',
        'id': 'str'
    }

    attribute_map = {
        'error_type': 'errorType',
        'object_type': 'objectType',
        'invalid_value': 'invalidValue',
        'extra_context': 'extraContext',
        'object_type_id': 'objectTypeId',
        'known_column_number': 'knownColumnNumber',
        'source_data': 'sourceData',
        'created_at': 'createdAt',
        'id': 'id'
    }

    def __init__(self, error_type=None, object_type=None, invalid_value=None, extra_context=None, object_type_id=None, known_column_number=None, source_data=None, created_at=None, id=None, local_vars_configuration=None):  # noqa: E501
        """PublicImportError - 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._error_type = None
        self._object_type = None
        self._invalid_value = None
        self._extra_context = None
        self._object_type_id = None
        self._known_column_number = None
        self._source_data = None
        self._created_at = None
        self._id = None
        self.discriminator = None

        self.error_type = error_type
        if object_type is not None:
            self.object_type = object_type
        if invalid_value is not None:
            self.invalid_value = invalid_value
        if extra_context is not None:
            self.extra_context = extra_context
        if object_type_id is not None:
            self.object_type_id = object_type_id
        self.known_column_number = known_column_number
        self.source_data = source_data
        self.created_at = created_at
        self.id = id

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


        :return: The error_type of this PublicImportError.  # noqa: E501
        :rtype: str
        """
        return self._error_type

    @error_type.setter
    def error_type(self, error_type):
        """Sets the error_type of this PublicImportError.


        :param error_type: The error_type of this PublicImportError.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and error_type is None:  # noqa: E501
            raise ValueError("Invalid value for `error_type`, must not be `None`")  # noqa: E501
        allowed_values = ["INCORRECT_NUMBER_OF_COLUMNS", "INVALID_OBJECT_ID", "INVALID_ASSOCIATION_IDENTIFIER", "NO_OBJECT_ID_FROM_ASSOCIATION_IDENTIFIER", "MULTIPLE_COMPANIES_WITH_THIS_DOMAIN", "PROPERTY_DEFINITION_NOT_FOUND", "PROPERTY_VALUE_NOT_FOUND", "COULD_NOT_FIND_OWNER", "MULTIPLE_OWNERS_FOUND", "COULD_NOT_PARSE_NUMBER", "COULD_NOT_PARSE_DATE", "COULD_NOT_PARSE_TERM", "OUTSIDE_VALID_TIME_RANGE", "OUTSIDE_VALID_TERM_RANGE", "COULD_NOT_PARSE_ROW", "INVALID_ENUMERATION_OPTION", "AMBIGUOUS_ENUMERATION_OPTION", "FAILED_VALIDATION", "FAILED_TO_CREATE_ASSOCIATION", "FILE_NOT_FOUND", "INVALID_FILE_TYPE", "INVALID_SPREADSHEET", "INVALID_SHEET_COUNT", "FAILED_TO_PROCESS_OBJECT_WITH_EMPTY_PROPERTY_VALUES", "UNKNOWN_BAD_REQUEST", "GDPR_BLACKLISTED_EMAIL", "DUPLICATE_ASSOCIATION_ID", "LIMIT_EXCEEDED", "INVALID_ALTERNATE_ID", "DUPLICATE_ROW_CONTENT", "INVALID_NUMBER_SIZE", "UNKNOWN_ERROR", "FAILED_TO_OPT_OUT_CONTACT", "INVALID_REQUIRED_PROPERTY", "DUPLICATE_ALTERNATE_ID", "DUPLICATE_OBJECT_ID", "DUPLICATE_UNIQUE_PROPERTY_VALUE"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and error_type not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `error_type` ({0}), must be one of {1}"  # noqa: E501
                .format(error_type, allowed_values)
            )

        self._error_type = error_type

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


        :return: The object_type of this PublicImportError.  # noqa: E501
        :rtype: str
        """
        return self._object_type

    @object_type.setter
    def object_type(self, object_type):
        """Sets the object_type of this PublicImportError.


        :param object_type: The object_type of this PublicImportError.  # noqa: E501
        :type: str
        """
        allowed_values = ["CONTACT", "COMPANY", "DEAL", "ENGAGEMENT", "TICKET", "OWNER", "PRODUCT", "LINE_ITEM", "BET_DELIVERABLE_SERVICE", "CONTENT", "CONVERSATION", "BET_ALERT", "PORTAL", "QUOTE", "FORM_SUBMISSION_INBOUNDDB", "QUOTA", "UNSUBSCRIBE", "COMMUNICATION", "FEEDBACK_SUBMISSION", "ATTRIBUTION", "SALESFORCE_SYNC_ERROR", "RESTORABLE_CRM_OBJECT", "HUB", "LANDING_PAGE", "PRODUCT_OR_FOLDER", "TASK", "FORM", "MARKETING_EMAIL", "AD_ACCOUNT", "AD_CAMPAIGN", "AD_GROUP", "AD", "KEYWORD", "CAMPAIGN", "SOCIAL_CHANNEL", "SOCIAL_POST", "SITE_PAGE", "BLOG_POST", "IMPORT", "EXPORT", "CTA", "TASK_TEMPLATE", "AUTOMATION_PLATFORM_FLOW", "OBJECT_LIST", "NOTE", "MEETING_EVENT", "CALL", "EMAIL", "PUBLISHING_TASK", "CONVERSATION_SESSION", "CONTACT_CREATE_ATTRIBUTION", "INVOICE", "MARKETING_EVENT", "CONVERSATION_INBOX", "CHATFLOW", "MEDIA_BRIDGE", "SEQUENCE", "SEQUENCE_STEP", "FORECAST", "SNIPPET", "TEMPLATE", "DEAL_CREATE_ATTRIBUTION", "QUOTE_TEMPLATE", "QUOTE_MODULE", "QUOTE_MODULE_FIELD", "QUOTE_FIELD", "SEQUENCE_ENROLLMENT", "SUBSCRIPTION", "ACCEPTANCE_TEST", "SOCIAL_BROADCAST", "DEAL_SPLIT", "DEAL_REGISTRATION", "UNKNOWN"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and object_type not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `object_type` ({0}), must be one of {1}"  # noqa: E501
                .format(object_type, allowed_values)
            )

        self._object_type = object_type

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


        :return: The invalid_value of this PublicImportError.  # noqa: E501
        :rtype: str
        """
        return self._invalid_value

    @invalid_value.setter
    def invalid_value(self, invalid_value):
        """Sets the invalid_value of this PublicImportError.


        :param invalid_value: The invalid_value of this PublicImportError.  # noqa: E501
        :type: str
        """

        self._invalid_value = invalid_value

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


        :return: The extra_context of this PublicImportError.  # noqa: E501
        :rtype: str
        """
        return self._extra_context

    @extra_context.setter
    def extra_context(self, extra_context):
        """Sets the extra_context of this PublicImportError.


        :param extra_context: The extra_context of this PublicImportError.  # noqa: E501
        :type: str
        """

        self._extra_context = extra_context

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


        :return: The object_type_id of this PublicImportError.  # noqa: E501
        :rtype: str
        """
        return self._object_type_id

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


        :param object_type_id: The object_type_id of this PublicImportError.  # noqa: E501
        :type: str
        """

        self._object_type_id = object_type_id

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


        :return: The known_column_number of this PublicImportError.  # noqa: E501
        :rtype: int
        """
        return self._known_column_number

    @known_column_number.setter
    def known_column_number(self, known_column_number):
        """Sets the known_column_number of this PublicImportError.


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

        self._known_column_number = known_column_number

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


        :return: The source_data of this PublicImportError.  # noqa: E501
        :rtype: ImportRowCore
        """
        return self._source_data

    @source_data.setter
    def source_data(self, source_data):
        """Sets the source_data of this PublicImportError.


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

        self._source_data = source_data

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


        :return: The created_at of this PublicImportError.  # noqa: E501
        :rtype: int
        """
        return self._created_at

    @created_at.setter
    def created_at(self, created_at):
        """Sets the created_at of this PublicImportError.


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

        self._created_at = created_at

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


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

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


        :param id: The id of this PublicImportError.  # noqa: E501
        :type: str
        """
        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

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

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