# coding: utf-8

"""
    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
"""


try:
    from inspect import getfullargspec
except ImportError:
    from inspect import getargspec as getfullargspec
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 = {
        "created_at": "int",
        "extra_context": "str",
        "object_type_id": "str",
        "error_type": "str",
        "invalid_property_value": "PropertyValue",
        "error_message": "str",
        "known_column_number": "int",
        "invalid_value_to_display": "str",
        "id": "str",
        "source_data": "ImportRowCore",
        "object_type": "str",
        "invalid_value": "str",
    }

    attribute_map = {
        "created_at": "createdAt",
        "extra_context": "extraContext",
        "object_type_id": "objectTypeId",
        "error_type": "errorType",
        "invalid_property_value": "invalidPropertyValue",
        "error_message": "errorMessage",
        "known_column_number": "knownColumnNumber",
        "invalid_value_to_display": "invalidValueToDisplay",
        "id": "id",
        "source_data": "sourceData",
        "object_type": "objectType",
        "invalid_value": "invalidValue",
    }

    def __init__(
        self,
        created_at=None,
        extra_context=None,
        object_type_id=None,
        error_type=None,
        invalid_property_value=None,
        error_message=None,
        known_column_number=None,
        invalid_value_to_display=None,
        id=None,
        source_data=None,
        object_type=None,
        invalid_value=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.get_default_copy()
        self.local_vars_configuration = local_vars_configuration

        self._created_at = None
        self._extra_context = None
        self._object_type_id = None
        self._error_type = None
        self._invalid_property_value = None
        self._error_message = None
        self._known_column_number = None
        self._invalid_value_to_display = None
        self._id = None
        self._source_data = None
        self._object_type = None
        self._invalid_value = None
        self.discriminator = None

        self.created_at = created_at
        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.error_type = error_type
        if invalid_property_value is not None:
            self.invalid_property_value = invalid_property_value
        if error_message is not None:
            self.error_message = error_message
        if known_column_number is not None:
            self.known_column_number = known_column_number
        if invalid_value_to_display is not None:
            self.invalid_value_to_display = invalid_value_to_display
        self.id = id
        self.source_data = source_data
        if object_type is not None:
            self.object_type = object_type
        if invalid_value is not None:
            self.invalid_value = invalid_value

    @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 created_at: 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 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 extra_context: 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 object_type_id: str
        """

        self._object_type_id = object_type_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 error_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_FIND_BUSINESS_UNIT",
            "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",
            "ASSOCIATION_LIMIT_EXCEEDED",
            "FILE_NOT_FOUND",
            "INVALID_COLUMN_CONFIGURATION",
            "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",
            "PORTAL_WIDE_CUSTOM_OBJECT_LIMIT_EXCEEDED",
            "INVALID_ALTERNATE_ID",
            "INVALID_EMAIL",
            "SECONDARY_EMAIL_WRITE_FAILURE",
            "INVALID_DOMAIN",
            "DUPLICATE_ROW_CONTENT",
            "INVALID_NUMBER_SIZE",
            "UNKNOWN_ERROR",
            "FAILED_TO_OPT_OUT_CONTACT",
            "INVALID_REQUIRED_PROPERTY",
            "MISSING_REQUIRED_PROPERTY",
            "DUPLICATE_ALTERNATE_ID",
            "DUPLICATE_OBJECT_ID",
            "DUPLICATE_UNIQUE_PROPERTY_VALUE",
            "UNKNOWN_ASSOCIATION_RECORD_ID",
            "INVALID_RECORD_ID",
            "DUPLICATE_RECORD_ID",
            "INVALID_CUSTOM_PROPERTY_VALIDATION",
            "CREATE_ONLY_IMPORT",
            "UPDATE_ONLY_IMPORT",
            "COLUMN_TOO_LARGE",
            "ROW_DATA_TOO_LARGE",
            "MISSING_EVENT_TIMESTAMP",
            "INVALID_EVENT_TIMESTAMP",
            "INVALID_EVENT",
            "DUPLICATE_EVENT",
            "MISSING_EVENT_DEFINITION",
            "INVALID_ASSOCIATION_KEY",
            "ASSOCIATION_RECORD_NOT_FOUND",
            "MISSING_OBJECT_DEFINITION",
            "ASSOCIATION_LABEL_NOT_FOUND",
            "MANY_ERRORS_IN_ROW",
        ]  # 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}".format(error_type, allowed_values))  # noqa: E501

        self._error_type = error_type

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


        :return: The invalid_property_value of this PublicImportError.  # noqa: E501
        :rtype: PropertyValue
        """
        return self._invalid_property_value

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


        :param invalid_property_value: The invalid_property_value of this PublicImportError.  # noqa: E501
        :type invalid_property_value: PropertyValue
        """

        self._invalid_property_value = invalid_property_value

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


        :return: The error_message of this PublicImportError.  # noqa: E501
        :rtype: str
        """
        return self._error_message

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


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

        self._error_message = error_message

    @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 known_column_number: int
        """

        self._known_column_number = known_column_number

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


        :return: The invalid_value_to_display of this PublicImportError.  # noqa: E501
        :rtype: str
        """
        return self._invalid_value_to_display

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


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

        self._invalid_value_to_display = invalid_value_to_display

    @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 id: 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

    @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 source_data: 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 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 object_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",
            "GOAL_TARGET",
            "GOAL_TARGET_GROUP",
            "PORTAL_OBJECT_SYNC_MESSAGE",
            "FILE_MANAGER_FILE",
            "FILE_MANAGER_FOLDER",
            "SEQUENCE_STEP_ENROLLMENT",
            "APPROVAL",
            "APPROVAL_STEP",
            "CTA_VARIANT",
            "SALES_DOCUMENT",
            "DISCOUNT",
            "FEE",
            "TAX",
            "MARKETING_CALENDAR",
            "PERMISSIONS_TESTING",
            "PRIVACY_SCANNER_COOKIE",
            "DATA_SYNC_STATE",
            "WEB_INTERACTIVE",
            "PLAYBOOK",
            "FOLDER",
            "PLAYBOOK_QUESTION",
            "PLAYBOOK_SUBMISSION",
            "PLAYBOOK_SUBMISSION_ANSWER",
            "COMMERCE_PAYMENT",
            "GSC_PROPERTY",
            "SOX_PROTECTED_DUMMY_TYPE",
            "BLOG_LISTING_PAGE",
            "QUARANTINED_SUBMISSION",
            "PAYMENT_SCHEDULE",
            "PAYMENT_SCHEDULE_INSTALLMENT",
            "MARKETING_CAMPAIGN_UTM",
            "DISCOUNT_TEMPLATE",
            "DISCOUNT_CODE",
            "FEEDBACK_SURVEY",
            "CMS_URL",
            "SALES_TASK",
            "SALES_WORKLOAD",
            "USER",
            "POSTAL_MAIL",
            "SCHEMAS_BACKEND_TEST",
            "PAYMENT_LINK",
            "SUBMISSION_TAG",
            "CAMPAIGN_STEP",
            "SCHEDULING_PAGE",
            "SOX_PROTECTED_TEST_TYPE",
            "ORDER",
            "MARKETING_SMS",
            "PARTNER_ACCOUNT",
            "CAMPAIGN_TEMPLATE",
            "CAMPAIGN_TEMPLATE_STEP",
            "PLAYLIST",
            "CLIP",
            "CAMPAIGN_BUDGET_ITEM",
            "CAMPAIGN_SPEND_ITEM",
            "MIC",
            "CONTENT_AUDIT",
            "CONTENT_AUDIT_PAGE",
            "PLAYLIST_FOLDER",
            "LEAD",
            "ABANDONED_CART",
            "EXTERNAL_WEB_URL",
            "VIEW",
            "VIEW_BLOCK",
            "ROSTER",
            "CART",
            "AUTOMATION_PLATFORM_FLOW_ACTION",
            "SOCIAL_PROFILE",
            "PARTNER_CLIENT",
            "ROSTER_MEMBER",
            "MARKETING_EVENT_ATTENDANCE",
            "ALL_PAGES",
            "AI_FORECAST",
            "CRM_PIPELINES_DUMMY_TYPE",
            "KNOWLEDGE_ARTICLE",
            "PROPERTY_INFO",
            "DATA_PRIVACY_CONSENT",
            "GOAL_TEMPLATE",
            "SCORE_CONFIGURATION",
            "AUDIENCE",
            "PARTNER_CLIENT_REVENUE",
            "AUTOMATION_JOURNEY",
            "COMBO_EVENT_CONFIGURATION",
            "CRM_OBJECTS_DUMMY_TYPE",
            "CASE_STUDY",
            "SERVICE",
            "PODCAST_EPISODE",
            "PARTNER_SERVICE",
            "PROSPECTING_AGENT_CONTACT_ASSIGNMENT",
            "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}".format(object_type, allowed_values))  # noqa: E501

        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 invalid_value: str
        """

        self._invalid_value = invalid_value

    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, 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()
