# coding: utf-8

"""
    Selling Partner API for Merchant Fulfillment

    With the Selling Partner API for Merchant Fulfillment, you can build applications that sellers can use to purchase shipping for non-Prime and Prime orders using Amazon's Buy Shipping Services.

    The version of the OpenAPI document: v0
    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 FileContents(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 = {
        'contents': 'str',
        'file_type': 'FileType',
        'checksum': 'str',
    }

    attribute_map = {
        'contents': 'Contents',
        'file_type': 'FileType',
        'checksum': 'Checksum',
    }

    def __init__(self, contents=None, file_type=None, checksum=None, _configuration=None):  # noqa: E501
        """FileContents - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._contents = None
        self._file_type = None
        self._checksum = None
        self.discriminator = None

        self.contents = contents
        self.file_type = file_type
        self.checksum = checksum

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

        Data for printing labels encoded into a Base64, GZip-compressed string.  # noqa: E501

        :return: The contents of this FileContents.  # noqa: E501
        :rtype: str
        """
        return self._contents

    @contents.setter
    def contents(self, contents):
        """Sets the contents of this FileContents.

        Data for printing labels encoded into a Base64, GZip-compressed string.  # noqa: E501

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

        self._contents = contents

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


        :return: The file_type of this FileContents.  # noqa: E501
        :rtype: FileType
        """
        return self._file_type

    @file_type.setter
    def file_type(self, file_type):
        """Sets the file_type of this FileContents.


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

        self._file_type = file_type

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

        An MD5 hash to validate the PDF document data, in the form of a Base64 string.  # noqa: E501

        :return: The checksum of this FileContents.  # noqa: E501
        :rtype: str
        """
        return self._checksum

    @checksum.setter
    def checksum(self, checksum):
        """Sets the checksum of this FileContents.

        An MD5 hash to validate the PDF document data, in the form of a Base64 string.  # noqa: E501

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

        self._checksum = checksum

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

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