# 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 PropertyValue(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 = {
        "source_id": "str",
        "selected_by_user": "bool",
        "source_label": "str",
        "source": "str",
        "updated_by_user_id": "int",
        "persistence_timestamp": "int",
        "source_metadata": "str",
        "data_sensitivity": "str",
        "source_vid": "list[int]",
        "unit": "str",
        "request_id": "str",
        "is_encrypted": "bool",
        "name": "str",
        "use_timestamp_as_persistence_timestamp": "bool",
        "value": "str",
        "selected_by_user_timestamp": "int",
        "timestamp": "int",
        "is_large_value": "bool",
    }

    attribute_map = {
        "source_id": "sourceId",
        "selected_by_user": "selectedByUser",
        "source_label": "sourceLabel",
        "source": "source",
        "updated_by_user_id": "updatedByUserId",
        "persistence_timestamp": "persistenceTimestamp",
        "source_metadata": "sourceMetadata",
        "data_sensitivity": "dataSensitivity",
        "source_vid": "sourceVid",
        "unit": "unit",
        "request_id": "requestId",
        "is_encrypted": "isEncrypted",
        "name": "name",
        "use_timestamp_as_persistence_timestamp": "useTimestampAsPersistenceTimestamp",
        "value": "value",
        "selected_by_user_timestamp": "selectedByUserTimestamp",
        "timestamp": "timestamp",
        "is_large_value": "isLargeValue",
    }

    def __init__(
        self,
        source_id=None,
        selected_by_user=None,
        source_label=None,
        source=None,
        updated_by_user_id=None,
        persistence_timestamp=None,
        source_metadata=None,
        data_sensitivity=None,
        source_vid=None,
        unit=None,
        request_id=None,
        is_encrypted=None,
        name=None,
        use_timestamp_as_persistence_timestamp=None,
        value=None,
        selected_by_user_timestamp=None,
        timestamp=None,
        is_large_value=None,
        local_vars_configuration=None,
    ):  # noqa: E501
        """PropertyValue - 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._source_id = None
        self._selected_by_user = None
        self._source_label = None
        self._source = None
        self._updated_by_user_id = None
        self._persistence_timestamp = None
        self._source_metadata = None
        self._data_sensitivity = None
        self._source_vid = None
        self._unit = None
        self._request_id = None
        self._is_encrypted = None
        self._name = None
        self._use_timestamp_as_persistence_timestamp = None
        self._value = None
        self._selected_by_user_timestamp = None
        self._timestamp = None
        self._is_large_value = None
        self.discriminator = None

        self.source_id = source_id
        self.selected_by_user = selected_by_user
        self.source_label = source_label
        self.source = source
        self.updated_by_user_id = updated_by_user_id
        self.persistence_timestamp = persistence_timestamp
        self.source_metadata = source_metadata
        self.data_sensitivity = data_sensitivity
        self.source_vid = source_vid
        self.unit = unit
        self.request_id = request_id
        self.is_encrypted = is_encrypted
        self.name = name
        self.use_timestamp_as_persistence_timestamp = use_timestamp_as_persistence_timestamp
        self.value = value
        self.selected_by_user_timestamp = selected_by_user_timestamp
        self.timestamp = timestamp
        self.is_large_value = is_large_value

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


        :return: The source_id of this PropertyValue.  # noqa: E501
        :rtype: str
        """
        return self._source_id

    @source_id.setter
    def source_id(self, source_id):
        """Sets the source_id of this PropertyValue.


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

        self._source_id = source_id

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


        :return: The selected_by_user of this PropertyValue.  # noqa: E501
        :rtype: bool
        """
        return self._selected_by_user

    @selected_by_user.setter
    def selected_by_user(self, selected_by_user):
        """Sets the selected_by_user of this PropertyValue.


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

        self._selected_by_user = selected_by_user

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


        :return: The source_label of this PropertyValue.  # noqa: E501
        :rtype: str
        """
        return self._source_label

    @source_label.setter
    def source_label(self, source_label):
        """Sets the source_label of this PropertyValue.


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

        self._source_label = source_label

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


        :return: The source of this PropertyValue.  # noqa: E501
        :rtype: str
        """
        return self._source

    @source.setter
    def source(self, source):
        """Sets the source of this PropertyValue.


        :param source: The source of this PropertyValue.  # noqa: E501
        :type source: str
        """
        if self.local_vars_configuration.client_side_validation and source is None:  # noqa: E501
            raise ValueError("Invalid value for `source`, must not be `None`")  # noqa: E501
        allowed_values = [
            "UNKNOWN",
            "IMPORT",
            "API",
            "FORM",
            "ANALYTICS",
            "MIGRATION",
            "SALESFORCE",
            "INTEGRATION",
            "CONTACTS_WEB",
            "WAL_INCREMENTAL",
            "TASK",
            "EMAIL",
            "WORKFLOWS",
            "CALCULATED",
            "SOCIAL",
            "BATCH_UPDATE",
            "SIGNALS",
            "BIDEN",
            "DEFAULT",
            "COMPANIES",
            "DEALS",
            "ASSISTS",
            "PRESENTATIONS",
            "TALLY",
            "SIDEKICK",
            "CRM_UI",
            "MERGE_CONTACTS",
            "PORTAL_USER_ASSOCIATOR",
            "INTEGRATIONS_PLATFORM",
            "BCC_TO_CRM",
            "FORWARD_TO_CRM",
            "ENGAGEMENTS",
            "SALES",
            "HEISENBERG",
            "LEADIN",
            "GMAIL_INTEGRATION",
            "ACADEMY",
            "SALES_MESSAGES",
            "AVATARS_SERVICE",
            "MERGE_COMPANIES",
            "SEQUENCES",
            "COMPANY_FAMILIES",
            "MOBILE_IOS",
            "MOBILE_ANDROID",
            "CONTACTS",
            "ASSOCIATIONS",
            "EXTENSION",
            "SUCCESS",
            "BOT",
            "INTEGRATIONS_SYNC",
            "AUTOMATION_PLATFORM",
            "CONVERSATIONS",
            "EMAIL_INTEGRATION",
            "CONTENT_MEMBERSHIP",
            "QUOTES",
            "BET_ASSIGNMENT",
            "QUOTAS",
            "BET_CRM_CONNECTOR",
            "MEETINGS",
            "MERGE_OBJECTS",
            "RECYCLING_BIN",
            "ADS",
            "AI_GROUP",
            "COMMUNICATOR",
            "SETTINGS",
            "PROPERTY_SETTINGS",
            "PIPELINE_SETTINGS",
            "COMPANY_INSIGHTS",
            "BEHAVIORAL_EVENTS",
            "PAYMENTS",
            "GOALS",
            "PORTAL_OBJECT_SYNC",
            "APPROVALS",
            "FILE_MANAGER",
            "MARKETPLACE",
            "INTERNAL_PROCESSING",
            "FORECASTING",
            "SLACK_INTEGRATION",
            "CRM_UI_BULK_ACTION",
            "WORKFLOW_CONTACT_DELETE_ACTION",
            "ACCEPTANCE_TEST",
            "PLAYBOOKS",
            "CHATSPOT",
            "FLYWHEEL_PRODUCT_DATA_SYNC",
            "HELP_DESK",
            "BILLING",
            "DATA_ENRICHMENT",
            "AUTOMATION_JOURNEY",
            "MICROAPPS",
            "INTENT",
            "PROSPECTING_AGENT",
        ]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and source not in allowed_values:  # noqa: E501
            raise ValueError("Invalid value for `source` ({0}), must be one of {1}".format(source, allowed_values))  # noqa: E501

        self._source = source

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


        :return: The updated_by_user_id of this PropertyValue.  # noqa: E501
        :rtype: int
        """
        return self._updated_by_user_id

    @updated_by_user_id.setter
    def updated_by_user_id(self, updated_by_user_id):
        """Sets the updated_by_user_id of this PropertyValue.


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

        self._updated_by_user_id = updated_by_user_id

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


        :return: The persistence_timestamp of this PropertyValue.  # noqa: E501
        :rtype: int
        """
        return self._persistence_timestamp

    @persistence_timestamp.setter
    def persistence_timestamp(self, persistence_timestamp):
        """Sets the persistence_timestamp of this PropertyValue.


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

        self._persistence_timestamp = persistence_timestamp

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


        :return: The source_metadata of this PropertyValue.  # noqa: E501
        :rtype: str
        """
        return self._source_metadata

    @source_metadata.setter
    def source_metadata(self, source_metadata):
        """Sets the source_metadata of this PropertyValue.


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

        self._source_metadata = source_metadata

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


        :return: The data_sensitivity of this PropertyValue.  # noqa: E501
        :rtype: str
        """
        return self._data_sensitivity

    @data_sensitivity.setter
    def data_sensitivity(self, data_sensitivity):
        """Sets the data_sensitivity of this PropertyValue.


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

        self._data_sensitivity = data_sensitivity

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


        :return: The source_vid of this PropertyValue.  # noqa: E501
        :rtype: list[int]
        """
        return self._source_vid

    @source_vid.setter
    def source_vid(self, source_vid):
        """Sets the source_vid of this PropertyValue.


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

        self._source_vid = source_vid

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


        :return: The unit of this PropertyValue.  # noqa: E501
        :rtype: str
        """
        return self._unit

    @unit.setter
    def unit(self, unit):
        """Sets the unit of this PropertyValue.


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

        self._unit = unit

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


        :return: The request_id of this PropertyValue.  # noqa: E501
        :rtype: str
        """
        return self._request_id

    @request_id.setter
    def request_id(self, request_id):
        """Sets the request_id of this PropertyValue.


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

        self._request_id = request_id

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


        :return: The is_encrypted of this PropertyValue.  # noqa: E501
        :rtype: bool
        """
        return self._is_encrypted

    @is_encrypted.setter
    def is_encrypted(self, is_encrypted):
        """Sets the is_encrypted of this PropertyValue.


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

        self._is_encrypted = is_encrypted

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


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

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


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

        self._name = name

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


        :return: The use_timestamp_as_persistence_timestamp of this PropertyValue.  # noqa: E501
        :rtype: bool
        """
        return self._use_timestamp_as_persistence_timestamp

    @use_timestamp_as_persistence_timestamp.setter
    def use_timestamp_as_persistence_timestamp(self, use_timestamp_as_persistence_timestamp):
        """Sets the use_timestamp_as_persistence_timestamp of this PropertyValue.


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

        self._use_timestamp_as_persistence_timestamp = use_timestamp_as_persistence_timestamp

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


        :return: The value of this PropertyValue.  # noqa: E501
        :rtype: str
        """
        return self._value

    @value.setter
    def value(self, value):
        """Sets the value of this PropertyValue.


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

        self._value = value

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


        :return: The selected_by_user_timestamp of this PropertyValue.  # noqa: E501
        :rtype: int
        """
        return self._selected_by_user_timestamp

    @selected_by_user_timestamp.setter
    def selected_by_user_timestamp(self, selected_by_user_timestamp):
        """Sets the selected_by_user_timestamp of this PropertyValue.


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

        self._selected_by_user_timestamp = selected_by_user_timestamp

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


        :return: The timestamp of this PropertyValue.  # noqa: E501
        :rtype: int
        """
        return self._timestamp

    @timestamp.setter
    def timestamp(self, timestamp):
        """Sets the timestamp of this PropertyValue.


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

        self._timestamp = timestamp

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


        :return: The is_large_value of this PropertyValue.  # noqa: E501
        :rtype: bool
        """
        return self._is_large_value

    @is_large_value.setter
    def is_large_value(self, is_large_value):
        """Sets the is_large_value of this PropertyValue.


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

        self._is_large_value = is_large_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, PropertyValue):
            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, PropertyValue):
            return True

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