# coding: utf-8

"""
    Selling Partner API for Feeds

    The Selling Partner API for Feeds lets you upload data to Amazon on behalf of a selling partner.

    The version of the OpenAPI document: 2021-06-30
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501


import pprint
import re  # noqa: F401

import six

from spapi.configuration import Configuration


class FeedDocument(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """

    """
    Attributes:
      swagger_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.
    """
    swagger_types = {
        'feed_document_id': 'str',
        'url': 'str',
        'compression_algorithm': 'str',
    }

    attribute_map = {
        'feed_document_id': 'feedDocumentId',
        'url': 'url',
        'compression_algorithm': 'compressionAlgorithm',
    }

    def __init__(self, feed_document_id=None, url=None, compression_algorithm=None, _configuration=None):  # noqa: E501
        """FeedDocument - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._feed_document_id = None
        self._url = None
        self._compression_algorithm = None
        self.discriminator = None

        self.feed_document_id = feed_document_id
        self.url = url
        if compression_algorithm is not None:
            self.compression_algorithm = compression_algorithm

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

        The identifier for the feed document. This identifier is unique only in combination with a seller ID.  # noqa: E501

        :return: The feed_document_id of this FeedDocument.  # noqa: E501
        :rtype: str
        """
        return self._feed_document_id

    @feed_document_id.setter
    def feed_document_id(self, feed_document_id):
        """Sets the feed_document_id of this FeedDocument.

        The identifier for the feed document. This identifier is unique only in combination with a seller ID.  # noqa: E501

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

        self._feed_document_id = feed_document_id

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

        A presigned URL for the feed document. If `compressionAlgorithm` is not returned, you can download the feed directly from this URL. This URL expires after 5 minutes.  # noqa: E501

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

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

        A presigned URL for the feed document. If `compressionAlgorithm` is not returned, you can download the feed directly from this URL. This URL expires after 5 minutes.  # noqa: E501

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

        self._url = url

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

        If the feed document contents have been compressed, the compression algorithm used is returned in this property and you must decompress the feed when you download. Otherwise, you can download the feed directly. Refer to [Step 7. Download the feed processing report](doc:feeds-api-v2021-06-30-use-case-guide#step-7-download-the-feed-processing-report) in the use case guide, where sample code is provided.  # noqa: E501

        :return: The compression_algorithm of this FeedDocument.  # noqa: E501
        :rtype: str
        """
        return self._compression_algorithm

    @compression_algorithm.setter
    def compression_algorithm(self, compression_algorithm):
        """Sets the compression_algorithm of this FeedDocument.

        If the feed document contents have been compressed, the compression algorithm used is returned in this property and you must decompress the feed when you download. Otherwise, you can download the feed directly. Refer to [Step 7. Download the feed processing report](doc:feeds-api-v2021-06-30-use-case-guide#step-7-download-the-feed-processing-report) in the use case guide, where sample code is provided.  # noqa: E501

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

        self._compression_algorithm = compression_algorithm

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

        for attr, _ in six.iteritems(self.swagger_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
        if issubclass(FeedDocument, dict):
            for key, value in self.items():
                result[key] = 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, FeedDocument):
            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, FeedDocument):
            return True

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