# coding: utf-8

"""
    Files

    Upload and manage files.  # 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.files.configuration import Configuration


class ImportFromUrlInput(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 = {
        "folder_path": "str",
        "access": "str",
        "duplicate_validation_scope": "str",
        "name": "str",
        "duplicate_validation_strategy": "str",
        "ttl": "str",
        "overwrite": "bool",
        "expires_at": "datetime",
        "url": "str",
        "folder_id": "str",
    }

    attribute_map = {
        "folder_path": "folderPath",
        "access": "access",
        "duplicate_validation_scope": "duplicateValidationScope",
        "name": "name",
        "duplicate_validation_strategy": "duplicateValidationStrategy",
        "ttl": "ttl",
        "overwrite": "overwrite",
        "expires_at": "expiresAt",
        "url": "url",
        "folder_id": "folderId",
    }

    def __init__(
        self,
        folder_path=None,
        access=None,
        duplicate_validation_scope=None,
        name=None,
        duplicate_validation_strategy=None,
        ttl=None,
        overwrite=None,
        expires_at=None,
        url=None,
        folder_id=None,
        local_vars_configuration=None,
    ):  # noqa: E501
        """ImportFromUrlInput - 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._folder_path = None
        self._access = None
        self._duplicate_validation_scope = None
        self._name = None
        self._duplicate_validation_strategy = None
        self._ttl = None
        self._overwrite = None
        self._expires_at = None
        self._url = None
        self._folder_id = None
        self.discriminator = None

        if folder_path is not None:
            self.folder_path = folder_path
        self.access = access
        if duplicate_validation_scope is not None:
            self.duplicate_validation_scope = duplicate_validation_scope
        if name is not None:
            self.name = name
        if duplicate_validation_strategy is not None:
            self.duplicate_validation_strategy = duplicate_validation_strategy
        if ttl is not None:
            self.ttl = ttl
        if overwrite is not None:
            self.overwrite = overwrite
        if expires_at is not None:
            self.expires_at = expires_at
        self.url = url
        if folder_id is not None:
            self.folder_id = folder_id

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

        One of folderPath or folderId is required. Destination folder path for the uploaded file. If the folder path does not exist, there will be an attempt to create the folder path.  # noqa: E501

        :return: The folder_path of this ImportFromUrlInput.  # noqa: E501
        :rtype: str
        """
        return self._folder_path

    @folder_path.setter
    def folder_path(self, folder_path):
        """Sets the folder_path of this ImportFromUrlInput.

        One of folderPath or folderId is required. Destination folder path for the uploaded file. If the folder path does not exist, there will be an attempt to create the folder path.  # noqa: E501

        :param folder_path: The folder_path of this ImportFromUrlInput.  # noqa: E501
        :type folder_path: str
        """

        self._folder_path = folder_path

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

        PUBLIC_INDEXABLE: File is publicly accessible by anyone who has the URL. Search engines can index the file. PUBLIC_NOT_INDEXABLE: File is publicly accessible by anyone who has the URL. Search engines *can't* index the file. PRIVATE: File is NOT publicly accessible. Requires a signed URL to see content. Search engines *can't* index the file.   # noqa: E501

        :return: The access of this ImportFromUrlInput.  # noqa: E501
        :rtype: str
        """
        return self._access

    @access.setter
    def access(self, access):
        """Sets the access of this ImportFromUrlInput.

        PUBLIC_INDEXABLE: File is publicly accessible by anyone who has the URL. Search engines can index the file. PUBLIC_NOT_INDEXABLE: File is publicly accessible by anyone who has the URL. Search engines *can't* index the file. PRIVATE: File is NOT publicly accessible. Requires a signed URL to see content. Search engines *can't* index the file.   # noqa: E501

        :param access: The access of this ImportFromUrlInput.  # noqa: E501
        :type access: str
        """
        if self.local_vars_configuration.client_side_validation and access is None:  # noqa: E501
            raise ValueError("Invalid value for `access`, must not be `None`")  # noqa: E501
        allowed_values = ["PUBLIC_INDEXABLE", "PUBLIC_NOT_INDEXABLE", "HIDDEN_INDEXABLE", "HIDDEN_NOT_INDEXABLE", "HIDDEN_PRIVATE", "PRIVATE", "HIDDEN_SENSITIVE", "SENSITIVE"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and access not in allowed_values:  # noqa: E501
            raise ValueError("Invalid value for `access` ({0}), must be one of {1}".format(access, allowed_values))  # noqa: E501

        self._access = access

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

        ENTIRE_PORTAL: Look for a duplicate file in the entire account. EXACT_FOLDER: Look for a duplicate file in the provided folder.   # noqa: E501

        :return: The duplicate_validation_scope of this ImportFromUrlInput.  # noqa: E501
        :rtype: str
        """
        return self._duplicate_validation_scope

    @duplicate_validation_scope.setter
    def duplicate_validation_scope(self, duplicate_validation_scope):
        """Sets the duplicate_validation_scope of this ImportFromUrlInput.

        ENTIRE_PORTAL: Look for a duplicate file in the entire account. EXACT_FOLDER: Look for a duplicate file in the provided folder.   # noqa: E501

        :param duplicate_validation_scope: The duplicate_validation_scope of this ImportFromUrlInput.  # noqa: E501
        :type duplicate_validation_scope: str
        """
        allowed_values = ["ENTIRE_PORTAL", "EXACT_FOLDER"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and duplicate_validation_scope not in allowed_values:  # noqa: E501
            raise ValueError("Invalid value for `duplicate_validation_scope` ({0}), must be one of {1}".format(duplicate_validation_scope, allowed_values))  # noqa: E501

        self._duplicate_validation_scope = duplicate_validation_scope

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

        Name to give the resulting file in the file manager.  # noqa: E501

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

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

        Name to give the resulting file in the file manager.  # noqa: E501

        :param name: The name of this ImportFromUrlInput.  # noqa: E501
        :type name: str
        """

        self._name = name

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

        NONE: Do not run any duplicate validation. REJECT: Reject the upload if a duplicate is found. RETURN_EXISTING: If a duplicate file is found, do not upload a new file and return the found duplicate instead.   # noqa: E501

        :return: The duplicate_validation_strategy of this ImportFromUrlInput.  # noqa: E501
        :rtype: str
        """
        return self._duplicate_validation_strategy

    @duplicate_validation_strategy.setter
    def duplicate_validation_strategy(self, duplicate_validation_strategy):
        """Sets the duplicate_validation_strategy of this ImportFromUrlInput.

        NONE: Do not run any duplicate validation. REJECT: Reject the upload if a duplicate is found. RETURN_EXISTING: If a duplicate file is found, do not upload a new file and return the found duplicate instead.   # noqa: E501

        :param duplicate_validation_strategy: The duplicate_validation_strategy of this ImportFromUrlInput.  # noqa: E501
        :type duplicate_validation_strategy: str
        """
        allowed_values = ["NONE", "REJECT", "RETURN_EXISTING"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and duplicate_validation_strategy not in allowed_values:  # noqa: E501
            raise ValueError("Invalid value for `duplicate_validation_strategy` ({0}), must be one of {1}".format(duplicate_validation_strategy, allowed_values))  # noqa: E501

        self._duplicate_validation_strategy = duplicate_validation_strategy

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

        Time to live. If specified the file will be deleted after the given time frame. If left unset, the file will exist indefinitely  # noqa: E501

        :return: The ttl of this ImportFromUrlInput.  # noqa: E501
        :rtype: str
        """
        return self._ttl

    @ttl.setter
    def ttl(self, ttl):
        """Sets the ttl of this ImportFromUrlInput.

        Time to live. If specified the file will be deleted after the given time frame. If left unset, the file will exist indefinitely  # noqa: E501

        :param ttl: The ttl of this ImportFromUrlInput.  # noqa: E501
        :type ttl: str
        """

        self._ttl = ttl

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

        If true, will overwrite existing file if one with the same name and extension exists in the given folder. The overwritten file will be deleted and the uploaded file will take its place with a new ID. If unset or set as false, the new file's name will be updated to prevent colliding with existing file if one exists with the same path, name, and extension  # noqa: E501

        :return: The overwrite of this ImportFromUrlInput.  # noqa: E501
        :rtype: bool
        """
        return self._overwrite

    @overwrite.setter
    def overwrite(self, overwrite):
        """Sets the overwrite of this ImportFromUrlInput.

        If true, will overwrite existing file if one with the same name and extension exists in the given folder. The overwritten file will be deleted and the uploaded file will take its place with a new ID. If unset or set as false, the new file's name will be updated to prevent colliding with existing file if one exists with the same path, name, and extension  # noqa: E501

        :param overwrite: The overwrite of this ImportFromUrlInput.  # noqa: E501
        :type overwrite: bool
        """

        self._overwrite = overwrite

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


        :return: The expires_at of this ImportFromUrlInput.  # noqa: E501
        :rtype: datetime
        """
        return self._expires_at

    @expires_at.setter
    def expires_at(self, expires_at):
        """Sets the expires_at of this ImportFromUrlInput.


        :param expires_at: The expires_at of this ImportFromUrlInput.  # noqa: E501
        :type expires_at: datetime
        """

        self._expires_at = expires_at

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

        URL to download the new file from.  # noqa: E501

        :return: The url of this ImportFromUrlInput.  # noqa: E501
        :rtype: str
        """
        return self._url

    @url.setter
    def url(self, url):
        """Sets the url of this ImportFromUrlInput.

        URL to download the new file from.  # noqa: E501

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

        self._url = url

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

        One of folderId or folderPath is required. Destination folderId for the uploaded file.  # noqa: E501

        :return: The folder_id of this ImportFromUrlInput.  # noqa: E501
        :rtype: str
        """
        return self._folder_id

    @folder_id.setter
    def folder_id(self, folder_id):
        """Sets the folder_id of this ImportFromUrlInput.

        One of folderId or folderPath is required. Destination folderId for the uploaded file.  # noqa: E501

        :param folder_id: The folder_id of this ImportFromUrlInput.  # noqa: E501
        :type folder_id: str
        """

        self._folder_id = folder_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, ImportFromUrlInput):
            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, ImportFromUrlInput):
            return True

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